summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2011-06-02Initialize the dv_unit, because disk_attach will want it later. BeforeTheo de Raadt
we were probably only ever reading labels off vnd0. Oops. Spotted by matthew
2011-06-02Do not bzero the softc when doing VNDIOCCLR, because that trashes theTheo de Raadt
rw_lock and the device_ref Discussed with thib and matthew
2011-06-02MSI for wpi(4).Michael Knudsen
``Reasonably confident that will work on all hardware, go ahead and commit.'' kettenis (worst jinx ever)
2011-06-02Enable MSI.Mark Kettenis
"i think more pci_intr_map_msi should go in"
2011-06-02Add $OpenBSD$ after oga said 'go ahead and fix that'Paul de Weerd
'go for it' oga@
2011-06-02Move the code that disables MSI out of azalia_configure_pci(), such that weMark Kettenis
don't run it upon resume. We now save and restore the MSI registers in the generic PCI code, so it is no longer necessary and will hurt us when we actually start using MSI. ok jakemsr@
2011-06-02Fix CondRef definition to support optional target. Fixes docking on Dell E4310Jordan Hargrave
ok marco@
2011-06-02Attempt msi interrupt mapping, with fall back to old-style mapping. WorksKenneth R Westerback
on my non-msi capable ahci and several msi capable setups. Dark suspicions that some will NOT work so put it in to smoke any such systems into the open. ok deraadt@ mk@ kettenis@
2011-06-02We will ignore retval2; it is not an issueTheo de Raadt
2011-06-02Change ktr_retval to a register_t so that we can see the full 64-bitsTheo de Raadt
when neccesary. It is incredible this 64-bit bug has existed for this long. ok miod
2011-06-02device_ref() by hand, since this is a pseudo-device and was not attachedTheo de Raadt
through config_attach() ok matthew jsing
2011-06-02Small refactoring of atascsi and fix non-data ATA commands to not setMatthew Dempsky
ATA_F_PIO or ATA_F_READ. ok dlg@
2011-06-01Oops, I broke randomness. (Please upgrade, this is _bad_.)Ariane van der Steldt
sel_addr &= ~(pmap_align - 1); with pmap_align allowed to be 0 (no PMAP_PREFER) is a bad idea. Fix this by a conditional. ok oga@
2011-06-01Add device_ref/device_unref calls to prevent a possible use-after-freeMatthew Dempsky
issue in disk_attach_callback. Assumes that the struct disk is part of the driver's softc, but this is always true in practice. Still other scary use-after-free races lying around here though... ok jsing@, deraadt@
2011-06-01Make uk(4) look more like sd(4) and cd(4) by adding a uklookup()Matthew Dempsky
wrapper for device_lookup(), and renaming the uk local variables to sc. ok krw@
2011-06-01regeneratePhilip Guenthe
2011-06-01Mark some system calls that don't require big lock with NOLOCKPhilip Guenthe
ok matthew@, deraadt@
2011-06-01sys_getpid() isn't really NOLOCK safe, as the compat bits inside it requirePhilip Guenthe
the p_pptr member to stay valid ok dlg@, matthew@, deraadt@, kettenis@, and others
2011-06-01Kill the nearly-15-years-dead cf_ivstubs field from struct cfdata.Matthew Dempsky
ok miod@, deraadt@ N.B.: If you're following -current, you MUST recompile config(8) and re-config your kernel or else ioconf.c will fail to compile.
2011-06-01Add a few KASSERTs to config_attach() for sanity to make sure we don'tMatthew Dempsky
try to reuse device unit numbers and to check that the device pointer array is allocated and large enough. Also, improve the panic message generated by config_detach() when we detect that we're detaching a device that still has children. Discussed with deraadt@ while trying to brainstorm ways that interleaving config_attach and config_detach could blow up.
2011-05-31regenMark Kettenis
2011-05-31There is a desktop version of the SR5690 northbridge after all and the thereMark Kettenis
is some evidence that its name really is RD890. Add back an entry for it such that krw@ doesn't have an unknown device in his demsg.
2011-05-31The various cleanups of the last few years have fixed pnozz(4) accelerationMiod Vallat
code operation in 640x480 mode (very likely p9100.c r1.47), so enable it again by default. Verified to work on a SPARCbook 3XP (with a 640x480 LCD panel), thanks to Thibaud Bordier.
2011-05-31Change a few of the more common disk drivers (sd, cd, wd, rd, and vnd)Matthew Dempsky
to return EBUSY if the user tries to modify an open partition's offset or size. Only sadness can result if a user tries this, and rejecting it prevents a race between sdstart() and sdstrategy(). Curiously, there was already code in the kernel and in disklabel(8) to detect/handle this, but it was effectively disabled because the disk drivers always used something like "/* sc->sc_dk.dk_openmask */ 0", and this commented out code has existed since even r1.1 in NetBSD. I had no problems building a release and messing around with disklabel(8) for a bit with this diff. Canarying the more common MI disk drivers until we gain confidence that there aren't any regressions, then we can switch the remaining drivers. "I am surprised you got me convinced that this stuff is safe" deraadt@ ok krw@
2011-05-31fix typos in commentStuart Henderson
2011-05-31Family 14h also supports the km(4) temperature sensorTheo de Raadt
from brad
2011-05-30Force full resets always for now.Owain Ainsworth
While it would be best if we never needed to reset the gpu people hate losing their X sessions. Sometimes on gm45 it seems that the render engine reset doesn't work properly, so force a full chip reset in those cases not just the cases that require it.
2011-05-30Remove the freelist member from vm_physsegOwain Ainsworth
The new world order of pmemrange makes this data completely redundant (being dealt with by the pmemrange constraints instead). Remove all code that messes with the freelist. While touching every caller of uvm_page_physload() anyway, add the flags argument to all callers (all but one is 0 and that one already used PHYSLOAD_DEVICE) and remove the macro magic to allow callers to continue without it. Should shrink the code a bit, as well. matthew@ pointed out some mistakes i'd made. ``freelist death, I like. Ok.' ariane@ `I agree with the general direction, go ahead and i'll fix any fallout shortly'' miod@ (68k 88k and vax i could not check would build)
2011-05-30Enable MSI.Mark Kettenis
tested by weerd@
2011-05-30Add mmuagp. a driver for the agp chipsets on early amd64 machines.Owain Ainsworth
This agp hardware uses the on-chip GART built into amd cpus and a southbridge bit of hardware to handle the rest (hence mmu) most osen call this agp_amd64 or similar, but openbsd has no numbers in device names. Ported this from free/netbsd and adapted to our agp subsystem years ago but never was commited due to conflicting with the now dead iommu code. Tested by at least Tom Murphy, matthieu@ (who has been using it for literally years) and kettenis@. ``just commit it'' deraadt@
2011-05-30Add RADEON_CS ioctl support for r600 and r700.Owain Ainsworth
This is a faked up version of the gem command submission method for r600 required for OpenGL support on these chipsets. Currently support is not perfect. since these chips have a rather funky ringbuffer based interrupt method which this code does not yet support so interrupt based polling methods must be turned off in mesa. I've not found a good way which to do that per-driver, so until I work that out I the following .drirc (or /etc/drirc) chunk (provided by Brynet after I was too slack to provide it myself) will be needed: <driconf> <device screen="0" driver="r600"> <application name="all"> <option name="fthrottle_mode" value="0"/> <option name="vblank_mode" value="0"/> </application> </device> </driconf> Tested by many on tech@. While it provided more problems, this diff made espie@ stop nagging me when he finally found out it existed.
2011-05-30for (some; stuff; here)Owain Ainsworth
; instead of for (some; stuff; here); reads easier. ok ariane@
2011-05-30s/hart/heart/ to make more sense (another dutchism).Owain Ainsworth
ok ariane@
2011-05-30Enable MSI on inteldrm.Owain Ainsworth
Disable it explictly for i945g and i945gm because according to linux (which is written by intel people) msi is buggy as hell on that chipset. ok kettenis@
2011-05-30Remove vndshutdown. It is unused.Owain Ainsworth
``sure'' deraadt@
2011-05-30Remove unused ACB_ALLOC define.Miod Vallat
2011-05-30Enable MSI on selected hardware. For now this means all Intel, AMD and NVIDIAMark Kettenis
chipsets. All of those that support 64-bit CPUs should support MSI as well. Explicitly disable MSI on chipsets that connect to the CPU over HyperTransport. Enabling MSI on those systems is handled by the HyperTransport support code in our PCI subsystem.
2011-05-30Enable MSI on selected hardware. For now this means:Mark Kettenis
- Intel chipset supporting Pentium 4 or later. - Any AMD chipset made in this century. - Any NVIDIA chipset that has PCIe. Explicitly disable MSI on chipsets that connect to the CPU over HyperTransport. Enabling MSI on those systems is handled by the HyperTransport support code in our PCI subsystem.
2011-05-30Enable MSI for HyperTransport devices that have MSI remapping enabled.Mark Kettenis
2011-05-30Kthread_create is a kernel function so use kprintf format attribute instead.Martynas Venckus
OK millert@.
2011-05-29Add MSI support.Mark Kettenis
ok dlg@, oga@
2011-05-29regenMark Kettenis
2011-05-29Shorten a couple of old Intel chip names for consistency. Should save a fewMark Kettenis
bytes as a bonus.
2011-05-29Replace the lower bound PAGE_SIZE with VMMAP_MIN_ADDR.Ariane van der Steldt
This makes writing a diff that makes 64-bit unclean applications explode a one-line diff. ok deraadt
2011-05-29regenMark Kettenis
2011-05-29Add a few missing ATI chipset entries (and fix one since we prefer the chipMark Kettenis
names used in the documentation over marketing names).
2011-05-29Fix parameter range clamping in vmmap routines.Ariane van der Steldt
The old VM_MAP_RANGE_CHECK macro was wrong and caused code to be unreadable (argument altering macros are harmful). Each function now treats the memory range outside the map as it would treat free memory: if it would error on being given free memory, it'll error in a similar fashion when the start,end parameters fall outside the map. If it would accept free memory in its argument range, it'll silently accept the outside-map memory too. Confirmed to help ports build machines.
2011-05-29syncTheo de Raadt
2011-05-29Use k1x cpu scaling on all families 0x10 and above (the trend is likely toTheo de Raadt
continue); makes the AMD E-350 speed adjust (from slow to way slower). discussion with jsg.
2011-05-29pcidevs.hTheo de Raadt