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.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c
index 300ab012b0fd..90165e7ca04e 100644
--- a/arch/s390/mm/vmem.c
+++ b/arch/s390/mm/vmem.c
@@ -11,6 +11,7 @@
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/list.h> 12#include <linux/list.h>
13#include <linux/hugetlb.h> 13#include <linux/hugetlb.h>
14#include <linux/slab.h>
14#include <asm/pgalloc.h> 15#include <asm/pgalloc.h>
15#include <asm/pgtable.h> 16#include <asm/pgtable.h>
16#include <asm/setup.h> 17#include <asm/setup.h>
@@ -70,12 +71,8 @@ static pte_t __ref *vmem_pte_alloc(void)
70 pte = alloc_bootmem(PTRS_PER_PTE * sizeof(pte_t)); 71 pte = alloc_bootmem(PTRS_PER_PTE * sizeof(pte_t));
71 if (!pte) 72 if (!pte)
72 return NULL; 73 return NULL;
73 if (MACHINE_HAS_HPAGE) 74 clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY,
74 clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY | _PAGE_CO, 75 PTRS_PER_PTE * sizeof(pte_t));
75 PTRS_PER_PTE * sizeof(pte_t));
76 else
77 clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY,
78 PTRS_PER_PTE * sizeof(pte_t));
79 return pte; 76 return pte;
80} 77}
81 78
@@ -116,8 +113,7 @@ static int vmem_add_mem(unsigned long start, unsigned long size, int ro)
116 if (MACHINE_HAS_HPAGE && !(address & ~HPAGE_MASK) && 113 if (MACHINE_HAS_HPAGE && !(address & ~HPAGE_MASK) &&
117 (address + HPAGE_SIZE <= start + size) && 114 (address + HPAGE_SIZE <= start + size) &&
118 (address >= HPAGE_SIZE)) { 115 (address >= HPAGE_SIZE)) {
119 pte_val(pte) |= _SEGMENT_ENTRY_LARGE | 116 pte_val(pte) |= _SEGMENT_ENTRY_LARGE;
120 _SEGMENT_ENTRY_CO;
121 pmd_val(*pm_dir) = pte_val(pte); 117 pmd_val(*pm_dir) = pte_val(pte);
122 address += HPAGE_SIZE - PAGE_SIZE; 118 address += HPAGE_SIZE - PAGE_SIZE;
123 continue; 119 continue;