]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-powerpc/pgtable-ppc64.h
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux...
[linux-2.6-omap-h63xx.git] / include / asm-powerpc / pgtable-ppc64.h
index 7ca8b5c100191d0398f530a3134bc3b172682564..dd4c26dc57d2727d533c19fef3f9ad4224ccf737 100644 (file)
 #define KERNEL_REGION_ID       (REGION_ID(PAGE_OFFSET))
 #define USER_REGION_ID         (0UL)
 
+/*
+ * Defines the address of the vmemap area, in the top 16th of the
+ * kernel region.
+ */
+#define VMEMMAP_BASE (ASM_CONST(CONFIG_KERNEL_START) + \
+                                       (0xfUL << (REGION_SHIFT - 4)))
+#define vmemmap ((struct page *)VMEMMAP_BASE)
+
 /*
  * Common bits in a linux-style PTE.  These match the bits in the
  * (hardware-defined) PowerPC PTE as closely as possible. Additional
@@ -292,29 +300,6 @@ static inline int __ptep_test_and_clear_young(struct mm_struct *mm,
        __r;                                                               \
 })
 
-/*
- * On RW/DIRTY bit transitions we can avoid flushing the hpte. For the
- * moment we always flush but we need to fix hpte_update and test if the
- * optimisation is worth it.
- */
-static inline int __ptep_test_and_clear_dirty(struct mm_struct *mm,
-                                             unsigned long addr, pte_t *ptep)
-{
-       unsigned long old;
-
-               if ((pte_val(*ptep) & _PAGE_DIRTY) == 0)
-               return 0;
-       old = pte_update(mm, addr, ptep, _PAGE_DIRTY, 0);
-       return (old & _PAGE_DIRTY) != 0;
-}
-#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY
-#define ptep_test_and_clear_dirty(__vma, __addr, __ptep)                  \
-({                                                                        \
-       int __r;                                                           \
-       __r = __ptep_test_and_clear_dirty((__vma)->vm_mm, __addr, __ptep); \
-       __r;                                                               \
-})
-
 #define __HAVE_ARCH_PTEP_SET_WRPROTECT
 static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr,
                                      pte_t *ptep)
@@ -342,14 +327,6 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr,
        __young;                                                        \
 })
 
-#define __HAVE_ARCH_PTEP_CLEAR_DIRTY_FLUSH
-#define ptep_clear_flush_dirty(__vma, __address, __ptep)               \
-({                                                                     \
-       int __dirty = __ptep_test_and_clear_dirty((__vma)->vm_mm, __address, \
-                                                 __ptep);              \
-       __dirty;                                                        \
-})
-
 #define __HAVE_ARCH_PTEP_GET_AND_CLEAR
 static inline pte_t ptep_get_and_clear(struct mm_struct *mm,
                                       unsigned long addr, pte_t *ptep)