Commit Graph

18 Commits

Author SHA1 Message Date
chris 0b0518e0dd Fix compile without DIAGNOSTICs enabled 2001-08-11 14:47:56 +00:00
chris 191de4d242 Checking a whole host of pmap changes:
Improved locking (not that we actually use it on a uniprocessor, but one day :)
Removed unneeded splvm's
tweaked pmap_clean_page code to only flush the cache if the page is mapped in the current pmap  (based on diff from richard E)
Adopted pv entry allocation mechanism from i386.
Laid framework for returning ptp's when we've finished with them rather than holding onto them till the process exits.
ptp's are now allocated with a uvm object for the pmap, means that we can walk a list to free them off in pmap_release, until they get freed off by pmap_remove.

Also implemented a page zeroing function when the processor is idling.  Note that hpcarm may wish to disable this.

I believe this code to be stable, if anyone has any problems please shout up.
2001-08-11 13:20:19 +00:00
chris fa4e4d9668 Rework the pmap_release code to not have to walk the ptpt, it now uses a uvm_object to track the allocated vm_pages, this means it can free off the entries in the uvm_object.
Testing shows that it's about 5% faster on the make configure step for gmake.
2001-07-29 12:45:27 +00:00
chris 9f04d8d670 A couple of tidy ups to pmap:
pmap_t -> struct pmap * in pmap.c and pmap.h
kernel_pmap -> pmap_kernel() everywhere.

Compiled and booted on riscpc and cats.
2001-07-28 18:12:43 +00:00
chs b86053cc53 clean up pmap_k{enter_pa,remove}():
a page is allowed to be mapped normally when k-mapped.
use UVM_PGA_ZERO to get zeroed pages rather than zeroing here.
2001-07-08 19:44:43 +00:00
chris 4c32798eb8 Implement proper versions of kenter_pa and kremove, I've based them on versions provided by Richard E. 2001-07-06 20:15:13 +00:00
chris b8ceed365f Improve the vac_me_harder function, it is now slightly faster, however pmap_enter_pv is also now slightly slower, so they appear to balance out.
Note that I've some ideas in the works on how to improve the pv handling, so the slow down is short term only.

Also added non-advertising licence and copyright to myself and richard.
2001-06-25 23:22:38 +00:00
chris 407440a6b3 Add a pmap_map_ptes function to map another process page table entries into the current pmap (similair to pmap_pte) but this allows multiple use of it, rather than repeated calls of pmap_pte for pte, map_ptes returns a pointer to the va where the entries were mapped so it can be reused ptes can be found by indexing into it.
Update some of the functions that use pmap_pte to pmap_map_ptes.

Note that there's a dummy macro for pmap_unmap_ptes, this is because at some point locking will be needed, so we need to be able to unlock them.

Performance gain seems to be minimal, however long term it should help improve things.

This is similair to the i386 pmap_map_ptes, however it's based on a version from Richard Earnshaw.
2001-06-24 23:21:04 +00:00
chris cca2bd293b Use a pool to store pmap structs. 2001-06-22 09:09:42 +00:00
chs e44e9dec8a replace vm_page_t with struct vm_page *. 2001-05-26 21:27:02 +00:00
thorpej fe664428c8 Garbage-collect pmap_page_index(). 2001-04-25 17:35:00 +00:00
thorpej 1c3a62e066 Sprinkle pmap_update() calls after calls to:
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).

These calls are relatively conservative.  It may be possible to
optimize these a little more.
2001-04-24 04:30:50 +00:00
thorpej 55044638aa Remove pmap_kenter_pgs(). It was never really adopted by
anything, and the interface itself wasn't as flexible as
callers would have probably liked.
2001-04-22 23:42:11 +00:00
toshii 61ff48a82e In pmap_allocpagedir(), check if uvm_km_zalloc of ptpt is successful,
and handle alloc failure case.
2001-04-20 18:11:53 +00:00
chs ac3bc537bd eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS			0
KERN_INVALID_ADDRESS		EFAULT
KERN_PROTECTION_FAILURE		EACCES
KERN_NO_SPACE			ENOMEM
KERN_INVALID_ARGUMENT		EINVAL
KERN_FAILURE			various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE		ENOMEM
KERN_NOT_RECEIVER		<unused>
KERN_NO_ACCESS			<unused>
KERN_PAGES_LOCKED		<unused>
2001-03-15 06:10:32 +00:00
matt d6fc837c17 more vm_offset_t/vm_size_t -> {p,v}{addr,size}_t changes
move pmap_* declarations to pmap.h.  fix conflicts this
exposed (e.g different definitions for pmap_bootstrap).
2001-03-04 19:05:55 +00:00
matt 4679f9115c Convert some vm_size_t to vsize_t/psize_t. Change vaddr_t to paddr_t
where appropriate.
2001-03-04 07:30:19 +00:00
matt 7d33ba27bf Move from arm32/arm32. s/vm_offset_t/vaddr_t/g 2001-03-04 05:08:09 +00:00