summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/book3s/64/hash.h
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2016-02-22 02:41:15 (GMT)
committerMichael Ellerman <mpe@ellerman.id.au>2016-02-29 09:34:39 (GMT)
commit849f86a630e9c84bf4c9d5dcbfe59dc94b2e15ce (patch)
tree440ffd5ffb57ccbc4005cd50e3ba471ea59d5595 /arch/powerpc/include/asm/book3s/64/hash.h
parentc61a8843124e353f4ba27c073133868da00e0335 (diff)
downloadlinux-849f86a630e9c84bf4c9d5dcbfe59dc94b2e15ce.tar.xz
powerpc/mm/book3s-64: Move _PAGE_PRESENT to the most significant bit
This changes _PAGE_PRESENT for 64-bit Book 3S processors from 0x2 to 0x8000_0000_0000_0000, because that is where PowerISA v3.0 CPUs in radix mode will expect to find it. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/book3s/64/hash.h')
-rw-r--r--arch/powerpc/include/asm/book3s/64/hash.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/include/asm/book3s/64/hash.h b/arch/powerpc/include/asm/book3s/64/hash.h
index 5b8ba60..36ff107 100644
--- a/arch/powerpc/include/asm/book3s/64/hash.h
+++ b/arch/powerpc/include/asm/book3s/64/hash.h
@@ -14,7 +14,6 @@
* combinations that newer processors provide but we currently don't.
*/
#define _PAGE_PTE 0x00001 /* distinguishes PTEs from pointers */
-#define _PAGE_PRESENT 0x00002 /* software: pte contains a translation */
#define _PAGE_BIT_SWAP_TYPE 2
#define _PAGE_USER 0x00004 /* page may be accessed by userspace */
#define _PAGE_EXEC 0x00008 /* execute permission */
@@ -39,6 +38,8 @@
#define _PAGE_SOFT_DIRTY 0x00000
#endif
+#define _PAGE_PRESENT (1ul << 63) /* pte contains a translation */
+
/*
* We need to differentiate between explicit huge page and THP huge
* page, since THP huge page also need to track real subpage details
@@ -402,7 +403,7 @@ static inline int pte_protnone(pte_t pte)
static inline int pte_present(pte_t pte)
{
- return pte_val(pte) & _PAGE_PRESENT;
+ return !!(pte_val(pte) & _PAGE_PRESENT);
}
/* Conversion functions: convert a page and protection to a page entry,