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

From: Dave Kleikamp <[email-masked]>
Date: Mon, 07 Jul 2008 09:28:55 -0500

Signed-off-by: Dave Kleikamp <[email-masked]>
Cc: Benjamin Herrenschmidt <[email-masked]>
---

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

Index: b/arch/powerpc/platforms/pseries/lpar.c
===================================================================
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -305,7 +305,8 @@
 	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);

-- 
Dave Kleikamp
IBM Linux Technology Center