[patch 6/6] powerpc: Dont clear _PAGE_COHERENT when _PAGE_SAO is set

shaggy
2008-06-18T22:33:00Z

Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

arch/powerpc/platforms/pseries/lpar.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-2.6.26-rc5/arch/powerpc/platforms/pseries/lpar.c
===================================================================
--- linux-2.6.26-rc5.orig/arch/powerpc/platforms/pseries/lpar.c
+++ linux-2.6.26-rc5/arch/powerpc/platforms/pseries/lpar.c
@@ -305,7 +305,8 @@ static long pSeries_lpar_hpte_insert(uns
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);

--