diff options
author | Vasily Gorbik <gor@linux.ibm.com> | 2023-01-24 17:03:24 +0100 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2023-01-31 18:56:36 +0100 |
commit | 39da9a979c4f5b07862289146b9db38209b92634 (patch) | |
tree | 978cf708169e600d63a5e20af85d157e66ad851d /arch/s390/boot | |
parent | e966ccf836e8964edf984adc4b4af5f3a3e07de6 (diff) |
s390/boot: remove pgtable_populate_end
setup_vmem() already calls populate for all online memory regions.
pgtable_populate_end() could be removed.
Also rename pgtable_populate_begin() to pgtable_populate_init().
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/boot')
-rw-r--r-- | arch/s390/boot/vmem.c | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/arch/s390/boot/vmem.c b/arch/s390/boot/vmem.c index edcad545b949..a35c251c9123 100644 --- a/arch/s390/boot/vmem.c +++ b/arch/s390/boot/vmem.c @@ -39,7 +39,7 @@ static void boot_check_oom(void) error("out of memory on boot\n"); } -static void pgtable_populate_begin(unsigned long ident_map_size) +static void pgtable_populate_init(unsigned long ident_map_size) { unsigned long initrd_end; unsigned long kernel_end; @@ -226,27 +226,6 @@ static void pgtable_populate(unsigned long addr, unsigned long end, enum populat } } -/* - * The pgtables are located in the range [pgalloc_pos, pgalloc_end). - * That range must stay intact and is later reserved in the memblock. - * Therefore pgtable_populate(pgalloc_pos, pgalloc_end) is needed to - * finalize pgalloc_pos pointer. However that call can decrease the - * value of pgalloc_pos pointer itself. Therefore, pgtable_populate() - * needs to be called repeatedly until pgtables are complete and - * pgalloc_pos does not grow left anymore. - */ -static void pgtable_populate_end(void) -{ - unsigned long pgalloc_end_curr = pgalloc_end; - unsigned long pgalloc_pos_prev; - - do { - pgalloc_pos_prev = pgalloc_pos; - pgtable_populate(pgalloc_pos, pgalloc_end_curr, POPULATE_ONE2ONE); - pgalloc_end_curr = pgalloc_pos_prev; - } while (pgalloc_pos < pgalloc_pos_prev); -} - void setup_vmem(unsigned long ident_map_size, unsigned long asce_limit) { unsigned long start, end; @@ -270,11 +249,8 @@ void setup_vmem(unsigned long ident_map_size, unsigned long asce_limit) * To allow prefixing the lowcore must be mapped with 4KB pages. * To prevent creation of a large page at address 0 first map * the lowcore and create the identity mapping only afterwards. - * - * No further pgtable_populate() calls are allowed after the value - * of pgalloc_pos finalized with a call to pgtable_populate_end(). */ - pgtable_populate_begin(ident_map_size); + pgtable_populate_init(ident_map_size); pgtable_populate(0, sizeof(struct lowcore), POPULATE_ONE2ONE); for_each_mem_detect_block(i, &start, &end) { if (start >= ident_map_size) @@ -286,7 +262,6 @@ void setup_vmem(unsigned long ident_map_size, unsigned long asce_limit) pgtable_populate(__memcpy_real_area, __memcpy_real_area + PAGE_SIZE, POPULATE_NONE); memcpy_real_ptep = __virt_to_kpte(__memcpy_real_area); - pgtable_populate_end(); S390_lowcore.kernel_asce = swapper_pg_dir | asce_bits; S390_lowcore.user_asce = s390_invalid_asce; |