aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/mm/vmem.c
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2008-02-09 12:24:36 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-02-09 12:24:40 -0500
commit5a216a20837c5f5fa1ca4b8ae8991ffd96b08e6f (patch)
treedde54e28497e920fa460cc95dadb6b38f1b2dbe0 /arch/s390/mm/vmem.c
parent146e4b3c8b92071b18f0b2e6f47165bad4f9e825 (diff)
[S390] Add four level page tables for CONFIG_64BIT=y.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/mm/vmem.c')
-rw-r--r--arch/s390/mm/vmem.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c
index 434491f8f47c..35d90a4720fd 100644
--- a/arch/s390/mm/vmem.c
+++ b/arch/s390/mm/vmem.c
@@ -69,7 +69,19 @@ static void __ref *vmem_alloc_pages(unsigned int order)
69 return alloc_bootmem_pages((1 << order) * PAGE_SIZE); 69 return alloc_bootmem_pages((1 << order) * PAGE_SIZE);
70} 70}
71 71
72#define vmem_pud_alloc() ({ BUG(); ((pud_t *) NULL); }) 72static inline pud_t *vmem_pud_alloc(void)
73{
74 pud_t *pud = NULL;
75
76#ifdef CONFIG_64BIT
77 pud = vmem_alloc_pages(2);
78 if (!pud)
79 return NULL;
80 pud_val(*pud) = _REGION3_ENTRY_EMPTY;
81 memcpy(pud + 1, pud, (PTRS_PER_PUD - 1)*sizeof(pud_t));
82#endif
83 return pud;
84}
73 85
74static inline pmd_t *vmem_pmd_alloc(void) 86static inline pmd_t *vmem_pmd_alloc(void)
75{ 87{