summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDenis Kirjanov <kda@linux-powerpc.org>2013-07-23 15:28:03 +0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-07-24 14:42:18 +1000
commitad92c615975a57c4b206c5c99f77a0bf22b373c4 (patch)
tree85f254505fd77a8cbdb2229e56b46e183d801770 /arch
parentab55d2187da27414f78056810713c92f9a4350c2 (diff)
downloadlinux-ad92c615975a57c4b206c5c99f77a0bf22b373c4.tar.bz2
powerpc/pseries: Fix a typo in pSeries_lpar_hpte_insert()
Commit 801eb73f45371accc78ca9d6d22d647eeb722c11 introduced a bug while checking PTE flags. We have to drop the _PAGE_COHERENT flag when __PAGE_NO_CACHE is set and the cache update policy is not write-through (i.e. _PAGE_WRITETHRU is not set) Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org> Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> CC: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/pseries/lpar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
index 02d6e21619bb..8bad880bd177 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -146,7 +146,7 @@ static long pSeries_lpar_hpte_insert(unsigned long hpte_group,
flags = 0;
/* Make pHyp happy */
- if ((rflags & _PAGE_NO_CACHE) & !(rflags & _PAGE_WRITETHRU))
+ if ((rflags & _PAGE_NO_CACHE) && !(rflags & _PAGE_WRITETHRU))
hpte_r &= ~_PAGE_COHERENT;
if (firmware_has_feature(FW_FEATURE_XCMO) && !(hpte_r & HPTE_R_N))
flags |= H_COALESCE_CAND;