aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/mm/vmem.c
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 /arch/s390/mm/vmem.c
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 'arch/s390/mm/vmem.c')
-rw-r--r--arch/s390/mm/vmem.c14
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
87static inline pte_t *vmem_pte_alloc(void) 87static 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);