summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2008-11-23correct some typos in the commentsFelix Kronlage
2008-11-23Use the new and shiny nitems().Marc Balmer
2008-11-23When accessing cached routes make sure the route is actually still valid.Claudio Jeker
Before accessing a ro_rt make sure the route is either freshly allocated or RTF_UP is set. If not ro_rt should be freed and reallocated or at least no info from the ro_rt should be considered valid. This seems to solve the crashes seen by Felipe Alfaro Solana. some sort of OK dlg@
2008-11-23sizeofa -> nitemsDavid Gwynne
2008-11-23sizeofa -> nitemsDavid Gwynne
2008-11-23sizeofa -> nitemsDavid Gwynne
2008-11-23sizeofa is now nitems in param.h, so dont declare my own in mpi.c it wasDavid Gwynne
unused there anyway. use nitems in mpi_pci_match.
2008-11-23this adds:Theo de Raadt
#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0])) in the kernel, you can now use this instead of torturing yourself. ok dlg, well, really i just finally gave in to his arguments and we choose a better name than sizeofa().
2008-11-23Don't use ifp->if_xname if you can use the sc_dev.dv_xname instead.Claudio Jeker
Removes some unneeded ifp pointers from the stack and don't assign ifp->if_softc twice in the same function.
2008-11-23syncTheo de Raadt
2008-11-23newTheo de Raadt
2008-11-22using ``wait queues' for sleep is a linuxism. Kill them and just sleepOwain Ainsworth
on the softc.
2008-11-22Make all drm drivers map their mmio register space on attach instead ofOwain Ainsworth
using the drm_maps interface (this was done for inteldrm a few days ago). All drivers now ignore the mmio_offset argument that the init ioctl takes. This clears up the code and makes sure that drm_ioremap_core() doesn't need the vga_pci_map inteface anymore, so we don't have to pass in the vga softc anymore. We also get to kill the drm_resource_{start,length} linux-alike functions since we just calculate all the requisite offsets at startup and cache those we need. This now means that technically the only driver that needs the vga_pci_map api is inteldrm (due to sharing with intagp issues), though this diff doesn't convert them over.
2008-11-22Allow rt_msg1() to get a NULL as struct rt_addrinfo this simplifies a fewClaudio Jeker
callers (plus an upcomming one). OK henning@, dlg@
2008-11-22drm_device_is_pcie is only needed in one place: radeondrm_attachOwain Ainsworth
so just inline it there. also remove dev->pci_vendor and dev->pci_device, and insert pci_device into the one place any of them are needed (inteldrm's interface can give this info to the X driver. to remove that you'd need to fix X too).
2008-11-22Move the drm drivers over from:Owain Ainsworth
vga1 at pci0 inteldrm0 at vga1 to vga1 at pci0 inteldrm0 at vga1 drm0 at inteldrm0 i.e. a similar scheme to audio(4) where the interface attaches on top of the wildly different drivers. This helps to clean up the code a lot (more is coming) and help me start to move drm to being essentially bus independent, which will help in the future.
2008-11-22Remove the driver->load callback and just do all the initialization inOwain Ainsworth
the attach function. First step towards splitting drm off as it's own (bus independant) device, as it should be.
2008-11-22perform bus_dmamap_syncs on the rx mbufs. this is obviously maintained byDavid Gwynne
monkeys. found by toby's bounce buffers. ok krw deraadt uwe fwk matthieu, drahn, mbalmer, robert, yuo, ratchov, claudio, rainer, art.
2008-11-22Allow wired memory to be accounted on i386. This automatically changesMike Belopuhov
the policy for the mlock(2) on this architecture: all users are allowed to call mlock, while the limit is imposed by the current RLIMIT_MEMLOCK value. "makes sense" art, ok hshoexer (who was running with the same change for about 10 months).
2008-11-22The last parts of cpu_unidle. i386, amd64 and sparc64Artur Grabowski
In short, make cpu_unidle do what signotify used to do and make signotify use cpu_unidle. Also, include a cpu_unidle in need_resched, it won't change much right now but will be needed in the future.
2008-11-22same change as for amd64. Move bus_space_* functions from inlines andOwain Ainsworth
defines into real functions. since machdep.c is cluttered as it is move them into bus_space.c (like amd64). a later commit will move the stuff from machdep across too. since machdep.c is cluttered as it is move them into bus_space.c (like amd64). a later commit will move the stuff from machdep across too. some shrinkage stats: GENERIC.MP 209.66kb RAMDISK 50.84kb RAMDISKB 50.04kb RAMDISC 36.28kb RAMDISK_CD 168.03kb don't fill it up all at once! claudio found no network performance hit. toby thought the code went looked alright. art@ ok.
2008-11-22Do deadbeef-style protection in pools too, by default, even though it itTheo de Raadt
is a lot slower. Before release this should be backed out, but for now we need everyone to run with this and start finding the use-after-free style bugs this exposes. original version from tedu ok everyone in the room
2008-11-22Some nVidia MCP77 AHCI controllers need special handling. There's 12Mike Belopuhov
PCI ID's for MCP77 in our database, but to stay on a safe side, this change affects device 0x0ad4 only. Other ones could be added later. Problem reported and fixed tested by gilles@ on Acer Aspire X3200. ok dlg
2008-11-22freq is specific to APM, and it is reaching out to grab the APM variable,Dale Rahn
however this global variable doesn't exist with out apm, ifdef the variable.
2008-11-22scoop is specific to zaurus, it should have some other mechansim toDale Rahn
make this associate, however ifdef zaurus it for now.
2008-11-22Stop a possible race in hci_enable()Uwe Stuehler
2008-11-22Re-enable ACPI PDC support and fetching cpu performance statesGordon Willem Klok
from ACPI for est on amd64. This incorporates a few changes from krw@ to fix minor nits, its unlikely to fix the problems with some machines from acer and dell but lots of machines benefit. ok krw@
2008-11-22Fix a wrong comment.Marc Balmer
2008-11-22reduce the dependancy of drm_pci_alloc upon the drm device softc. JustOwain Ainsworth
pass in the dma tag
2008-11-22cpu_unidle for macppcArtur Grabowski
ok drahn@
2008-11-22cast pointer to correct type before passing it to bus space. Noticed whileOwain Ainsworth
de-inlining i386 bus_space. ok weingart@
2008-11-22Move diagnostic assertions concerning the recycle process of buffersPedro Martelletto
from getnewbuf() to buf_put(), since getnewbuf() does not directly recycle buffers anymore. While at it, remove two lines of dead code from getnewbuf(), which used to disassociate a vnode from a buffer. "just go for it, because everyone had a chance" deraadt@.
2008-11-22com not pccom; ok miodTheo de Raadt
2008-11-22com, not pccomTheo de Raadt
2008-11-22potentially com, not pccomTheo de Raadt
2008-11-22some cosmetics and changes based on reading newer docs, from the originalTheo de Raadt
author Johann Christian Rode
2008-11-22- Slight wording tweak.. leave -> let.Brad Smith
- Sync wpi(4)'s set_key comment with the comment from iwn(4). ok damien@
2008-11-22Remove dev->id_entry, it is no longer needed.Owain Ainsworth
2008-11-22Slightly fix up previousOwain Ainsworth
2008-11-22inteldrm currently checks the pcidev of the device every time it needs to checkOwain Ainsworth
what revision it is to determine which route to take. instead, use the flags field of the pcidevs array to provide a static list of flags related to series, type, and certain features and check those instead. Makes me less sad and knocks another 600 bytes off my kernel.
2008-11-22Remove the strings from the pcidevs arrays. they are no longer needed and areOwain Ainsworth
just wasting space.
2008-11-22Sync bluetooth with NetBSDUwe Stuehler
2008-11-22switch all of the drm drivers over to using the defines from pcidevs.Owain Ainsworth
Furthermore, move the list of pcidevs from drm_pciids.h (in macros!), to the array in the driver file. The strings are left in the array for now, but will go in the next commit
2008-11-22syncOwain Ainsworth
2008-11-22Pull in all the pcidev discrepancies from drm_pciids.h in dev/pci (whichOwain Ainsworth
is soon to die). "lovely" deraadt@, ok brad@. Both also helped with suggestions.
2008-11-21Relax sanity check so any two-byte jmp followed by a NOP, or anyKenneth R Westerback
three-byte jmp will be acceptable as the preamble to a FAT boot sector for the purposes of spoofing an 'i' partition. Problem noted most recently by mbalmer@. Fixes mbalmer@, fkr@ and jmc@'s Nokia E71 phones. "seems silly" tedu@ "disgusting" deraadt@ "makes sense" fkr@ ok jmc@ "looks ok" weingart@
2008-11-21de-inline the bus_space_* functions in favour of real functionsOwain Ainsworth
This shaves 135.7kb from amd64 GENERIC.MP. An afternoons worth of testing proved to art, toby and myself that this doesn't slow things down. i386 will follow shortly. ok weingart@
2008-11-21move Option Globetrotter GT Fusion from ubsa(4) to umsm(4) since itFelix Kronlage
does CDC. discussed with yuo@ and jsg@.
2008-11-21no, amd64 does not have pccom; ok dlg with gleeTheo de Raadt
2008-11-21Change rn_mpath_next() to be able to walk over the full multipath listClaudio Jeker
not only over routes of the same prio. This makes it possible to modify rt_mpath_matchgate() so that if only gateway is specified without a specific priority it will scan the full list and not only the first routes. This is also needed for upcoming link state tracking.