freebsd-dev/sys/pc98/cbus
John Baldwin c86b6ff551 Change the preemption code for software interrupt thread schedules and
mutex releases to not require flags for the cases when preemption is
not allowed:

The purpose of the MTX_NOSWITCH and SWI_NOSWITCH flags is to prevent
switching to a higher priority thread on mutex releease and swi schedule,
respectively when that switch is not safe.  Now that the critical section
API maintains a per-thread nesting count, the kernel can easily check
whether or not it should switch without relying on flags from the
programmer.  This fixes a few bugs in that all current callers of
swi_sched() used SWI_NOSWITCH, when in fact, only the ones called from
fast interrupt handlers and the swi_sched of softclock needed this flag.
Note that to ensure that swi_sched()'s in clock and fast interrupt
handlers do not switch, these handlers have to be explicitly wrapped
in critical_enter/exit pairs.  Presently, just wrapping the handlers is
sufficient, but in the future with the fully preemptive kernel, the
interrupt must be EOI'd before critical_exit() is called.  (critical_exit()
can switch due to a deferred preemption in a fully preemptive kernel.)

I've tested the changes to the interrupt code on i386 and alpha.  I have
not tested ia64, but the interrupt code is almost identical to the alpha
code, so I expect it will work fine.  PowerPC and ARM do not yet have
interrupt code in the tree so they shouldn't be broken.  Sparc64 is
broken, but that's been ok'd by jake and tmm who will be fixing the
interrupt code for sparc64 shortly.

Reviewed by:	peter
Tested on:	i386, alpha
2002-01-05 08:47:13 +00:00
..
30line.h Fixed warnings. 2000-10-15 04:54:17 +00:00
cbus_dma.c Added (commented out) ACPI attachment. 2001-09-16 05:28:16 +00:00
cbus.h Split the sio driver for pc98 into bus front end and back end. 2001-11-26 12:29:53 +00:00
clock.c MFi386: revision 1.178 2001-12-22 01:35:44 +00:00
fdc.c Merged from sys/isa/{fd.c,fdreg.h} revisions 1.222 and 1.15, respectively. 2001-12-16 09:00:03 +00:00
fdcreg.h Merged from sys/isa/{fd.c,fdreg.h} revisions 1.222 and 1.15, respectively. 2001-12-16 09:00:03 +00:00
gdc.c Fix compile error of the case using `LINE30' option. 2001-10-23 08:54:50 +00:00
olpt.c KSE changes for olpt driver 2001-09-14 04:50:27 +00:00
pckbd.c Merged from the following changes. 2001-07-14 03:26:02 +00:00
pcrtc.c MFi386: revision 1.178 2001-12-22 01:35:44 +00:00
pmc.c Removed pmc_isa_identify function. It is not needed. 2001-10-28 04:16:50 +00:00
ppc.c Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
ppcreg.h Merged from the following changes. 2001-06-26 11:53:12 +00:00
sc_machdep.h Fixed conflict with sys/dev/syscons/syscons.h. 2001-07-14 08:07:26 +00:00
scgdcrndr.c Fixed to draw mouse cursor. The syscons driver for PC98 uses different 2001-12-14 15:27:15 +00:00
scterm-sck.c cosmetic changes. 2001-12-22 01:30:19 +00:00
scvtb.c Fixed to draw mouse cursor. The syscons driver for PC98 uses different 2001-12-14 15:27:15 +00:00
sio_cbus.c Split the sio driver for pc98 into bus front end and back end. 2001-11-26 12:29:53 +00:00
sio.c Change the preemption code for software interrupt thread schedules and 2002-01-05 08:47:13 +00:00
syscons_cbus.c Merged from the following changes. 2001-07-14 03:26:02 +00:00