summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_physio.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Relax the grip the dead hand of QBUS (a.k.a. MAXPHYS) has on thekrw2020-02-201-2/+1
| | | | | | | | | | | throat of physio(). Allows individual devices to eventually be modified to support larger physio() (a.k.a. 'raw') i/o's if they prove capable of them. No immediate functional change. Tested for many weeks by and ok robert@.
* Use long for temporary variables handling b_bcount values in physio().krw2020-01-261-2/+4
| | | | | | | Add a KASSERTMSG() to check that strategy functions didn't screw b_resid up too much. ok beck@ tedu@
* physio() just needs to check for b_bcount overflow. Let the providedkrw2020-01-251-6/+7
| | | | | | | | minphys() function check for MAXPHYS. Feedback from tedu@ kettenis@ dlg@ ok cheloha@, robert@, jmatthew@ as part of larger diff
* Convert infinite sleeps to {m,t}sleep_nsec(9).mpi2019-12-191-2/+2
| | | | ok visa@
* Remove some includes include-what-you-use claims don'tjsg2015-03-141-2/+1
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* Replace a plethora of historical protection options with justderaadt2014-11-161-2/+2
| | | | | | | PROT_NONE, PROT_READ, PROT_WRITE, and PROT_EXEC from mman.h. PROT_MASK is introduced as the one true way of extracting those bits. Remove UVM_ADV_* wrapper, using the standard names. ok doug guenther kettenis
* remove uneeded proc.h includesjsg2014-09-141-2/+1
| | | | ok mpi@ kspillner@
* KASSERTMSG(9): New kernel assertion with messageuebayasi2014-07-131-13/+5
| | | | | | | | | | | | | | | | | | | | | | | KASSERT() is annoying as it only prints the expression as a string. If you (developers) want to know a little more information, you have to do: #ifdef DIAGNOSTIC if (bad) panic(...); #endif KASSERTMSG() replaces it into a single line: KASSERTMSG(!bad, ...); Taken from NetBSD. (There is a concern that KASSERT() messages are too long; consume more memory, and not friendly for small monitors. This have to be considered & revisited later.) "Like" from henning@ Man page review & advices from jmc@ and schwarze@
* Revert vnd(4) to its older less strict behavior.matthew2011-07-181-3/+1
| | | | Verified by deraadt@ to fix distrib/sgi/iso.
* set flags correctly in physio - now with actual clearing of B_DONE and B_ERRORbeck2011-07-071-2/+3
| | | | | | between re-use of the same buffer to re-call strategy() - large dd's now work again which were broken by my last commit of this. ok krw@
* back out last change; it caused dd on usb drive to lock the machine.dhill2011-07-071-2/+2
| | | | ok oga@
* stylistic clean of buffer flags assignment to be more obviously not abeck2011-07-061-2/+2
| | | | | destructive assignment of flags. ok oga@
* If uvm_vslock_device() fails, just exit the loop. None of thematthew2011-07-051-7/+3
| | | | | | | | after_unlock code is needed if this happens, and running it was even wrong because we weren't setting b_resid, so uio_offset (and higher up, f_offset) would be incorrectly adjusted. Discussed with deraadt@.
* Enforce that raw disk I/O is only initiated on block boundaries inmatthew2011-07-051-1/+6
| | | | | | physio(). ok deraadt@
* because bufs now come out of a pool rather than a global list of staticlydlg2011-05-081-67/+8
| | | | | | | | | allocated structs, they wont be shared. we dont have to do the silly B_WANTED dance anymore. get rid of a bunch of comments that talk about how we're stealing from the swapper, which is a lie now. tweaks from oga@ scrutiny by matthew@ ok miod@ oga@ thib@ beck@
* All users of physio(9) now pass NULL as the buf pointer argument, somatthew2010-09-221-18/+7
| | | | | | | no point in keeping it around. "i like this" thib@ (a while back); ok krw@ and oga@; reminder to update the man page and tweaks jmc@
* Implement vs{,un}lock_device and use it for physio.art2010-07-011-7/+14
| | | | | | | | | Just like normal vs{,un}lock, but in case the pages we get are not dma accessible, we bounce them, if they are dma acessible, the functions behave exactly like normal vslock. The plan for the future is to have fault_wire allocate dma acessible pages so that we don't need to bounce (especially in cases where the same buffer is reused for physio over and over again), but for now, keep it as simple as possible.
* No need to do the splbio/splx dance around the pool_get inthib2010-06-231-5/+1
| | | | | | | getphysbuf() as the bufpool is already protected. From Matthew Dempsky <matthew at dempsky dot org> OK blambert@
* obvious shrinkage.oga2009-06-041-5/+2
| | | | ok krw@, miod@.
* Dynamic buffer cache. Initial diff from mickey@, okay art@ beck@ toby@pedro2007-05-261-1/+7
| | | | deraadt@ dlg@.
* 'tranfer' -> 'transfer' in comments.krw2006-12-211-2/+2
|
* Kernel stack can be swapped. This means that stuff that's on the stackmiod2006-11-291-3/+1
| | | | | | | | | | should never be referenced outside the context of the process to which this stack belongs unless we do the PHOLD/PRELE dance. Loads of code doesn't follow the rules here. Instead of trying to track down all offenders and fix this hairy situation, it makes much more sense to not swap kernel stacks. From art@, tested by many some time ago.
* typos; from bret lambertjmc2006-11-151-3/+3
|
* Don't panic for pathological i/o sizes unless minphys() really iskrw2005-12-081-2/+11
| | | | | | | | | | | | broken. Eliminate an unneeded variable and potential conversion issues in SCIOCCOMMAND code before calling physio. Similar to what NetBSD does. Fixes cdda2wav vs "Billie Holiday - Songs for Distingue Lovers" problem noted by Alexandre Ratchov. Tested by Alexandre. ok marco@ pedro@ deraadt@ mickey@
* ansi/deregister.jsg2005-11-281-13/+6
| | | | 'go for it' deraadt@
* typos from Jonathon Gray;jmc2003-11-081-2/+2
|
* remove caddr_t casts. it's just silly to cast something when the functiontedu2003-07-211-3/+3
| | | | takes a void *. convert uiomove to take a void * as well. ok deraadt@
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* First round of __P removal in sysmillert2002-03-141-5/+5
|
* No need for uvm_useracc here now. vslock catches those problems.art2001-12-101-16/+1
|
* Sync in more uvm changes from NetBSD.art2001-11-281-5/+6
| | | | | This time we're getting rid of KERN_* and VM_PAGER_* error codes and use errnos instead.
* Remove creds from struct buf, move the creds that nfs need into the nfs node.art2001-11-151-2/+1
| | | | | | While in the area, convert nfs node allocation from malloc to pool and do some cleanups. Based on the UBC changes in NetBSD. niklas@ ok.
* Use bufpool, not malloc.art2001-11-091-4/+6
|
* Replace inclusion of <vm/foo.h> with the correct <uvm/bar.h> when necessary.miod2001-11-061-3/+1
| | | | (Look ma, I might have broken the tree)
* remove old vmart2001-06-271-42/+2
|
* Appease gcc by not using void pointers in arithmetic operations; art@ okaaron2001-06-261-2/+2
|
* KNFderaadt2001-06-221-21/+21
|
* Check for failure now that uvm_vslock can return one. Before this, there wasart2001-05-071-3/+10
| | | | | a risk that we could crash when doing physio/sysctl when the system was completly out of RAM and swap.
* Use PHOLD/PRELE instead of manually fiddling with p_holdcnt.art2000-11-091-3/+3
|
* Bring in some new UVM code from NetBSD (not current).art2000-03-161-2/+3
| | | | | | | | | - Introduce a new type of map that are interrupt safe and never allow faults in them. mb_map and kmem_map are made intrsafe. - Add "access protection" to uvm_vslock (to be passed down to uvm_fault and later to pmap_enter). - madvise(2) now works. - various cleanups.
* Init the buffer dependency list.art1999-12-021-1/+2
|
* s/memset/bzero/; art@ okmickey1999-11-051-2/+2
|
* mostly name changes and allocation chnges for uvmart1999-02-261-2/+41
|
* indent properlyderaadt1997-07-251-3/+3
|
* from netbsd: check user access rights only if UIO_USERSPACEmickey1997-07-251-6/+8
|
* From NetBSD: 960217 mergeniklas1996-03-031-2/+5
|
* initial import of NetBSD treederaadt1995-10-181-0/+316