summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2014-04-01Move some duplicated code implementing Linux compatibility APIs and stick itMark Kettenis
in a seperate header file. This will become a dumping ground for similar code. ok jsg@
2014-04-01More <uvm/uvm.h> -> <uvm/uvm_extern.h> cleaning.Martin Pieuchot
ok kettenis@, deraadt@
2014-04-01Define intptr_t in <unistd.h> as specified by POSIXMatthew Dempsky
ok millert
2014-03-31Fix octal constant: "\018" -> "\020"Matthew Dempsky
ok guenther
2014-03-31Slightly better debugging code.Mark Kettenis
2014-03-31Use extent_alloc_with_descr(9) and add a mutex to protect the extent.Mark Kettenis
This should make bus_dmamap_load(9) and bus_dmamap_unload(9) "mpsafe". As a bonus this gets rid of a potential memory allocation in the IO path. ok miod@
2014-03-31Due the virtually indexed nature of the L1 instruction cache on most mipsMiod Vallat
processors, every time a new text page is mapped in a pmap, the L1 I$ is flushed for the va spanned by this page. Since we map pages of our binaries upon demand, as they get faulted in, but uvm_fault() tries to map the few neighbour pages, this can end up in a bunch of pmap_enter() calls in a row, for executable mappings. If the L1 I$ is small enough, this can cause the whole L1 I$ cache to be flushed several times. Change pmap_enter() to postpone these flushes by only registering the pending flushes, and have pmap_update() perform them. The cpu-specific cache code can then optimize this to avoid unnecessary operations. Tested on R4000SC, R4600SC, R5000SC, RM7000, R10000 with 4KB and 16KB page sizes (coherent and non-coherent designs), and Loongson 2F by mikeb@ and me. Should not affect anything on Octeon since there is no way to flush a subset of I$ anyway.
2014-03-31In uvm_fault(), when attempting to map backpages and forwpages, deferMiod Vallat
the pmap_update() to the end of the loop, rather than after each loop iteration - which might not even end up invoking pmap_enter()! Quiet blessing from guenther@ deraadt@
2014-03-31Grab the kernel lock before autoconf. This way device drivers can drop it inMark Kettenis
any context if they feel like it. ok deraadt@, guenther@ (who both suggested we could probably grab it even earlier)
2014-03-31Including <uvm/uvm_extern.h> is enough, no need for <uvm/uvm.h> or more.Martin Pieuchot
2014-03-31Force the detach of all USB devices by disconnecting the root hubsMartin Pieuchot
before suspending the machine. Prior to this commit, devices were logically disconnected after resuming the machine leading to funny races since the controller was reset in between. ok deraadt@
2014-03-31Change the order of operations during a suspend/resume cycle andMartin Pieuchot
call bufq_quiesce() after executing the DVACT_QUIESCE handlers. This should be safe since no disk nor controller drivers have such handler but it will allow us to detach sd(4) devices attached to a USB bus. Another benefit pointed out by kettenis@ is that drivers that need to read a firmware from the disk should be able to do it at resume time in a DVACT_WAKEUP handler. ok kettenis@, deraadt@
2014-03-31Rather than scanning local loop ids sequentially, just ask the chip whichJonathan Matthew
local devices it has logged in to. This will also be useful for hotplug later on.
2014-03-31qle dvas straddle 4 byte boundaries, so best to treat them as twoDavid Gwynne
u_int32_ts rather than u_int64_ts. ok jmatthew@
2014-03-31the hardware expects ahci_cmd_table to be 128 byte alignedDavid Gwynne
2014-03-31move the last htoleXX things to htolemXX where possible.David Gwynne
ok jmatthew@
2014-03-31ahci dva things are 64bit and surprisingly aligned nicely to 64bit too.David Gwynne
ok jmatthew@
2014-03-31give up on isp, and only use ql[wae]Theo de Raadt
Be a bit cynical about firmware fitting, of course.. ok jmatthew
2014-03-31replace bzero with memsetDavid Gwynne
2014-03-31massage the prdt (what an sgl is on every other chip) loading withDavid Gwynne
better ops and alignment. ok jmatthew@ who was cruel and made me test hibernate before he oked it.
2014-03-31dva on ahci is 64bitDavid Gwynne
2014-03-30Eliminates struct pcred by moving the real and saved ugids intoPhilip Guenther
struct ucred; struct process then directly links to the ucred Based on a discussion at c2k10 or so before noting that FreeBSD and NetBSD did this too. ok matthew@
2014-03-30Close the kernel fd before attempting to load /etc/random.seed, and reopen itMiod Vallat
afterwards, for some prom misbehave if the network interface is opened twice; repairs boot.net operation on at least SS5 PROM v2.21; found the hard way by sebastia@. Crank boot version; verified not to hurt disk boot.
2014-03-30Drop isp(4) to make the kernel fit again.Mark Kettenis
ok deraadt@
2014-03-30drm/radeon: disable pll sharing for DP on DCE4.1Jonathan Gray
From Alex Deucher 2e673e623ba5a604c02fadcad9bf75e6a0ee9705 in ubuntu 3.8 9ef4e1d000a5b335fcebfcf8aef3405e59574c89 in mainline linux
2014-03-30drm/radeon: fix missing bo reservationJonathan Gray
From Christian Koenig ea0e5ee12a70badcdfee846bfaf5d4338dc285ca in ubuntu 3.8 5e386b574cf7e1593e1296e5b0feea4108ed6ad8 in mainline linux
2014-03-30drm/i915/dp: add native aux defer retry limitJonathan Gray
From Jani Nikula b4cdadf2591e12c61f895556cf93a8b61a36892c in ubuntu 3.8 f51a44b9a6c4982cc25bfb3727de9bb893621ebc in mainline linux
2014-03-30drm/i915/dp: increase native aux defer retry timeoutJonathan Gray
From Jani Nikula 6048560066737a87621b9169ef4bdab0e3cef620 in ubuntu 3.8 04eada25d1f72efdecd32d702706594f81de65d5 in mainline linux
2014-03-30drm/i915: Prevent MI_DISPLAY_FLIP straddling two cachelines on IVBJonathan Gray
From Ville Syrjala 0828f7607cee51cabf00b984dad3a8ef200beb41 in ubuntu 3.8 f66fab8e1cd6b3127ba4c5c0d11539fbe1de1e36 in mainline linux
2014-03-30drm/i915: Add intel_ring_cachline_align()Jonathan Gray
From Ville Syrjala 0320c449d2a820ed2a1972e23d8f20f8024a5872 in ubuntu 3.8 753b1ad4a281b0663329409d410243e91825c323 in mainline linux
2014-03-30correct the value of DRM_MAJOR for non i386 platformsJonathan Gray
ok matthieu@
2014-03-29Update the loongson codebase to recognize the so-called `EFI-like' interfaceMiod Vallat
supposedly provided by newer PMON firmware (on Loongson 2Gq and Loongson 3A systems).
2014-03-29It's been a quarter century: we can assume volatile is present with that name.Philip Guenther
ok dlg@ mpi@ deraadt@
2014-03-29Do not play with the xmapmode register, for its layout seems to differ betweenMiod Vallat
board revisions < 4 (found on Indigo) and >= 4 (found on Indy and Indigo2). Paint the cursor as an inverted glyph, instead of exchanging bg and fg colours (matching the current practice on other frame buffers). Speed-up overlapping copy operations by attempting to perform them in larger chunks whenever possible; this speeds up console jump scrolling.
2014-03-29Kill pflowproto 9, it's unfixable post 2038, a better, standardizedFlorian Obser
option is pflowproto 10. Also it duplicates a lot of code from pflowproto 10 and will get in the way in the future. OK benno@
2014-03-28if you split a 64bit thing into two 32bit halves, it helps to writeDavid Gwynne
half of the source value to both the hi and lo parts. writing both of the source halves to just lo isnt going to work good. found by naddy@. sorry guys.
2014-03-28Reduce uvm include madness. Use <uvm/uvm_extern.h> instead ofMartin Pieuchot
<uvm/uvm.h> if possible and remove double inclusions. ok beck@, mlarkin@, deraadt@
2014-03-28Add commented out entries for xhci(4).Brad Smith
ok mpi@
2014-03-28Do not declare a struct as const if we write to it, fix build on sparc64Martin Pieuchot
reported by brad@.
2014-03-28If a command is submitted when the hardware is already gone, it willMartin Pieuchot
obviously time out. That is what happen when pipes are closed after unplugging an xhci(4) express card for example. In such case, make sure the command TRB is reset.
2014-03-28revert "Retire kernel support for SO_DONTROUTE" diff, which does bad thingsStuart Henderson
for localhost connections. discussed with deraadt@
2014-03-28specify at least the alignment the hardware requires, and in some casesDavid Gwynne
the alignment the driver guarantees. with and ok jmatthew@
2014-03-28enable mpath plus sym and rdac on some archs so we can learn about whatDavid Gwynne
the effects will be. sgi will follow after i fix some known fallout first.
2014-03-28Fix alignment of tftp structure by changing the 'header' member's typePhilip Guenther
to a struct with the necessary alignment. analysis and ok kettenis@
2014-03-27unbreak mfii after i changed the layout of some structures it borrowsDavid Gwynne
from mpii. disappointment from deraadt@
2014-03-27Remove dependency from wscons_machdep upon bonito. Instead of hardcoding bonitoMiod Vallat
as the northbridge, have the per-platform early setup code register functions providing access to the PCI configuration space, for the wscons code to walk the PCI space in search of a graphics board. No functional change yet.
2014-03-27Make sure the HIBERNATE pages get reserved regardless of the memory layout.Miod Vallat
2014-03-27Increase VM_PHYSSEG_MAX, necessary for systems with non-contiguous memoryMiod Vallat
(such as 2E and 3A systems).
2014-03-27{fix,add} comments.Miod Vallat
2014-03-27Add commented out entries for xhci(4).Brad Smith
ok mpi@