Skip to content

Commit

Permalink
powerpc/mm: Don't clear _PAGE_COHERENT when _PAGE_SAO is set
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dave Kleikamp authored and Benjamin Herrenschmidt committed Jul 9, 2008
1 parent ef3d324 commit 801eb73
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/powerpc/platforms/pseries/lpar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 801eb73

Please sign in to comment.