diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2002-09-10 18:29:45 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2002-09-10 18:29:45 +0000 |
commit | dc9f06d0330e3e7e4470e3ea0dc68bebaef4bff9 (patch) | |
tree | 1503c1f1af5126456f6dc9827abc9b960308687f /sys/uvm | |
parent | 7730c554bf1c303d60002833793768dbd9a6a681 (diff) |
Change the pmap_zero_page and pmap_copy_page API to take the struct vm_page *
instead of the pa. Most callers already had it handy and those who didn't
only called it for managed pages and were outside time-critical code.
This will allow us to make those functions clean and fast on sparc and
sparc64 letting us to avoid unnecessary cache flushes.
deraadt@ miod@ drahn@ ok.
Diffstat (limited to 'sys/uvm')
-rw-r--r-- | sys/uvm/uvm_page.c | 6 | ||||
-rw-r--r-- | sys/uvm/uvm_page_i.h | 6 | ||||
-rw-r--r-- | sys/uvm/uvm_pmap.h | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/sys/uvm/uvm_page.c b/sys/uvm/uvm_page.c index 5acd4c27f06..e1212377643 100644 --- a/sys/uvm/uvm_page.c +++ b/sys/uvm/uvm_page.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_page.c,v 1.43 2002/06/11 09:45:16 art Exp $ */ +/* $OpenBSD: uvm_page.c,v 1.44 2002/09/10 18:29:44 art Exp $ */ /* $NetBSD: uvm_page.c,v 1.44 2000/11/27 08:40:04 chs Exp $ */ /* @@ -1043,7 +1043,7 @@ uvm_pagealloc_strat(obj, off, anon, flags, strat, free_list) */ pg->flags &= ~PG_CLEAN; if (zeroit) - pmap_zero_page(VM_PAGE_TO_PHYS(pg)); + pmap_zero_page(pg); } return(pg); @@ -1360,7 +1360,7 @@ uvm_pageidlezero() * XXX This will toast the cache unless the pmap_zero_page() * XXX implementation does uncached access. */ - pmap_zero_page(VM_PAGE_TO_PHYS(pg)); + pmap_zero_page(pg); #endif pg->flags |= PG_ZERO; diff --git a/sys/uvm/uvm_page_i.h b/sys/uvm/uvm_page_i.h index 8c6d71288e9..e918ec560d4 100644 --- a/sys/uvm/uvm_page_i.h +++ b/sys/uvm/uvm_page_i.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_page_i.h,v 1.14 2002/01/02 22:23:25 miod Exp $ */ +/* $OpenBSD: uvm_page_i.h,v 1.15 2002/09/10 18:29:44 art Exp $ */ /* $NetBSD: uvm_page_i.h,v 1.14 2000/11/27 07:47:42 chs Exp $ */ /* @@ -282,7 +282,7 @@ uvm_pagezero(pg) { pg->flags &= ~PG_CLEAN; - pmap_zero_page(VM_PAGE_TO_PHYS(pg)); + pmap_zero_page(pg); } /* @@ -298,7 +298,7 @@ uvm_pagecopy(src, dst) { dst->flags &= ~PG_CLEAN; - pmap_copy_page(VM_PAGE_TO_PHYS(src), VM_PAGE_TO_PHYS(dst)); + pmap_copy_page(src, dst); } /* diff --git a/sys/uvm/uvm_pmap.h b/sys/uvm/uvm_pmap.h index a30bba6069b..1a4df27f9dd 100644 --- a/sys/uvm/uvm_pmap.h +++ b/sys/uvm/uvm_pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_pmap.h,v 1.14 2002/03/18 07:48:11 hugh Exp $ */ +/* $OpenBSD: uvm_pmap.h,v 1.15 2002/09/10 18:29:44 art Exp $ */ /* $NetBSD: uvm_pmap.h,v 1.1 2000/06/27 09:00:14 mrg Exp $ */ /* @@ -125,7 +125,7 @@ void pmap_collect(pmap_t); void pmap_copy(pmap_t, pmap_t, vaddr_t, vsize_t, vaddr_t); #endif #if !defined(pmap_copy_page) -void pmap_copy_page(paddr_t, paddr_t); +void pmap_copy_page(struct vm_page *, struct vm_page *); #endif struct pmap *pmap_create(void); void pmap_destroy(pmap_t); @@ -164,7 +164,7 @@ void pmap_remove(pmap_t, vaddr_t, vaddr_t); void pmap_update(void); #endif #if !defined(pmap_zero_page) -void pmap_zero_page(paddr_t); +void pmap_zero_page(struct vm_page *); #endif void pmap_virtual_space(vaddr_t *, vaddr_t *); |