Thread (8 messages) flat view 8 messages, 2 authors, 2008-07-09

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

From: Benjamin Herrenschmidt <hidden>
Date: 2008-07-09 03:46:17

On Mon, 2008-07-07 at 09:28 -0500, Dave Kleikamp wrote:
plain text document attachment (dont_clobber_M.patch)
Signed-off-by: Dave Kleikamp <redacted>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
The old code looks bogus.. why clear M when G is set ? Only
I should have mattered.

I'll apply anyway as you aren't changing the existing behaviour here but
maybe you can shoot me a fixup patch that removes the _PAGE_GUARDED
condition completely here ?

It's legal to have G=1 M=1 pages and can even be useful under some
circumstances.

Cheers,
Ben.
quoted hunk ↗ jump to hunk
 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);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help