summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2011-04-19Include USB vendor and product ids when manufacturing a unique disk idMatthew Dempsky
from a USB serial number, as recommended by the umass spec. ok dlg@
2011-04-18Revert the sigacts diff: NFS can apparently retain pointers to processesPhilip Guenthe
until they're zombies and then send them signals (for intr mounts). Until that is untangled, the sigacts change is unsafe. sthen@ was the victim for this one
2011-04-18Put back the change of pool and malloc into the new km_alloc(9) api.Artur Grabowski
The problems during the hackathon were not caused by this (most likely). prodded by deraadt@ and beck@
2011-04-18remove the old style by-pass-the-buffer-cache vnd code.Thordur I. Bjornsson
this will treat vndX the same as svndX. ok and gcc2 fixes from deraadt@
2011-04-18ido not disable interrupts in the isr and then enable them againDavid Gwynne
when leaving. when you're handling an interrupt it is masked. whacking the chip is work for no gain. modify the interrupt handler so it only processes the rings once rather than looping over them until it runs out of work to do looping in the isr is bad for several reasons: firstly, the chip does interrupt mitigation so you have a decent/predictable amount of work to do in the isr. your first loop will do that chunk of work (ie, it pulls off 50ish packets), and then the successive looping aggressively pull one or two packets off the rx ring. these extra loops work against the benefit that interrupt mitigation provides. bus space reads are slow. we should avoid doing them where possible (but we should always do them when necessary). doing the loop 5 times per isr works against the mclgeti semantics. it knows a nic is busy and therefore needs more rx descriptors by watching to see when the nic uses all of its descriptors between interrupts. if we're aggressively pulling packets off by looping in the isr then we're skewing this check. ok deraadt@
2011-04-18since the pciide driver's interrupt handler can return -1 during hotplugTheo de Raadt
eject events, then the ppb's interrupt handler can be run at IPL_BIO. This makes a huge difference on modern server with mpi/bge/bnx. In snapshots for about 2 weeks now...
2011-04-18keep an eye out for wdc registers returning 0xff. if they return 0xff,Theo de Raadt
this probably means the controller is dead -- as in, a hot plug eject event. in that case, mark the driver dead and try harder to return -1 in the interrupt handler. tested by many ok dlg, miod did not object
2011-04-18Change all aml_xfoo to aml_foo names now that parser is stableJordan Hargrave
2011-04-17if mpath is disabled in config or ukc, then prevent path drivers fromDavid Gwynne
attaching since theyre useless without mpath. the path drivers ask mpath if its ok to use the device before doing their own matches (this is so mpath can prevent paths attaching to itself), so im just adding this check there. this uses code from miod to walk cfdata for the mpath entry and then checks its state. this is ok because mpath is only attached in one place, so there arent multiple cfdata entries for it. ok krw@ deraadt@ miod@ matthew@
2011-04-17Add wol support to xl(4). Not really tested, but hopefully someone willStefan Sperling
test it now that it's in-tree. ok deraadt ("It causes no harm")
2011-04-17in_ifinit() is not prepared to be called from interrupt context so addStefan Sperling
addresses from process context by scheduling a work queue. Fixes an assertwaitok panic. ok henning
2011-04-17Don't increase if_oerrors for every multicast frame leaving the interface.Stefan Sperling
ok deraadt
2011-04-17bigmem works well enough on amd64; we do not need the knob to turn itTheo de Raadt
off anymore. ok miod
2011-04-17construct a better path to the swapdevice (as seen in pstat/swapctl output)Theo de Raadt
ok miod
2011-04-17almost 3 years ago 'config generic' support was fixed but never used.Theo de Raadt
(pretty easy, since the bootdv is always wd0)
2011-04-17On IP27 systems, fill the array of node hub widget numbers early, so that allMiod Vallat
hubs are known during autoconf. Then, pick the most populated 2GB window as our DMA memory window. xbridge(4) can thus program the correct settings regardless of the order in which the xbow(4) attach.
2011-04-17Tweak the behaviour of boot(8) on hppa. Normal boots now will give you aMark Kettenis
chance to interrupt the boot procedure before booting the default kernel, just like (most) of our other hardware platforms. Interactive boots, where you interrupt the firmware boot procedure and answer "Y" to the "Interact with IPL?" question will now wait for human intervention at the boot> prompt (without a timeout). Should reduce frustration when trying to boot an alternative kernel. ok deraadt@, miod@, jsing@, todd@
2011-04-16Move the FPU state out of 'struct pcb' like we did for hppa since it causesMark Kettenis
evil problems with non-equivalent aliases.
2011-04-16Move the FPU state out of 'struct pcb' like we did for hppa since it causesMark Kettenis
evil problems with non-equivalent aliases.
2011-04-16Initialize %cr30 for proc0 with the address of proc0fpstate. Shouldn't reallyMark Kettenis
matter, since we shouldn't be using the FPU inside the kernel, but we need to initialize %cr30 with something, and this is more consistent than using the address of the pcb.
2011-04-16_LOCORE is already definedTheo de Raadt
2011-04-16Fix kernel build after guenther@'s signal changes.Miod Vallat
2011-04-16Use 'CLR(<buf>->b_flags, B_READ | B_WRITE | B_DONE)' regardless ofKenneth R Westerback
what the previous IO was. Less chance of copy and paste errors. Suggested by miod@.
2011-04-16Initialize variables before use.Kenneth R Westerback
2011-04-16another variable left after a commitTheo de Raadt
2011-04-16More than a decade ago, interrupt handlers on sparc started returning 0Theo de Raadt
(interrupt was not for me), 1 (positive interrupt was for me), or -1 (i am not sure...). We have continued with this practice in as many drivers as possible, throughout the tree. This makes some of the architectures use that information in their interrupt handler calling code -- if 1 is returned (and we know this specific machine does not have edge-shared interrupts), we finish servicing other possible handlers on the same pin. If the interrupt pin remains asserted (from a different device), we will end up back in the interrupt servicing code of course... but this is cheaper than calling all the chained interrupts on a pin. This does of course count on shared level interrupts being properly sorted by IPL. There have been some concerns about starvation of drivers which incorrectly return 1. Those drivers should be hunted down so that they return -1. ok and help from various people. In snaps for about a week now.
2011-04-15unused variable on !PMAP_DIRECTTheo de Raadt
2011-04-15for uvm_pager_dropcluster in the PG_RELEASED case we specifically unbusy theOwain Ainsworth
page so that um_anfree will free it for us. uvm_anfree does a pmap_page_protect(, VM_PROT_NONE) just before it frees the page, so we don't need to do it here ourselves. ok ariane@
2011-04-15move uvm_pageratop from uvm_pager.c local to a general uvm functionOwain Ainsworth
(uvm_atopg) and use it in uvm_km_doputpage to replace some handrolled code. Shrinks the kernel a trivial amount. ok beck@ and miod@ (who suggested i name it uvm_atopg not uvm_atop)
2011-04-15Add a bit of paranoia to uvm_pageinsert.Owain Ainsworth
At various times diffs have had debugging that checked that we don't insert a page into the tree on top of an existing page, leaking that page's references. Until the recent hackathon (and introduction if uvm_pagealloc_multi) the bufcache for example did a rb tree look up on insert to check (under #ifdef DEBUG || 1) so instead just check it on pageinsert every time, since RB_INSERT returns any duplicates so this check is pretty much free. ``emphatically yes'' beck@
2011-04-15When I switched uvm objects to use a per-object page tree instead of theOwain Ainsworth
global hash I forgot to remove the has declarations from struct uvm. So remove them now. pointed out by blambert@, ok beck@
2011-04-15Change wdc_reset_channel() to take a `no wait' argument. Pass in turn thisMiod Vallat
argument to wdcreset(), to have it skip waiting until active channels see their BUSY bit clear in the status register. Use this feature in the resume path, during the first reset operation. The first reset is supposed to only wake up the controller, and the disks don't come back until the second reset is issued, therefore waiting for them to report themselves as ready after the first reset, but before the second, is moot - and as a matter of fact some controllers, such as the AMD 754 and clones/offspring (e.g. Geode) keep the BUSY bit asserted after the first reset. Last, but not least, make sure wd@ata invokes wd_get_params() again before returning from the resume code, as we will still be using polled transfers for a short while. This causes the Lemote Yeelong to resume within less than one second, instead of the lousy 30 seconds wait between the two resets; and the wd_get_params() voodoo prevents it from getting spurious ide interrupts afterwards. wd_get_params() magic from dlg; rest of the work by yours truly after enough prodding by dlg@ and pirofti@, among others. ok deraadt@ dlg@
2011-04-15More than a decade ago, interrupt handlers on sparc started returning 0Theo de Raadt
(interrupt was not for me), 1 (positive interrupt was for me), or -1 (i am not sure...). We have continued with this practice in as many drivers as possible, throughout the tree. This makes some of the architectures use that information in their interrupt handler calling code -- if 1 is returned (and we know this specific machine does not have edge-shared interrupts), we finish servicing other possible handlers on the same pin. If the interrupt pin remains asserted (from a different device), we will end up back in the interrupt servicing code of course... but this is cheaper than calling all the chained interrupts on a pin. This does of course count on shared level interrupts being properly sorted by IPL. There have been some concerns about starvation of drivers which incorrectly return 1. Those drivers should be hunted down so that they return -1. ok drahn
2011-04-15More than a decade ago, interrupt handlers on sparc started returning 0Theo de Raadt
(interrupt was not for me), 1 (positive interrupt was for me), or -1 (i am not sure...). We have continued with this practice in as many drivers as possible, throughout the tree. This makes some of the architectures use that information in their interrupt handler calling code -- if 1 is returned (and we know this specific machine does not have edge-shared interrupts), we finish servicing other possible handlers on the same pin. If the interrupt pin remains asserted (from a different device), we will end up back in the interrupt servicing code of course... but this is cheaper than calling all the chained interrupts on a pin. This does of course count on shared level interrupts being properly sorted by IPL. There have been some concerns about starvation of drivers which incorrectly return 1. Those drivers should be hunted down so that they return -1. (other architectures will follow) ok kettenis drahn dlg miod
2011-04-15p_sigacts is NULL for zombies, so FILL_KPROC() and kvm_proclist() havePhilip Guenthe
to handle that with the sigacts change. problem observed and diagnosed by claudio@ and kettenis@
2011-04-15Remove the acpi event definitions. They've not been used for over aOwain Ainsworth
year. acpi needs to use the apm definitions so that apmd speaks the same language as it, so it uses the ones in apmvar.h these days. ``sure'' marco@
2011-04-15Remove dead assignment and newly created unused variable.Charles Longeau
Found by LLVM/Clang Static Analyzer. ok guenther@
2011-04-15Remove dead assignment.Charles Longeau
Found by LLVM/Clang Static Analyzer. ok claudio@
2011-04-15Remove dead assignments and one newly created unused variable.Charles Longeau
Found by LLVM/Clang Static Analyzer. ok henning@ krw@ claudio@
2011-04-15Do not check malloc return value against NULL, as M_WAITOK is used.Charles Longeau
ok pirofti@ guenther@
2011-04-15In days of yore one could arbitrarily whack buffer flags. Those daysKenneth R Westerback
are past. Use CLR() and SET() to modify necessary flags while leaving the flags used by the buffer cache in peace. Should make bufcache code much less confused about the state of the bufs used in reading/writing disklabels. Other such flag abuses no doubt await a visit. Errors in original diff found by miod@. ok beck@ deraadt@
2011-04-15Remove local variables that are no longer used after the last commitClaudio Jeker
and cause build failure. Bad guenther@ no cookies. commitski! mikeb@
2011-04-15Correct the sharing of the signal handling state: stuff that shouldPhilip Guenthe
be shared (p_sigignore, p_sigcatch, P_NOCLDSTOP, P_NOCLDWAIT) moves to struct sigacts, wihle stuff that should be per rthread (ps_oldmask, SAS_OLDMASK, ps_sigstk) moves to struct proc. Treat the coredumping state bits (ps_sig, ps_code, ps_type, ps_sigval) as per-rthread until our locking around coredumping is better. Oh, and remove the old SunOS-compat ps_usertramp member. "I like the sound of this" tedu@
2011-04-15die blank line die die dieTheo de Raadt
2011-04-15Convert the kernel Makefiles to autogenerate dependencies during compilationPhilip Guenthe
using the -MD option to cc, with -MP, -MT, and -MF where needed, converting "make depend" to a no-op. This increases parallelism for those using "make -j" and keeps the dependencies up to date with each compilation automatically. sparc and vax users will need to rebuild gcc with support for the -M[PTF] options before config'ing with this diff.
2011-04-14add support for VIA VT6415 & VX900 IDEJonathan Gray
2011-04-14regenJonathan Gray
2011-04-14VIA VX900 IDEJonathan Gray
2011-04-14the mechanical part of 82580 support, more to comeJonathan Gray
ok claudio@
2011-04-14Add several additional adapter types and correct definition ofJonathan Gray
RTL8103E, from FreeBSD. ok sthen@