summaryrefslogtreecommitdiffstats
path: root/sys/uvm/uvm_device.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Sync some comments in order to reduce the difference with NetBSD.mpi2021-03-201-13/+42
| | | | | | No functionnal change. ok kettenis@
* Remove unused `anon' argument from uvmfault_unlockall().mpi2020-11-061-4/+4
| | | | | | | | | It won't be used when amap and anon locking will be introduced. This "fixes" passing a unrelated/uninitialized pointer in an error path in case of memory shortage. ok kettenis@
* We will soon have DRM on powerpc64.kettenis2020-10-241-2/+3
|
* Constify and use C99 initializer for "struct uvm_pagerops".mpi2020-10-211-9/+12
| | | | | | | | | While here put some KERNEL_ASSERT_LOCKED() in the functions called from the page fault handler. The removal of locking of `uobj' will need to be revisited and these are good indicator that something is missing and that many comments are lying. ok kettenis
* Convert infinite sleeps to {m,t}sleep_nsec(9).mpi2019-12-081-2/+3
| | | | ok visa@, jca@
* R.I.P. UVM_WAIT(). Use tsleep_nsec(9) directly.cheloha2019-07-181-3/+3
| | | | | | | | | | | UVM_WAIT() doesn't provide much of a useful abstraction. All callers tsleep forever and no callers set PCATCH, so only 2 of 4 parameters are actually used. Might as well just use tsleep_nsec(9) directly and make the uvm code a bit less specialized. Suggested by mpi@. ok mpi@ visa@ millert@
* Preparations for arm64 radeondrm(4) support.kettenis2018-08-201-4/+4
| | | | ok jsg@ (who pointed out the kern_pledge.c change was necessary as well)
* Enable radeondrm(4) on loongson to get accelerated graphicsvisa2017-05-211-2/+3
| | | | | | with the RS780E chipset. OK kettenis@, jsg@
* move the vm_page struct from being stored in RB macro trees to RBT functionsdlg2016-09-161-2/+2
| | | | | | | vm_page structs go into three trees, uvm_objtree, uvm_pmr_addr, and uvm_pmr_size. all these have been moved to RBT code. this should give us a decent chunk of code space back.
* fairly simple sizes for free(); ok teduderaadt2015-08-281-3/+3
|
* 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/+1
| | | | | | | 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@
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-121-3/+3
| | | | after discussions with beck deraadt kettenis.
* Chuck Cranor rescinded clauses in his licensejsg2014-07-111-8/+1
| | | | | | | | | | | | | on the 2nd of February 2011 in NetBSD. http://marc.info/?l=netbsd-source-changes&m=129658899212732&w=2 http://marc.info/?l=netbsd-source-changes&m=129659095515558&w=2 http://marc.info/?l=netbsd-source-changes&m=129659157916514&w=2 http://marc.info/?l=netbsd-source-changes&m=129665962324372&w=2 http://marc.info/?l=netbsd-source-changes&m=129666033625342&w=2 http://marc.info/?l=netbsd-source-changes&m=129666052825545&w=2 http://marc.info/?l=netbsd-source-changes&m=129666922906480&w=2 http://marc.info/?l=netbsd-source-changes&m=129667725518082&w=2
* Use real parameter types for u{dv,vn}_attach() instead of void *matthew2014-07-021-4/+3
| | | | ok guenther
* compress code by turning four line comments into one line comments.tedu2014-04-131-68/+13
| | | | emphatic ok usual suspects, grudging ok miod
* Make the tree compile again on architectures without drm(4).kettenis2013-08-131-1/+4
| | | | ok maja@, miod@, jsg@
* Add proper mmap(2) support for drm(4)/inteldrm(4). This changes thekettenis2013-06-071-1/+12
| | | | | | | | DRM_I915_GEM_MMAP and DRM_I915_GEM_MMAP_GTT ioctls to be compatible with Linux. This also is the first step that moves us away from accessing all graphics memory through the GTT, which should make things faster. ok tedu@ (for the uvm bits)
* remove lots of comments about locking per beck's requesttedu2013-05-301-9/+2
|
* remove simple_locks from uvm code. ok beck deraadttedu2013-05-301-9/+1
|
* Rip out and burn support for UVM_HIST.oga2011-07-031-18/+1
| | | | | | | | The vm hackers don't use it, don't maintain it and have to look at it all the time. About time this 800 lines of code hit /dev/null. ``never liked it'' tedu@. ariane@ was very happy when i told her i wrote this diff.
* Kill pmap_phys_address(), and force every driver's mmap() routine to returnmiod2010-12-261-5/+4
| | | | | | | a physical address [more precisely, something suitable to pass to pmap_enter()'sphysical address argument]. This allows MI drivers to implement mmap() routines without having to know about the pmap_phys_address() implementation and #ifdef obfuscation.
* Right now, if anything internal changes with a uvm object, diverseoga2010-04-301-6/+2
| | | | | | | | | | | | places in the tree need to be touched to update the object initialisation with respect to that. So, make a function (uvm_initobj) that takes the refcount, object and pager ops and does this initialisation for us. This should save on maintainance in the future. looked good to fgs@. Tedu complained about the British spelling but OKed it anyway.
* make the uvm device lock a mutex.oga2009-08-141-34/+25
| | | | | | | This is the same diff that was backed out after c2k9 in the date-based revert. ok ariane@
* reintroduce the uvm_tree commit.oga2009-08-061-3/+3
| | | | | | | | | | Now instead of the global object hashtable, we have a per object tree. Testing shows no performance difference and a slight code shrink. OTOH when locking is more fine grained this should be faster due to lock contention on uvm.hashlock. ok thib@, art@.
* date based reversion of uvm to the 4th May.oga2009-06-161-29/+46
| | | | | | | | | | We still have no idea why this stops the crashes. but it does. a machine forced to 64mb of ram cycled 10GB through swap with this diff and is still running as I type this. Other tests by ariane@ and thib@ also seem to show that it's alright. ok deraadt@, thib@, ariane@
* Backout all changes to uvm after pmemrange (which will be backed outoga2009-06-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | separately). a change at or just before the hackathon has either exposed or added a very very nasty memory corruption bug that is giving us hell right now. So in the interest of kernel stability these diffs are being backed out until such a time as that corruption bug has been found and squashed, then the ones that are proven good may slowly return. a quick hitlist of the main commits this backs out: mine: uvm_objwire the lock change in uvm_swap.c using trees for uvm objects instead of the hash removing the pgo_releasepg callback. art@'s: putting pmap_page_protect(VM_PROT_NONE) in uvm_pagedeactivate() since all callers called that just prior anyway. ok beck@, ariane@. prompted by deraadt@.
* Instead of the global hash table with the terrible hashfunction and aoga2009-06-021-3/+3
| | | | | | | | | global lock, switch the uvm object pages to being kept in a per-object RB_TREE. Right now this is approximately the same speed, but cleaner. When biglock usage is reduced this will improve concurrency due to lock contention.. ok beck@ art@. Thanks to jasper for the speed testing.
* Convert the udv_lock for the list of uvm_device objects over to a mutex.oga2009-05-121-38/+22
| | | | ok thib@, weingart@.
* Remove static qualifier of functions that are not inline.ariane2009-05-081-11/+10
| | | | | | Makes trace in ddb useful. ok oga
* Remove space added in last commit. Pointed out by miod@.oga2009-03-231-2/+2
|
* While working on some stuff in uvm I've gotten REALLY sick of readingoga2009-03-201-22/+10
| | | | | | | K&R function declarations, so switch them all over to ansi-style, in accordance with the prophesy. "go for it" art@
* MALLOC/FREE -> malloc/freechl2007-10-291-5/+4
| | | | ok krw@
* fix uvmhist #2: args are always u_long so fix missing %d and %x and no %ll; no change for normal codemickey2006-07-311-8/+8
|
* fix fmts for UVMHIST_LOG() entries making it more useful on 64bit archs; miod@ okmickey2006-07-261-6/+6
|
* add another uvm histroy for physpage alloc/free and propagate a debugging pgfree check into pglist; no functional change for normal kernels; make histories uncommonmickey2006-01-161-3/+3
|
* sync of pmap_update() calls with NetBSD. pmap_update is defined away ondrahn2004-02-231-1/+5
| | | | all architectures but arm, where it is needed.
* Eliminate the use of KERN_SUCCESS outside of uvm/art2002-11-061-2/+2
| | | | | | | | Also uvm_map returns KERN_* codes that are directly mapped to errnos, so we can return them instead of doing some attempt to translation. drahn@ "I see no problem" pval@ "makes sense"
* First round of __P removal in sysmillert2002-03-141-12/+12
|
* UBC was a disaster. It worked very good when it worked, but on someart2001-12-191-21/+19
| | | | | | | | | machines or some configurations or in some phase of the moon (we actually don't know when or why) files disappeared. Since we've not been able to track down the problem in two weeks intense debugging and we need -current to be stable, back out everything to a state it had before UBC. We apologise for the inconvenience.
* Yet another sync to NetBSD uvm.art2001-12-041-4/+4
| | | | | | Today we add a pmap argument to pmap_update() and allocate map entries for kernel_map from kmem_map instead of using the static entries. This should get rid of MAX_KMAPENT panics. Also some uvm_loan problems are fixed.
* Sync in more uvm from NetBSD. Mostly just cosmetic stuff.art2001-11-281-14/+16
| | | | Contains also support for page coloring.
* Sync in more uvm changes from NetBSD.art2001-11-281-7/+7
| | | | | This time we're getting rid of KERN_* and VM_PAGER_* error codes and use errnos instead.
* Another sync of uvm to NetBSD. Just minor fiddling, no major changes.art2001-11-071-87/+27
|
* Move the last content from vm/ to uvm/art2001-11-061-8/+6
| | | | | | | The only thing left in vm/ are just dumb wrappers. vm/vm.h includes uvm/uvm_extern.h vm/pmap.h includes uvm/uvm_pmap.h vm/vm_page.h includes uvm/uvm_page.h
* Minor sync to NetBSD.art2001-11-051-47/+43
|
* Don't allow negative offsets. Some type confusion.art2001-11-011-3/+6
|
* Change d_mmap in struct cdevsw from:art2001-11-011-14/+5
| | | | | | | | int (*d_mmap) __P((dev_t, int, int)); to: paddr_t (*d_mmap) __P((dev_t, off_t, int)); This allows us to mmap devices past 4GB offsets.
* Don't include <vm/vm_kern.h> if you don't need foo_map.miod2001-09-111-2/+1
|