summaryrefslogtreecommitdiff
path: root/arch/sh/include/asm/pgtable_64.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-01-18 20:42:39 +0900
committerPaul Mundt <lethal@linux-sh.org>2010-01-18 20:42:39 +0900
commit8faba6121566248330e738d25a2c43d7500fb9f0 (patch)
tree9cb09b2ec00b504dd24e1272126a22cd365e7282 /arch/sh/include/asm/pgtable_64.h
parent4291b730cd0f0cf98a90d946b6cabbd804397350 (diff)
parent78bf04fc96f509474c6b443b515d6b79bb7bf584 (diff)
Merge branch 'sh/ioremap-fixed'
Diffstat (limited to 'arch/sh/include/asm/pgtable_64.h')
-rw-r--r--arch/sh/include/asm/pgtable_64.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/sh/include/asm/pgtable_64.h b/arch/sh/include/asm/pgtable_64.h
index dd381588c695e..0ee46776dad6d 100644
--- a/arch/sh/include/asm/pgtable_64.h
+++ b/arch/sh/include/asm/pgtable_64.h
@@ -123,8 +123,21 @@ static __inline__ void set_pte(pte_t *pteptr, pte_t pteval)
#define _PAGE_DIRTY 0x400 /* software: page accessed in write */
#define _PAGE_ACCESSED 0x800 /* software: page referenced */
+/* Wrapper for extended mode pgprot twiddling */
+#define _PAGE_EXT(x) ((unsigned long long)(x) << 32)
+
+/*
+ * We can use the sign-extended bits in the PTEL to get 32 bits of
+ * software flags. This works for now because no implementations uses
+ * anything above the PPN field.
+ */
+#define _PAGE_WIRED _PAGE_EXT(0x001) /* software: wire the tlb entry */
+
+#define _PAGE_CLEAR_FLAGS (_PAGE_PRESENT | _PAGE_FILE | _PAGE_SHARED | \
+ _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_WIRED)
+
/* Mask which drops software flags */
-#define _PAGE_FLAGS_HARDWARE_MASK 0xfffffffffffff3dbLL
+#define _PAGE_FLAGS_HARDWARE_MASK (NEFF_MASK & ~(_PAGE_CLEAR_FLAGS))
/*
* HugeTLB support