powerpc/32s: Setup the early hash table at all time.
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Thu, 1 Oct 2020 15:35:38 +0000 (15:35 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 8 Oct 2020 10:17:14 +0000 (21:17 +1100)
commit69a1593abdbcf03a76367320d929a8ae7a5e3d71
tree3e0fe7441b16171a6a5bf725ade0222f935fc334
parent63f9d9df5ed0d4f3a2c0cd08730e1cae1edd11bf
powerpc/32s: Setup the early hash table at all time.

At the time being, an early hash table is set up when
CONFIG_KASAN is selected.

There is nothing wrong with setting such an early hash table
all the time, even if it is not used. This is a statically
allocated 256 kB table which lies in the init data section.

This makes the code simpler and may in the future allow to
setup early IO mappings with fixmap instead of hard coding BATs.

Put create_hpte() and flush_hash_pages() in the .ref.text section
in order to avoid warning for the reference to early_hash[]. This
reference is removed by MMU_init_hw_patch() before init memory is
freed.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/b8f8101c368b8a6451844a58d7bd7d83c14cf2aa.1601566529.git.christophe.leroy@csgroup.eu
arch/powerpc/kernel/head_32.S
arch/powerpc/mm/book3s32/hash_low.S
arch/powerpc/mm/book3s32/mmu.c
arch/powerpc/mm/kasan/kasan_init_32.c