diff options
Diffstat (limited to 'include/asm-s390/page.h')
-rw-r--r-- | include/asm-s390/page.h | 36 |
1 files changed, 5 insertions, 31 deletions
diff --git a/include/asm-s390/page.h b/include/asm-s390/page.h index 7f29a981f48c..fe7f92b6ae6d 100644 --- a/include/asm-s390/page.h +++ b/include/asm-s390/page.h | |||
@@ -74,43 +74,17 @@ static inline void copy_page(void *to, void *from) | |||
74 | 74 | ||
75 | typedef struct { unsigned long pgprot; } pgprot_t; | 75 | typedef struct { unsigned long pgprot; } pgprot_t; |
76 | typedef struct { unsigned long pte; } pte_t; | 76 | typedef struct { unsigned long pte; } pte_t; |
77 | |||
78 | #define pte_val(x) ((x).pte) | ||
79 | #define pgprot_val(x) ((x).pgprot) | ||
80 | |||
81 | #ifndef __s390x__ | ||
82 | |||
83 | typedef struct { unsigned long pmd; } pmd_t; | 77 | typedef struct { unsigned long pmd; } pmd_t; |
84 | typedef struct { unsigned long pud; } pud_t; | 78 | typedef struct { unsigned long pud; } pud_t; |
85 | typedef struct { | ||
86 | unsigned long pgd0; | ||
87 | unsigned long pgd1; | ||
88 | unsigned long pgd2; | ||
89 | unsigned long pgd3; | ||
90 | } pgd_t; | ||
91 | |||
92 | #define pmd_val(x) ((x).pmd) | ||
93 | #define pud_val(x) ((x).pud) | ||
94 | #define pgd_val(x) ((x).pgd0) | ||
95 | |||
96 | #else /* __s390x__ */ | ||
97 | |||
98 | typedef struct { | ||
99 | unsigned long pmd0; | ||
100 | unsigned long pmd1; | ||
101 | } pmd_t; | ||
102 | typedef struct { unsigned long pud; } pud_t; | ||
103 | typedef struct { unsigned long pgd; } pgd_t; | 79 | typedef struct { unsigned long pgd; } pgd_t; |
80 | typedef pte_t *pgtable_t; | ||
104 | 81 | ||
105 | #define pmd_val(x) ((x).pmd0) | 82 | #define pgprot_val(x) ((x).pgprot) |
106 | #define pmd_val1(x) ((x).pmd1) | 83 | #define pte_val(x) ((x).pte) |
84 | #define pmd_val(x) ((x).pmd) | ||
107 | #define pud_val(x) ((x).pud) | 85 | #define pud_val(x) ((x).pud) |
108 | #define pgd_val(x) ((x).pgd) | 86 | #define pgd_val(x) ((x).pgd) |
109 | 87 | ||
110 | #endif /* __s390x__ */ | ||
111 | |||
112 | typedef struct page *pgtable_t; | ||
113 | |||
114 | #define __pte(x) ((pte_t) { (x) } ) | 88 | #define __pte(x) ((pte_t) { (x) } ) |
115 | #define __pmd(x) ((pmd_t) { (x) } ) | 89 | #define __pmd(x) ((pmd_t) { (x) } ) |
116 | #define __pgd(x) ((pgd_t) { (x) } ) | 90 | #define __pgd(x) ((pgd_t) { (x) } ) |
@@ -167,7 +141,7 @@ static inline int pfn_valid(unsigned long pfn) | |||
167 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) | 141 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) |
168 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) | 142 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) |
169 | 143 | ||
170 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 144 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | \ |
171 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | 145 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) |
172 | 146 | ||
173 | #include <asm-generic/memory_model.h> | 147 | #include <asm-generic/memory_model.h> |