]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-m32r/pgtable.h
Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab...
[linux-2.6-omap-h63xx.git] / include / asm-m32r / pgtable.h
index 8b2a2f17e69559e42c21894c0448f9d2ac048947..86505387be0872b305cefdaa89796e3f67d04548 100644 (file)
@@ -21,9 +21,9 @@
 #ifndef __ASSEMBLY__
 
 #include <linux/threads.h>
+#include <linux/bitops.h>
 #include <asm/processor.h>
 #include <asm/addrspace.h>
-#include <asm/bitops.h>
 #include <asm/page.h>
 
 struct mm_struct;
@@ -191,16 +191,6 @@ extern unsigned long empty_zero_page[1024];
  * The following only work if pte_present() is true.
  * Undefined behaviour if not..
  */
-static inline int pte_read(pte_t pte)
-{
-       return pte_val(pte) & _PAGE_READ;
-}
-
-static inline int pte_exec(pte_t pte)
-{
-       return pte_val(pte) & _PAGE_EXEC;
-}
-
 static inline int pte_dirty(pte_t pte)
 {
        return pte_val(pte) & _PAGE_DIRTY;
@@ -224,18 +214,6 @@ static inline int pte_file(pte_t pte)
        return pte_val(pte) & _PAGE_FILE;
 }
 
-static inline pte_t pte_rdprotect(pte_t pte)
-{
-       pte_val(pte) &= ~_PAGE_READ;
-       return pte;
-}
-
-static inline pte_t pte_exprotect(pte_t pte)
-{
-       pte_val(pte) &= ~_PAGE_EXEC;
-       return pte;
-}
-
 static inline pte_t pte_mkclean(pte_t pte)
 {
        pte_val(pte) &= ~_PAGE_DIRTY;
@@ -254,18 +232,6 @@ static inline pte_t pte_wrprotect(pte_t pte)
        return pte;
 }
 
-static inline pte_t pte_mkread(pte_t pte)
-{
-       pte_val(pte) |= _PAGE_READ;
-       return pte;
-}
-
-static inline pte_t pte_mkexec(pte_t pte)
-{
-       pte_val(pte) |= _PAGE_EXEC;
-       return pte;
-}
-
 static inline pte_t pte_mkdirty(pte_t pte)
 {
        pte_val(pte) |= _PAGE_DIRTY;
@@ -284,11 +250,6 @@ static inline pte_t pte_mkwrite(pte_t pte)
        return pte;
 }
 
-static inline  int ptep_test_and_clear_dirty(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep)
-{
-       return test_and_clear_bit(_PAGE_BIT_DIRTY, ptep);
-}
-
 static inline  int ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep)
 {
        return test_and_clear_bit(_PAGE_BIT_ACCESSED, ptep);
@@ -366,7 +327,7 @@ static inline void pmd_set(pmd_t * pmdp, pte_t * ptep)
 #define pte_unmap_nested(pte)  do { } while (0)
 
 /* Encode and de-code a swap entry */
-#define __swp_type(x)                  (((x).val >> 2) & 0x3f)
+#define __swp_type(x)                  (((x).val >> 2) & 0x1f)
 #define __swp_offset(x)                        ((x).val >> 10)
 #define __swp_entry(type, offset)      \
        ((swp_entry_t) { ((type) << 2) | ((offset) << 10) })
@@ -382,7 +343,6 @@ static inline void pmd_set(pmd_t * pmdp, pte_t * ptep)
                remap_pfn_range(vma, vaddr, pfn, size, prot)
 
 #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
-#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY
 #define __HAVE_ARCH_PTEP_GET_AND_CLEAR
 #define __HAVE_ARCH_PTEP_SET_WRPROTECT
 #define __HAVE_ARCH_PTE_SAME