aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/book3s/64/hash-64k.h
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2016-04-29 23:25:29 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2016-05-01 18:32:19 +1000
commitee3caed37d763ab28f8ac55563f38fb7530c6252 (patch)
tree61ed790bc3dbbb5ac39c6f95aace931b5712caf3 /arch/powerpc/include/asm/book3s/64/hash-64k.h
parentpowerpc/mm: Use big endian Linux page tables for book3s 64 (diff)
downloadlinux-dev-ee3caed37d763ab28f8ac55563f38fb7530c6252.tar.xz
linux-dev-ee3caed37d763ab28f8ac55563f38fb7530c6252.zip
powerpc/mm: Use pte_raw() in pte_same()/pmd_same()
We can avoid doing endian conversions by using pte_raw() in pxx_same(). The swap of the constant (_PAGE_HPTEFLAGS) should be done at compile time by the compiler. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/book3s/64/hash-64k.h')
-rw-r--r--arch/powerpc/include/asm/book3s/64/hash-64k.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/book3s/64/hash-64k.h b/arch/powerpc/include/asm/book3s/64/hash-64k.h
index 0a7956a80a08..f4949f117057 100644
--- a/arch/powerpc/include/asm/book3s/64/hash-64k.h
+++ b/arch/powerpc/include/asm/book3s/64/hash-64k.h
@@ -272,7 +272,7 @@ static inline pmd_t pmd_mknotpresent(pmd_t pmd)
#define __HAVE_ARCH_PMD_SAME
static inline int pmd_same(pmd_t pmd_a, pmd_t pmd_b)
{
- return (((pmd_val(pmd_a) ^ pmd_val(pmd_b)) & ~_PAGE_HPTEFLAGS) == 0);
+ return (((pmd_raw(pmd_a) ^ pmd_raw(pmd_b)) & ~cpu_to_be64(_PAGE_HPTEFLAGS)) == 0);
}
static inline int __pmdp_test_and_clear_young(struct mm_struct *mm,