]> Pileus Git - ~andy/linux/blobdiff - arch/arm/mm/mm.h
Merge tag 'tty-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
[~andy/linux] / arch / arm / mm / mm.h
index 70f6d3ea48340fb7d8ac2aa6d8e9046a467117c8..27f4a619b35d1c0039d7883c7804994c0540cdc6 100644 (file)
@@ -3,7 +3,31 @@
 /* the upper-most page table pointer */
 extern pmd_t *top_pmd;
 
-#define TOP_PTE(x)     pte_offset_kernel(top_pmd, x)
+/*
+ * 0xffff8000 to 0xffffffff is reserved for any ARM architecture
+ * specific hacks for copying pages efficiently, while 0xffff4000
+ * is reserved for VIPT aliasing flushing by generic code.
+ *
+ * Note that we don't allow VIPT aliasing caches with SMP.
+ */
+#define COPYPAGE_MINICACHE     0xffff8000
+#define COPYPAGE_V6_FROM       0xffff8000
+#define COPYPAGE_V6_TO         0xffffc000
+/* PFN alias flushing, for VIPT caches */
+#define FLUSH_ALIAS_START      0xffff4000
+
+static inline void set_top_pte(unsigned long va, pte_t pte)
+{
+       pte_t *ptep = pte_offset_kernel(top_pmd, va);
+       set_pte_ext(ptep, pte, 0);
+       local_flush_tlb_kernel_page(va);
+}
+
+static inline pte_t get_top_pte(unsigned long va)
+{
+       pte_t *ptep = pte_offset_kernel(top_pmd, va);
+       return *ptep;
+}
 
 static inline pmd_t *pmd_off_k(unsigned long virt)
 {