From: kettenis Date: Thu, 8 Oct 2015 10:20:14 +0000 (+0000) Subject: Add a per-page flag to indicate that all mappings of that page should be X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a8376f6e9a8495271566065694b351d488e797f4;p=openbsd 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@ --- 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)