summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2014-11-18 15:20:16 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2014-11-18 15:20:16 +0000
commit1aa84a6b4fa793d2d71c503ad197d6ad33ff6fb1 (patch)
treeb7562d55e3a8998497120db377933dcebca53ac0 /sys/arch
parentf2191e791d31bab2d5473ae90e1b660bb5a88ddb (diff)
make pmap_zero_page MP-safe, by using the directmap
mpi will investigate speedups after this. ok mpi kettenis
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/powerpc/powerpc/pmap.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/sys/arch/powerpc/powerpc/pmap.c b/sys/arch/powerpc/powerpc/pmap.c
index 953e5072c25..a20a5fa959d 100644
--- a/sys/arch/powerpc/powerpc/pmap.c
+++ b/sys/arch/powerpc/powerpc/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.132 2014/11/16 12:30:58 deraadt Exp $ */
+/* $OpenBSD: pmap.c,v 1.133 2014/11/18 15:20:15 deraadt Exp $ */
/*
* Copyright (c) 2001, 2002, 2007 Dale Rahn.
@@ -1220,25 +1220,7 @@ pmap_collect(pmap_t pm)
void
pmap_zero_page(struct vm_page *pg)
{
- paddr_t pa = VM_PAGE_TO_PHYS(pg);
-#ifdef USE_DCBZ
- int i;
- paddr_t addr = zero_page;
-#endif
-
- /* simple_lock(&pmap_zero_page_lock); */
- pmap_kenter_pa(zero_page, pa, PROT_READ | PROT_WRITE);
-#ifdef USE_DCBZ
- for (i = PAGE_SIZE/CACHELINESIZE; i>0; i--) {
- __asm volatile ("dcbz 0,%0" :: "r"(addr));
- addr += CACHELINESIZE;
- }
-#else
- bzero((void *)zero_page, PAGE_SIZE);
-#endif
- pmap_kremove_pg(zero_page);
-
- /* simple_unlock(&pmap_zero_page_lock); */
+ bzero((void *)pmap_map_direct(pg), PAGE_SIZE);
}
/*