aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/mm/vmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/mm/vmem.c')
-rw-r--r--arch/s390/mm/vmem.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c
index fd594d5fe142..1bd51d840484 100644
--- a/arch/s390/mm/vmem.c
+++ b/arch/s390/mm/vmem.c
@@ -75,29 +75,24 @@ static void __init_refok *vmem_alloc_pages(unsigned int order)
75 75
76static inline pmd_t *vmem_pmd_alloc(void) 76static inline pmd_t *vmem_pmd_alloc(void)
77{ 77{
78 pmd_t *pmd; 78 pmd_t *pmd = NULL;
79 int i;
80 79
81 pmd = vmem_alloc_pages(PMD_ALLOC_ORDER); 80#ifdef CONFIG_64BIT
81 pmd = vmem_alloc_pages(2);
82 if (!pmd) 82 if (!pmd)
83 return NULL; 83 return NULL;
84 for (i = 0; i < PTRS_PER_PMD; i++) 84 clear_table((unsigned long *) pmd, _SEGMENT_ENTRY_EMPTY, PAGE_SIZE*4);
85 pmd_clear_kernel(pmd + i); 85#endif
86 return pmd; 86 return pmd;
87} 87}
88 88
89static inline pte_t *vmem_pte_alloc(void) 89static inline pte_t *vmem_pte_alloc(void)
90{ 90{
91 pte_t *pte; 91 pte_t *pte = vmem_alloc_pages(0);
92 pte_t empty_pte;
93 int i;
94 92
95 pte = vmem_alloc_pages(PTE_ALLOC_ORDER);
96 if (!pte) 93 if (!pte)
97 return NULL; 94 return NULL;
98 pte_val(empty_pte) = _PAGE_TYPE_EMPTY; 95 clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY, PAGE_SIZE);
99 for (i = 0; i < PTRS_PER_PTE; i++)
100 pte[i] = empty_pte;
101 return pte; 96 return pte;
102} 97}
103 98