diff options
Diffstat (limited to 'arch/s390/mm/vmem.c')
-rw-r--r-- | arch/s390/mm/vmem.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c index 7c1287ccf788..434491f8f47c 100644 --- a/arch/s390/mm/vmem.c +++ b/arch/s390/mm/vmem.c | |||
@@ -84,13 +84,18 @@ static inline pmd_t *vmem_pmd_alloc(void) | |||
84 | return pmd; | 84 | return pmd; |
85 | } | 85 | } |
86 | 86 | ||
87 | static inline pte_t *vmem_pte_alloc(void) | 87 | static pte_t __init_refok *vmem_pte_alloc(void) |
88 | { | 88 | { |
89 | pte_t *pte = vmem_alloc_pages(0); | 89 | pte_t *pte; |
90 | 90 | ||
91 | if (slab_is_available()) | ||
92 | pte = (pte_t *) page_table_alloc(&init_mm); | ||
93 | else | ||
94 | pte = alloc_bootmem(PTRS_PER_PTE * sizeof(pte_t)); | ||
91 | if (!pte) | 95 | if (!pte) |
92 | return NULL; | 96 | return NULL; |
93 | clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY, PAGE_SIZE); | 97 | clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY, |
98 | PTRS_PER_PTE * sizeof(pte_t)); | ||
94 | return pte; | 99 | return pte; |
95 | } | 100 | } |
96 | 101 | ||
@@ -360,6 +365,9 @@ void __init vmem_map_init(void) | |||
360 | { | 365 | { |
361 | int i; | 366 | int i; |
362 | 367 | ||
368 | INIT_LIST_HEAD(&init_mm.context.crst_list); | ||
369 | INIT_LIST_HEAD(&init_mm.context.pgtable_list); | ||
370 | init_mm.context.noexec = 0; | ||
363 | NODE_DATA(0)->node_mem_map = VMEM_MAP; | 371 | NODE_DATA(0)->node_mem_map = VMEM_MAP; |
364 | for (i = 0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) | 372 | for (i = 0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) |
365 | vmem_add_mem(memory_chunk[i].addr, memory_chunk[i].size); | 373 | vmem_add_mem(memory_chunk[i].addr, memory_chunk[i].size); |