freebsd-skq/sys/dev
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
..
aac I missed a string concatenation. 2001-12-10 09:34:47 +00:00
acpica Change the preemption code for software interrupt thread schedules and 2002-01-05 08:47:13 +00:00
advansys
agp Allow retrieval of the virtual address of the AGP aperture 2001-12-19 08:54:29 +00:00
aha
ahb
aic Migrate to PCMCIA_CARD() macros 2001-11-15 07:52:49 +00:00
aic7xxx Remove reliance on i++ in multiple arguments to a function. C does not 2001-12-16 17:38:30 +00:00
amd
amr Comment tokens after #undef <macroname> and #endif. 2001-12-13 11:12:30 +00:00
an Save stack space by converting areq in sc->areq. 2001-12-31 22:12:42 +00:00
ar
asr Convert C++ style comments to proper C ones. 2001-12-13 23:48:34 +00:00
ata Update of the VIA 82c686b southbridge data corruption fix, also 2002-01-01 19:58:11 +00:00
atkbdc Add another PS2 PNP id. 2001-12-19 13:32:21 +00:00
awi Add NEWCARD support to awi. 2001-11-19 06:42:11 +00:00
bge Fix warnings: the bge_bpd_read*() functions are not used (#ifdef notdef) 2001-12-18 08:03:25 +00:00
bktr Modify the critical section API as follows: 2001-12-18 00:27:18 +00:00
buslogic Use ANSI C string contatenation instead of a multi-line string literal. 2001-12-13 11:14:28 +00:00
cardbus Add support for suspending/resuming CardBus bridges. 2001-12-15 05:58:28 +00:00
ccd Reduce kernel stack usage of ccdinit() by MAXPATHLEN by using MALLOC(9). 2001-12-30 17:34:19 +00:00
ciss Fix warning; line 1640: ciss_abort_request defined but not used. 2001-12-18 08:01:48 +00:00
cnw
cs Migrate to PCMCIA_CARD() macros 2001-11-15 07:52:49 +00:00
ct Added Logitec LHA-301 pnp id. 2001-10-09 15:30:19 +00:00
cy Change the preemption code for software interrupt thread schedules and 2002-01-05 08:47:13 +00:00
dc Fix the "conexant chips don't work in full duplexmode" problem. According 2001-12-19 18:23:45 +00:00
de No FreeBSD/vax here either. 2001-11-03 08:32:28 +00:00
dec Introduce a boot environment variable (clock_compat_osf1) which can 2001-11-03 17:22:50 +00:00
dgb Don't call cdevsw_add(). 2001-11-04 09:09:41 +00:00
digi - Fix a bunch of malloc calls where the M_FLAG is incorrectly used; it 2001-12-07 17:59:15 +00:00
dpt This file is a 2.2 vintage pre-CAM file of no current value. 2001-11-06 07:24:54 +00:00
ed Patch to allow the ed driver interrupt routine to terminate if the 2001-11-24 16:15:18 +00:00
eisa
em -Remove unneeded include stddef.h 2001-12-20 17:55:49 +00:00
en
ep More devices. Obtained from NetBSD. 2001-11-15 07:57:38 +00:00
ex
fb Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
fdc Change the test for _MACHINE_ARCH == i386 into #ifdef __i386__ since it 2001-12-18 22:16:33 +00:00
fe Migrate to PCMCIA_CARD() macros 2001-11-15 07:52:49 +00:00
fxp Possibly typo fix (s/FXP_PORT_SOFTWARE_RESET/FXP_PORT_SELECTIVE_RESET/) 2001-12-24 05:32:58 +00:00
gfb We need to operate on struct thread now, not struct proc. 2001-11-08 01:49:06 +00:00
gx Don't pass an interface pointer to VLAN_INPUT{,_TAG}. Get it from the 2001-12-03 17:28:27 +00:00
hea
hfa
ic Oops, forgot to commit one file in the fd driver mega update. Here it 2001-12-16 07:52:13 +00:00
ichsmb Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
ida Fix a signed bug in the crashdump code for systems with > 2GB of ram. 2001-11-13 01:08:54 +00:00
ie
iicbus Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
isp Implement REDUCED INTERRUPT OPERATION usage form FC cards- this allows the 2002-01-03 20:43:22 +00:00
ispfw Roll firmware to latest offerings... Fixes a number of f/w related 2001-12-13 00:09:06 +00:00
joy Split joystick driver into ISA and PC Card front ends. 2001-12-05 09:08:23 +00:00
kbd Refine ACPI/PnP BIOS probe/attach routines a bit. 2001-09-15 04:38:20 +00:00
lge Do not call mii_polltick() immediately after mii_tick(). 2001-09-29 19:31:29 +00:00
lmc
lnc
mc146818
mca
mcd Don't call cdevsw_add(). 2001-11-04 08:58:22 +00:00
md Actually make use of the md_version field of 'struct mdio'. In order 2001-12-20 06:38:21 +00:00
mii Fix declaration disagreement. 2001-10-11 22:02:14 +00:00
mlx Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
mly Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
mse KSE Milestone 2 2001-09-12 08:38:13 +00:00
musycc
ncv o Add KLD support for scsi_low. 2001-12-15 12:32:23 +00:00
nge Don't pass an interface pointer to VLAN_INPUT{,_TAG}. Get it from the 2001-12-03 17:28:27 +00:00
nmdm Don't call cdevsw_add(). 2001-11-04 15:55:17 +00:00
nsp o Add KLD support for scsi_low. 2001-12-15 12:32:23 +00:00
null
ofw 1. Lower the poll timeout for the ofw console driver from hz / 50 to hz / 4. 2002-01-01 21:45:30 +00:00
pccard Add support for suspending/resuming CardBus bridges. 2001-12-15 05:58:28 +00:00
pccbb Add support for suspending/resuming CardBus bridges. 2001-12-15 05:58:28 +00:00
pcf Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
pci Use the new resource_list_print_type() function to print resource list 2001-12-21 21:49:57 +00:00
pcic Fix missing comma in previous commit. 2001-12-28 23:51:48 +00:00
pdq
ppbus Make this driver a better citizen by moving dev creation and 2001-12-19 19:37:31 +00:00
ppc Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
random o Modify open() and close() for /dev/random to use securelevel_gt() instead 2001-09-26 20:15:42 +00:00
ray Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
rc Change the preemption code for software interrupt thread schedules and 2002-01-05 08:47:13 +00:00
rp Force the RxBuf and TxBuf arrays to be aligned on 16-bit boundaries to 2001-11-05 12:57:46 +00:00
sbni Add driver for Granch SBNI12-xx ISA and PCI network adapters. 2001-11-21 22:29:35 +00:00
scd Don't call cdevsw_add() 2001-11-04 08:54:15 +00:00
sf Remove printf's on mbuf/cluster allocation failures. There are now 2001-12-14 05:56:35 +00:00
si KSE Milestone 2 2001-09-12 08:38:13 +00:00
sio Change the preemption code for software interrupt thread schedules and 2002-01-05 08:47:13 +00:00
sk Remove printf's on mbuf/cluster allocation failures. There are now 2001-12-14 05:56:35 +00:00
smbus SMBus support for the AMD 756 power management unit. See smbus(4), 2001-09-16 22:35:07 +00:00
sn Migrate to PCMCIA_CARD() macros 2001-11-15 07:52:49 +00:00
snc
snp Check the return value of tsleep() in snpread(). This may be 2001-11-24 15:59:46 +00:00
sound Add the system default timer engine. 2002-01-04 01:16:18 +00:00
speaker KSE Milestone 2 2001-09-12 08:38:13 +00:00
sr
stg o Add KLD support for scsi_low. 2001-12-15 12:32:23 +00:00
streams o Make the credential used by socreate() an explicit argument to 2001-12-31 17:45:16 +00:00
sym Comment tokens after #undef <macroname> and #endif. 2001-12-13 11:12:30 +00:00
syscons Fix POLA - when selecting line into syscons' cut'n'paste buffer (double 2001-11-25 22:51:30 +00:00
tdfx KSE Milestone 2 2001-09-12 08:38:13 +00:00
tga Add the TGA video driver. This is a great accomplishtment and will help 2001-11-01 08:26:30 +00:00
ti Remove printf's on mbuf/cluster allocation failures. There are now 2001-12-14 05:56:35 +00:00
twe Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
tx Update tx(4) to always enable vlan(4) support. 2001-09-05 23:04:53 +00:00
txp Don't pass an interface pointer to VLAN_INPUT{,_TAG}. Get it from the 2001-12-03 17:28:27 +00:00
usb unbreak -current (at least on my cvsups all today) 2002-01-03 23:33:44 +00:00
vinum Don't call cdevsw_{add,remove}(). 2001-11-04 11:55:19 +00:00
vr Remove printf's on mbuf/cluster allocation failures. There are now 2001-12-14 05:56:35 +00:00
vx Quiet a variable format-string warning. 2001-07-19 02:16:24 +00:00
wds
wi put function return types on a line by themselves as per style(9) 2001-12-27 20:12:03 +00:00
wl KSE Milestone 2 2001-09-12 08:38:13 +00:00
xe Add some seat belts. If we set the error rc, then return it and don't 2001-08-29 05:11:44 +00:00