Skip to content

Commit

Permalink
riscv: don't read back satp in paging_init
Browse files Browse the repository at this point in the history
init_mm.pgd (aka swapped_pgd) gets relocated like all other kernel
symbols by the elf loader, so there is no need to reload it from satp.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
  • Loading branch information
Christoph Hellwig authored and Palmer Dabbelt committed Jan 31, 2018
1 parent 0ca7a0b commit 372def1
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions arch/riscv/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ void setup_zero_page(void)

void __init paging_init(void)
{
init_mm.pgd = (pgd_t *)pfn_to_virt(csr_read(sptbr));

setup_zero_page();
local_flush_tlb_all();
zone_sizes_init();
Expand Down

0 comments on commit 372def1

Please sign in to comment.