summaryrefslogtreecommitdiff
path: root/sys/arch/powerpc
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2015-10-08 10:20:15 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2015-10-08 10:20:15 +0000
commit361de308e70d3b45e4befde95404cc1523933624 (patch)
treef95842c39ef4e2d70cd1ec7a86ff572178a06819 /sys/arch/powerpc
parent387e861c7686934bcd4be0f7cd3c7872cec2416c (diff)
Add a per-page flag to indicate that all mappings of that page should be
uncached. To be used in the drm code. ok mpi@
Diffstat (limited to 'sys/arch/powerpc')
-rw-r--r--sys/arch/powerpc/include/pmap.h9
-rw-r--r--sys/arch/powerpc/powerpc/pmap.c4
2 files changed, 8 insertions, 5 deletions
diff --git a/sys/arch/powerpc/include/pmap.h b/sys/arch/powerpc/include/pmap.h
index de3607db813..7a0f7601239 100644
--- a/sys/arch/powerpc/include/pmap.h
+++ b/sys/arch/powerpc/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.58 2015/09/11 22:02:18 kettenis Exp $ */
+/* $OpenBSD: pmap.h,v 1.59 2015/10/08 10:20:14 kettenis Exp $ */
/* $NetBSD: pmap.h,v 1.1 1996/09/30 16:34:29 ws Exp $ */
/*-
@@ -150,9 +150,10 @@ int reserve_dumppages(caddr_t p);
#define PMAP_STEAL_MEMORY
-#define PG_PMAP_MOD PG_PMAP0
-#define PG_PMAP_REF PG_PMAP1
-#define PG_PMAP_EXE PG_PMAP2
+#define PG_PMAP_MOD PG_PMAP0
+#define PG_PMAP_REF PG_PMAP1
+#define PG_PMAP_EXE PG_PMAP2
+#define PG_PMAP_UC PG_PMAP3
/*
* MD flags that we use for pmap_enter (in the pa):
diff --git a/sys/arch/powerpc/powerpc/pmap.c b/sys/arch/powerpc/powerpc/pmap.c
index d867415084f..97d7fca94de 100644
--- a/sys/arch/powerpc/powerpc/pmap.c
+++ b/sys/arch/powerpc/powerpc/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.162 2015/09/11 22:02:18 kettenis Exp $ */
+/* $OpenBSD: pmap.c,v 1.163 2015/10/08 10:20:14 kettenis Exp $ */
/*
* Copyright (c) 2015 Martin Pieuchot
@@ -582,6 +582,8 @@ pmap_enter(pmap_t pm, vaddr_t va, paddr_t pa, vm_prot_t prot, int flags)
}
pg = PHYS_TO_VM_PAGE(pa);
+ if (pg->pg_flags & PG_PMAP_UC)
+ nocache = TRUE;
if (wt)
cache = PMAP_CACHE_WT;
else if (pg != NULL && !(pg->pg_flags & PG_DEV) && !nocache)