* The PTE table pointer refers to the hardware entries; the "Linux"
  * entries are stored 1024 bytes below.
  */
+#define L_PTE_VALID            (_AT(pteval_t, 1) << 0)         /* Valid */
 #define L_PTE_PRESENT          (_AT(pteval_t, 1) << 0)
 #define L_PTE_YOUNG            (_AT(pteval_t, 1) << 1)
 #define L_PTE_FILE             (_AT(pteval_t, 1) << 2) /* only when !PRESENT */
 
  * These bits overlap with the hardware bits but the naming is preserved for
  * consistency with the classic page table format.
  */
-#define L_PTE_PRESENT          (_AT(pteval_t, 3) << 0)         /* Valid */
+#define L_PTE_VALID            (_AT(pteval_t, 1) << 0)         /* Valid */
+#define L_PTE_PRESENT          (_AT(pteval_t, 3) << 0)         /* Present */
 #define L_PTE_FILE             (_AT(pteval_t, 1) << 2)         /* only when !PRESENT */
 #define L_PTE_USER             (_AT(pteval_t, 1) << 6)         /* AP[1] */
 #define L_PTE_RDONLY           (_AT(pteval_t, 1) << 7)         /* AP[2] */
 
 #define pte_exec(pte)          (!(pte_val(pte) & L_PTE_XN))
 #define pte_special(pte)       (0)
 
-#define pte_present_user(pte) \
-       ((pte_val(pte) & (L_PTE_PRESENT | L_PTE_USER)) == \
-        (L_PTE_PRESENT | L_PTE_USER))
+#define pte_present_user(pte)  (pte_present(pte) && (pte_val(pte) & L_PTE_USER))
 
 #if __LINUX_ARM_ARCH__ < 6
 static inline void __sync_icache_dcache(pte_t pteval)
 
        orrne   r3, r3, #PTE_EXT_XN
 
        tst     r1, #L_PTE_YOUNG
-       tstne   r1, #L_PTE_PRESENT
+       tstne   r1, #L_PTE_VALID
        moveq   r3, #0
 
  ARM(  str     r3, [r0, #2048]! )
 
  */
 ENTRY(cpu_v7_set_pte_ext)
 #ifdef CONFIG_MMU
-       tst     r2, #L_PTE_PRESENT
+       tst     r2, #L_PTE_VALID
        beq     1f
        tst     r3, #1 << (55 - 32)             @ L_PTE_DIRTY
        orreq   r2, #L_PTE_RDONLY