diff options
author | 2013-08-07 08:19:05 +0000 | |
---|---|---|
committer | 2013-08-07 08:19:05 +0000 | |
commit | 05c9bca6995af7470c5b437d628e2265b3a2ff2d (patch) | |
tree | c96d625296e3fc4737543941a2bc9114b40cc257 | |
parent | Mimic what's done on sparc64 and parse the OpenFirmware device tree to (diff) | |
download | wireguard-openbsd-05c9bca6995af7470c5b437d628e2265b3a2ff2d.tar.xz wireguard-openbsd-05c9bca6995af7470c5b437d628e2265b3a2ff2d.zip |
Managed device mappings should be uncached by default.
ok mpi@
-rw-r--r-- | sys/arch/powerpc/powerpc/pmap.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/arch/powerpc/powerpc/pmap.c b/sys/arch/powerpc/powerpc/pmap.c index a4115ba8be0..3e3ba08204a 100644 --- a/sys/arch/powerpc/powerpc/pmap.c +++ b/sys/arch/powerpc/powerpc/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.119 2012/08/30 18:14:26 mpi Exp $ */ +/* $OpenBSD: pmap.c,v 1.120 2013/08/07 08:19:05 kettenis Exp $ */ /* * Copyright (c) 2001, 2002, 2007 Dale Rahn. @@ -801,8 +801,9 @@ _pmap_kenter_pa(vaddr_t va, paddr_t pa, vm_prot_t prot, int flags, int cache) } if (cache == PMAP_CACHE_DEFAULT) { - if (PHYS_TO_VM_PAGE(pa) != NULL) - cache = PMAP_CACHE_WB; /* managed memory is cacheable */ + pg = PHYS_TO_VM_PAGE(pa); + if (pg != NULL && (pg->pg_flags & PG_DEV) == 0) + cache = PMAP_CACHE_WB; else cache = PMAP_CACHE_CI; } |