summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2010-09-06Stop sending so many superfluous IPIs: zero out pm_cpus in pmap_create(),Philip Guenthe
don't set the current cpu's bit in pmap_activate() unless we actually set %cr3, and add a DIAGNOSTIC printf to pmap_destroy() to catch if we ever stop tracking them accurately again. Also, GC the unused pm_flags member. ok deraadt@, oga@
2010-09-06cut swapping to file over from disksort to bufq fifo's andThordur I. Bjornsson
instead of doing work in the biodone callback for swapping to file I/O, schedule the work to be done by the system workq as it will call VOP_STRATEGY() in which we must be allowed to sleep. Thanks to Gabriel Kihlman for testing and spotting a bug in the first version of this diff! OK beck@, oga@
2010-09-06initialize rv to 0 in the activate functionTheo de Raadt
2010-09-06initialize rv to 0 in the activate functionTheo de Raadt
2010-09-06now that the drm issue is resolved, switch to using ca_activate callsTheo de Raadt
instead of powerhooks.
2010-09-06Fix previous.Owain Ainsworth
*sigh* Remove one assertion before you commit, then build fails with an unused variable warning. That'll teach me.
2010-09-06Rev 1.67 of intagp (agp_i810.c) was added to deal with the problemOwain Ainsworth
where stuff was bound for a software fallback while we were vt switched, so we couldn't assume that the aperture was clear. Turns out that the 855 at least does not like this (the !stolen bits of the bar at least are write-only), and this caused a gpu lockup on any suspend that used that activate handler. So this diff fixes it in a more complete way: Firstly revert 1.67 of agp_i810.c, secondly add a DVACT_QUIESCE handler to inteldrm, and in it we do three things: 1) set a flag that causes any ioctl or pagefault to sleep until the flag is cleared so that we don't end up with something doing the following (for example:) - bind object - do another blocking operation in the same ioctl/fault < suspend happens here, followed by resume> - wake up assuming that the object is still bound and continue along our merry way 2) Wait for all current entrypoints to finish (so that 1) is actually effective we need to first quiesce our callers before we continue). 3) unbind everything that is in the gtt On resume we clear the quiet flag, and everything can continue as expected. Behaves as expected for me on: 855 (x40 in acpi mode), gm965 (x61s) and arrandale (x201) over multiple suspend cycles. Also tested by several on tech.
2010-09-06- spello, short-hand -> shorthandJasper Lievisse Adriaanse
ok miod@
2010-09-06Some stupid hardware marks PCI BARs as prefetchable that aren't side-effectMark Kettenis
free. Mapping those with BUS_SPACE_MAP_PREFETCHABLE can have disastrous effects, like the NMIs observed by jsg@ with certain Intel 10Gb Ethernet devices. So stop trusting the devices and instead require drivers to explicitly pass the BUS_SPACE_MAP_PREFECTHABLE flag to pci_mapreg_map(). The pci_mapreg_info() call will continue to return BUS_SPACE_MAP_PREFECTHABLE flags for prefetchable BARs as an easy way to figure out whether a BAR is prefetchable. Since the vga_pci.c code uses this interface, all consumers of VGA BARs will still use the BUS_SPACE_MAP_PREFETCHABLE flag when appropriate. ok oga@, jsg@
2010-09-06move away from using /**/ to ## for cpp paste in sh locoreJonathan Gray
so we can drop -traditional-cpp ok miod@
2010-09-05Add an ioctl to figure out the non-sticky bits in PCI BARs used for determiningMark Kettenis
the size of those BARs. Make pcidump use this new ioctl to print the size of PCI BARs. ok deraadt@, miod@
2010-09-05Remove bogus LHS casts. makes gcc4 happy.Mark Kettenis
ok miod@
2010-09-05Make gcc4 happy. Similar to what we've done to sparc64 a couple of months ago.Mark Kettenis
ok miod@
2010-09-05Fix inline assembler to make it acceptable to gcc4. Similar to what we'veMark Kettenis
done to sparc64 a couple of months ago. ok miod@
2010-09-05Properly invoke bus_dmamap_sync() around the ring descriptors. No functionalMiod Vallat
change.
2010-09-04revert previous "simplification". kcornies at gmail says it doesn't work.Ted Unangst
2010-09-04Remove redundant prototype left behind by deraadt@Mark Kettenis
2010-09-04Off-by-two in the length check for CISTPL_CONFIG tuples.Miod Vallat
2010-09-04Use pcmcia_cis_read_1() to read cis data to be checksummed, instead ofMiod Vallat
trying to roll our inline version of it and fail. Fixes `checksum error' warnings on all the cards with checksum tuples I could find (admittedly not many), and probably fixes all of them since this code has never been correct in the first place.
2010-09-04Add support for indirect CIS data (CISTPL_INDIRECT tuple).Miod Vallat
2010-09-04Let se(4) support SiS191, and bring a lot of bugfixes and improvements fromMiod Vallat
FreeBSD.
2010-09-03Some cleanup in preparation for suspend/resume improvements.Mark Kettenis
2010-09-03bus_dmamap_sync() freshly initialized Rx descriptors before flipping the bitMark Kettenis
that hands them over to the hardware. This prevents the hardware from seeing stale contents if the compiler decides to re-order stores or if the hardware does store-reordering. There are sme doubts whether the i386/amd64 bus_dmamap_sync() implementation will be able to convince future compilers that do even more insanely stupid optimizations from re-ordering stores. That will be addressed in a seperate patch. ok matthew@, sthen@, oga@
2010-09-03fix initialization value of analog register AR_AN_TOP2 on some highDamien Bergamini
power AR9220 adapters. this should fix at least Ubiquiti SR71-12 and Winstron DMNA92 adapters. problem reported by Giuseppe Scalzi and Alex Dervish fix tested by Giuseppe Scalzi with a Winstron DMNA92
2010-09-03Use MPLS_INKERNEL_LOOP_MAX instead of 16 when initializing mpls_inkloop.Claudio Jeker
2010-09-03thib insists i take responsibility tooDavid Gwynne
2010-09-02the page_length field in the vpd page header is 2 bytes, not 1.David Gwynne
ok krw@ marco@ matthew@
2010-09-02don't attempt to enqueue routing messages on sockets marked SS_CANTRCVMOREBret Lambert
ok claudio@
2010-09-02Inline bufq_impl_disksort and bufq_impl_fifo's definitions intoMatthew Dempsky
bufq_impls. Also, make bufq_impls const. ok dlg@
2010-09-01Don't give xs->resid an invalid value (xs->datalen * st->blksize)Kenneth R Westerback
inside st_interpret_sense() and then exit without making sure it's set back to <= xs->datalen. Fixes 'done < 0; strategy broken' panics when un-tar'ing /cvs from my ahci DAT tape drive. ok dlg@ more-or-less-ok matthew@
2010-09-01After all escape sequence processing, check for being beyond the lastNicholas Marriott
column and and clear VTFL_LASTCHAR if so. This fixes the case where an escape sequence (originally noticed with DECSTBM) moves the cursor and doesn't reset the flag - if it was set, there would be a spurious line feed on the next input. ok miod
2010-09-01Do not panic in parsedisk() for ``second class'' block devices (which we can'tMiod Vallat
root off), return NULL instead.
2010-09-01There is no point doing wakeups in bufq_done() unless we're actually in theMark Kettenis
process of quiescing I/O. ok dlg@
2010-09-01Clarify why we can walk the list of bufqs without holding a mutex with aMark Kettenis
comment.
2010-09-01Fix typo in vgafb_mmap(), causing a comparison to always fail. ok kettenis@Miod Vallat
2010-09-01Clean-up the spl dance around suspend/resume. Okay miod@.Paul Irofti
2010-09-01Failure to attach a pcmcia driver could leave the function to be disabledMiod Vallat
after config_found() returns; check for this and do not invoke pcmcia_ccr_read() on a disabled function in the following DPRINTF. No change for kernels without option PCMCIADEBUG.
2010-09-01Let non-ykbec kernels link again.Miod Vallat
2010-09-01Restore compilability after bufq changesMiod Vallat
2010-09-01ata information vpd page idDavid Gwynne
2010-09-01make struct bufq a member of the softc for devices that use it,David Gwynne
rather than it being a pointer to something that needs to be allocated at attach. since all these devices need a bufq to operate, it makes sense to have it allocated as part of the softc and get bufq_init to just initialise all its fields. it also gets rid of the possibility that you wont be able to allocate the bufq struct during attach, which is something you dont want to happen. secondly, it consistently implements a split between wrapper functions and the per discipline implementation of the bufq handlers. it consistently does the locking in the wrappers rather than doing half in the wrappers and the other half in the implementations. it also consistently handles the outstanding bufq bq pointer in the wrappers. this hides most of the implementation inside kern_bufq.c. the only stuff left in buf.h is for the bits each implementation needs to put inside struct buf. tested by thib@ krw@ and me ok thib@ matthew@ no objection from krw@
2010-08-31syncStuart Henderson
2010-08-31add id for BCM5719; from Linux tg3 driver via BradStuart Henderson
2010-08-31remove argnames from prototype.Owain Ainsworth
no binary change.
2010-08-31convert the powerhook to an activate function. That activate functionTheo de Raadt
does not truly work yet many machines because it does not do enough; it is a total fluke if it works for you. (kettenis is, I think, working on improving it) ok kettenis
2010-08-31Do wsdisplay suspend/resume and also the bufq dance.Paul Irofti
Reminded by oga@, okay deraadt@.
2010-08-31remove a comment suggesting that azalia needs a powerhookTheo de Raadt
2010-08-31Add DVACT_QUIECE support. This is called before splhigh() and beforeTheo de Raadt
DVACT_SUSPEND, therefore DVACT_QUIECE can do standard sleeping operations to get ready. Discussed quite a while back with kettenis and jakemsr, oga suddenly needed it as well and wrote half of it, so it was time to finish it. proofread by miod. (missed file)
2010-08-31Add DVACT_QUIECE support. This is called before splhigh() and beforeTheo de Raadt
DVACT_SUSPEND, therefore DVACT_QUIECE can do standard sleeping operations to get ready. Discussed quite a while back with kettenis and jakemsr, oga suddenly needed it as well and wrote half of it, so it was time to finish it. proofread by miod.
2010-08-31When cardbus is fixed, this will be able to use dc_activate directlyTheo de Raadt
(I stronly hope that cardbus needs no bus-specific wrappers!)