summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorDave Kleikamp <shaggy@linux.vnet.ibm.com>2008-07-08 00:28:55 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-07-09 16:30:46 +1000
commit801eb73f45371accc78ca9d6d22d647eeb722c11 (patch)
tree4bd392fcae5b158551afdebb57f9fc353bf890c4 /arch/powerpc/platforms
parentef3d3246a0d06be622867d21af25f997aeeb105f (diff)
powerpc/mm: Don't clear _PAGE_COHERENT when _PAGE_SAO is set
The current low level hash code on LPAR configurations clears _PAGE_COHERENT (M) when either _PAGE_GUARDED (G) or _PAGE_NO_CACHE (I) is set. This conflicts with _PAGE_SAO which has M, I and W bits sets at once (normally invalid combo) to indicate the new SAO attribute. This changes the code to allow that case. Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/pseries/lpar.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
index 3b4651b6ee0..38b5927b362 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -305,7 +305,8 @@ static long pSeries_lpar_hpte_insert(unsigned long hpte_group,
flags = 0;
/* Make pHyp happy */
- if (rflags & (_PAGE_GUARDED|_PAGE_NO_CACHE))
+ if ((rflags & _PAGE_GUARDED) ||
+ ((rflags & _PAGE_NO_CACHE) & !(rflags & _PAGE_WRITETHRU)))
hpte_r &= ~_PAGE_COHERENT;
lpar_rc = plpar_pte_enter(flags, hpte_group, hpte_v, hpte_r, &slot);