]> err.no Git - linux-2.6/blobdiff - include/asm-s390/pgtable.h
idr: create idr_layer_cache at boot time
[linux-2.6] / include / asm-s390 / pgtable.h
index 7fe5c4b6d82d639ca85752863ca5983970809cfa..f8347ce9c5a124b58cfb311a68021eaf5437c7a2 100644 (file)
@@ -220,6 +220,8 @@ extern char empty_zero_page[PAGE_SIZE];
 /* Software bits in the page table entry */
 #define _PAGE_SWT      0x001           /* SW pte type bit t */
 #define _PAGE_SWX      0x002           /* SW pte type bit x */
+#define _PAGE_SPECIAL  0x004           /* SW associated with special page */
+#define __HAVE_ARCH_PTE_SPECIAL
 
 /* Six different types of pages. */
 #define _PAGE_TYPE_EMPTY       0x400
@@ -518,6 +520,11 @@ static inline int pte_file(pte_t pte)
        return (pte_val(pte) & mask) == _PAGE_TYPE_FILE;
 }
 
+static inline int pte_special(pte_t pte)
+{
+       return (pte_val(pte) & _PAGE_SPECIAL);
+}
+
 #define __HAVE_ARCH_PTE_SAME
 #define pte_same(a,b)  (pte_val(a) == pte_val(b))
 
@@ -553,12 +560,12 @@ static inline void ptep_rcp_copy(pte_t *ptep)
 
        skey = page_get_storage_key(page_to_phys(page));
        if (skey & _PAGE_CHANGED)
-               set_bit(RCP_GC_BIT, pgste);
+               set_bit_simple(RCP_GC_BIT, pgste);
        if (skey & _PAGE_REFERENCED)
-               set_bit(RCP_GR_BIT, pgste);
-       if (test_and_clear_bit(RCP_HC_BIT, pgste))
+               set_bit_simple(RCP_GR_BIT, pgste);
+       if (test_and_clear_bit_simple(RCP_HC_BIT, pgste))
                SetPageDirty(page);
-       if (test_and_clear_bit(RCP_HR_BIT, pgste))
+       if (test_and_clear_bit_simple(RCP_HR_BIT, pgste))
                SetPageReferenced(page);
 #endif
 }
@@ -715,6 +722,12 @@ static inline pte_t pte_mkyoung(pte_t pte)
        return pte;
 }
 
+static inline pte_t pte_mkspecial(pte_t pte)
+{
+       pte_val(pte) |= _PAGE_SPECIAL;
+       return pte;
+}
+
 #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
 static inline int ptep_test_and_clear_young(struct vm_area_struct *vma,
                                            unsigned long addr, pte_t *ptep)
@@ -732,8 +745,8 @@ static inline int ptep_test_and_clear_young(struct vm_area_struct *vma,
        young = ((page_get_storage_key(physpage) & _PAGE_REFERENCED) != 0);
        rcp_lock(ptep);
        if (young)
-               set_bit(RCP_GR_BIT, pgste);
-       young |= test_and_clear_bit(RCP_HR_BIT, pgste);
+               set_bit_simple(RCP_GR_BIT, pgste);
+       young |= test_and_clear_bit_simple(RCP_HR_BIT, pgste);
        rcp_unlock(ptep);
        return young;
 #endif