aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-s390/page.h
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2008-02-09 12:24:35 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-02-09 12:24:40 -0500
commit146e4b3c8b92071b18f0b2e6f47165bad4f9e825 (patch)
tree7e9db61cacca0f55ce34db089f27fc22a56ebbdd /include/asm-s390/page.h
parent0c1f1dcd8c7792aeff6ef62e9508b0041928ab87 (diff)
[S390] 1K/2K page table pages.
This patch implements 1K/2K page table pages for s390. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'include/asm-s390/page.h')
-rw-r--r--include/asm-s390/page.h36
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
75typedef struct { unsigned long pgprot; } pgprot_t; 75typedef struct { unsigned long pgprot; } pgprot_t;
76typedef struct { unsigned long pte; } pte_t; 76typedef 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
83typedef struct { unsigned long pmd; } pmd_t; 77typedef struct { unsigned long pmd; } pmd_t;
84typedef struct { unsigned long pud; } pud_t; 78typedef struct { unsigned long pud; } pud_t;
85typedef 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
98typedef struct {
99 unsigned long pmd0;
100 unsigned long pmd1;
101 } pmd_t;
102typedef struct { unsigned long pud; } pud_t;
103typedef struct { unsigned long pgd; } pgd_t; 79typedef struct { unsigned long pgd; } pgd_t;
80typedef 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
112typedef 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>