diff options
Diffstat (limited to 'arch/s390/mm/init.c')
-rw-r--r-- | arch/s390/mm/init.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index d4b9fb4d0042..5d633019d8f3 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c | |||
@@ -93,18 +93,22 @@ static unsigned long setup_zero_pages(void) | |||
93 | void __init paging_init(void) | 93 | void __init paging_init(void) |
94 | { | 94 | { |
95 | unsigned long max_zone_pfns[MAX_NR_ZONES]; | 95 | unsigned long max_zone_pfns[MAX_NR_ZONES]; |
96 | unsigned long pgd_type; | 96 | unsigned long pgd_type, asce_bits; |
97 | 97 | ||
98 | init_mm.pgd = swapper_pg_dir; | 98 | init_mm.pgd = swapper_pg_dir; |
99 | S390_lowcore.kernel_asce = __pa(init_mm.pgd) & PAGE_MASK; | ||
100 | #ifdef CONFIG_64BIT | 99 | #ifdef CONFIG_64BIT |
101 | /* A three level page table (4TB) is enough for the kernel space. */ | 100 | if (VMALLOC_END > (1UL << 42)) { |
102 | S390_lowcore.kernel_asce |= _ASCE_TYPE_REGION3 | _ASCE_TABLE_LENGTH; | 101 | asce_bits = _ASCE_TYPE_REGION2 | _ASCE_TABLE_LENGTH; |
103 | pgd_type = _REGION3_ENTRY_EMPTY; | 102 | pgd_type = _REGION2_ENTRY_EMPTY; |
103 | } else { | ||
104 | asce_bits = _ASCE_TYPE_REGION3 | _ASCE_TABLE_LENGTH; | ||
105 | pgd_type = _REGION3_ENTRY_EMPTY; | ||
106 | } | ||
104 | #else | 107 | #else |
105 | S390_lowcore.kernel_asce |= _ASCE_TABLE_LENGTH; | 108 | asce_bits = _ASCE_TABLE_LENGTH; |
106 | pgd_type = _SEGMENT_ENTRY_EMPTY; | 109 | pgd_type = _SEGMENT_ENTRY_EMPTY; |
107 | #endif | 110 | #endif |
111 | S390_lowcore.kernel_asce = (__pa(init_mm.pgd) & PAGE_MASK) | asce_bits; | ||
108 | clear_table((unsigned long *) init_mm.pgd, pgd_type, | 112 | clear_table((unsigned long *) init_mm.pgd, pgd_type, |
109 | sizeof(unsigned long)*2048); | 113 | sizeof(unsigned long)*2048); |
110 | vmem_map_init(); | 114 | vmem_map_init(); |