diff options
Diffstat (limited to 'arch/s390/mm/init.c')
-rw-r--r-- | arch/s390/mm/init.c | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index 202c952a29b4..fa31de6ae97a 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c | |||
@@ -77,28 +77,6 @@ void show_mem(void) | |||
77 | printk("%lu pages pagetables\n", global_page_state(NR_PAGETABLE)); | 77 | printk("%lu pages pagetables\n", global_page_state(NR_PAGETABLE)); |
78 | } | 78 | } |
79 | 79 | ||
80 | static void __init setup_ro_region(void) | ||
81 | { | ||
82 | pgd_t *pgd; | ||
83 | pud_t *pud; | ||
84 | pmd_t *pmd; | ||
85 | pte_t *pte; | ||
86 | pte_t new_pte; | ||
87 | unsigned long address, end; | ||
88 | |||
89 | address = ((unsigned long)&_stext) & PAGE_MASK; | ||
90 | end = PFN_ALIGN((unsigned long)&_eshared); | ||
91 | |||
92 | for (; address < end; address += PAGE_SIZE) { | ||
93 | pgd = pgd_offset_k(address); | ||
94 | pud = pud_offset(pgd, address); | ||
95 | pmd = pmd_offset(pud, address); | ||
96 | pte = pte_offset_kernel(pmd, address); | ||
97 | new_pte = mk_pte_phys(address, __pgprot(_PAGE_RO)); | ||
98 | *pte = new_pte; | ||
99 | } | ||
100 | } | ||
101 | |||
102 | /* | 80 | /* |
103 | * paging_init() sets up the page tables | 81 | * paging_init() sets up the page tables |
104 | */ | 82 | */ |
@@ -121,7 +99,6 @@ void __init paging_init(void) | |||
121 | clear_table((unsigned long *) init_mm.pgd, pgd_type, | 99 | clear_table((unsigned long *) init_mm.pgd, pgd_type, |
122 | sizeof(unsigned long)*2048); | 100 | sizeof(unsigned long)*2048); |
123 | vmem_map_init(); | 101 | vmem_map_init(); |
124 | setup_ro_region(); | ||
125 | 102 | ||
126 | /* enable virtual mapping in kernel mode */ | 103 | /* enable virtual mapping in kernel mode */ |
127 | __ctl_load(S390_lowcore.kernel_asce, 1, 1); | 104 | __ctl_load(S390_lowcore.kernel_asce, 1, 1); |
@@ -129,6 +106,8 @@ void __init paging_init(void) | |||
129 | __ctl_load(S390_lowcore.kernel_asce, 13, 13); | 106 | __ctl_load(S390_lowcore.kernel_asce, 13, 13); |
130 | __raw_local_irq_ssm(ssm_mask); | 107 | __raw_local_irq_ssm(ssm_mask); |
131 | 108 | ||
109 | sparse_memory_present_with_active_regions(MAX_NUMNODES); | ||
110 | sparse_init(); | ||
132 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); | 111 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); |
133 | #ifdef CONFIG_ZONE_DMA | 112 | #ifdef CONFIG_ZONE_DMA |
134 | max_zone_pfns[ZONE_DMA] = PFN_DOWN(MAX_DMA_ADDRESS); | 113 | max_zone_pfns[ZONE_DMA] = PFN_DOWN(MAX_DMA_ADDRESS); |