Date: Sat, 22 Dec 2012 01:03:24 +0000 (UTC) From: Olivier Houchard <cognet@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244574 - head/sys/arm/arm Message-ID: <201212220103.qBM13Otx075363@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cognet Date: Sat Dec 22 01:03:23 2012 New Revision: 244574 URL: http://svnweb.freebsd.org/changeset/base/244574 Log: The VM_MEMATTR_ constants are enumerated, not a bitset. Compare accordingly. Submitted by: Ian Lepore <freebsd@damnhippie.dyndns.org> Modified: head/sys/arm/arm/pmap-v6.c head/sys/arm/arm/pmap.c Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Sat Dec 22 00:23:57 2012 (r244573) +++ head/sys/arm/arm/pmap-v6.c Sat Dec 22 01:03:23 2012 (r244574) @@ -2663,7 +2663,7 @@ do_l2b_alloc: if (!(prot & VM_PROT_EXECUTE) && m) npte |= L2_XN; - if (!(m->md.pv_memattr & VM_MEMATTR_UNCACHEABLE)) + if (m->md.pv_memattr != VM_MEMATTR_UNCACHEABLE) npte |= pte_l2_s_cache_mode; if (m && m == opg) { Modified: head/sys/arm/arm/pmap.c ============================================================================== --- head/sys/arm/arm/pmap.c Sat Dec 22 00:23:57 2012 (r244573) +++ head/sys/arm/arm/pmap.c Sat Dec 22 01:03:23 2012 (r244574) @@ -1366,7 +1366,7 @@ pmap_fix_cache(struct vm_page *pg, pmap_ (pv->pv_flags & PVF_NC)) { pv->pv_flags &= ~PVF_NC; - if (!(pg->md.pv_memattr & VM_MEMATTR_UNCACHEABLE)) + if (pg->md.pv_memattr != VM_MEMATTR_UNCACHEABLE) pmap_set_cache_entry(pv, pm, va, 1); continue; } @@ -1376,7 +1376,7 @@ pmap_fix_cache(struct vm_page *pg, pmap_ !pmwc && (pv->pv_flags & PVF_NC)) { pv->pv_flags &= ~(PVF_NC | PVF_MWC); - if (!(pg->md.pv_memattr & VM_MEMATTR_UNCACHEABLE)) + if (pg->md.pv_memattr != VM_MEMATTR_UNCACHEABLE) pmap_set_cache_entry(pv, pm, va, 1); } } @@ -1428,8 +1428,8 @@ pmap_clearbit(struct vm_page *pg, u_int if (!(oflags & maskbits)) { if ((maskbits & PVF_WRITE) && (pv->pv_flags & PVF_NC)) { - if (!(pg->md.pv_memattr & - VM_MEMATTR_UNCACHEABLE)) { + if (pg->md.pv_memattr != + VM_MEMATTR_UNCACHEABLE) { PMAP_LOCK(pm); l2b = pmap_get_l2_bucket(pm, va); ptep = &l2b->l2b_kva[l2pte_index(va)]; @@ -1466,8 +1466,8 @@ pmap_clearbit(struct vm_page *pg, u_int * permission. */ if (maskbits & PVF_WRITE) { - if (!(pg->md.pv_memattr & - VM_MEMATTR_UNCACHEABLE)) + if (pg->md.pv_memattr != + VM_MEMATTR_UNCACHEABLE) npte |= pte_l2_s_cache_mode; pv->pv_flags &= ~(PVF_NC | PVF_MWC); } @@ -3399,7 +3399,7 @@ do_l2b_alloc: (m->oflags & VPO_UNMANAGED) == 0) vm_page_aflag_set(m, PGA_WRITEABLE); } - if (!(m->md.pv_memattr & VM_MEMATTR_UNCACHEABLE)) + if (m->md.pv_memattr != VM_MEMATTR_UNCACHEABLE) npte |= pte_l2_s_cache_mode; if (m && m == opg) { /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212220103.qBM13Otx075363>