diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/mm/init.c | 4 | ||||
-rw-r--r-- | arch/s390/mm/vmem.c | 14 |
2 files changed, 15 insertions, 3 deletions
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index 01dfe20f846d..248a71010700 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c | |||
@@ -112,8 +112,8 @@ void __init paging_init(void) | |||
112 | init_mm.pgd = swapper_pg_dir; | 112 | init_mm.pgd = swapper_pg_dir; |
113 | S390_lowcore.kernel_asce = __pa(init_mm.pgd) & PAGE_MASK; | 113 | S390_lowcore.kernel_asce = __pa(init_mm.pgd) & PAGE_MASK; |
114 | #ifdef CONFIG_64BIT | 114 | #ifdef CONFIG_64BIT |
115 | S390_lowcore.kernel_asce |= _ASCE_TYPE_REGION3 | _ASCE_TABLE_LENGTH; | 115 | S390_lowcore.kernel_asce |= _ASCE_TYPE_REGION2 | _ASCE_TABLE_LENGTH; |
116 | pgd_type = _REGION3_ENTRY_EMPTY; | 116 | pgd_type = _REGION2_ENTRY_EMPTY; |
117 | #else | 117 | #else |
118 | S390_lowcore.kernel_asce |= _ASCE_TABLE_LENGTH; | 118 | S390_lowcore.kernel_asce |= _ASCE_TABLE_LENGTH; |
119 | pgd_type = _SEGMENT_ENTRY_EMPTY; | 119 | pgd_type = _SEGMENT_ENTRY_EMPTY; |
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); }) | 72 | static 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 | ||
74 | static inline pmd_t *vmem_pmd_alloc(void) | 86 | static inline pmd_t *vmem_pmd_alloc(void) |
75 | { | 87 | { |