RISC-V: Move relocate and few other functions out of __init
authorAtish Patra <atish.patra@wdc.com>
Wed, 18 Mar 2020 01:11:39 +0000 (18:11 -0700)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Tue, 31 Mar 2020 18:25:50 +0000 (11:25 -0700)
commite011995e826f85fbe55dc7d4ce649461163d1052
tree1c65250470e736044cf4c6d4554b3f93c5d50c68
parent1ef46c231df4b856559ec0234bfcbb41a1180b97
RISC-V: Move relocate and few other functions out of __init

The secondary hart booting and relocation code are under .init section.
As a result, it will be freed once kernel booting is done. However,
ordered booting protocol and CPU hotplug always requires these functions
to be present to bringup harts after initial kernel boot.

Move the required functions to a different section and make sure that
they are in memory within first 2MB offset as trampoline page directory
only maps first 2MB.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/kernel/head.S
arch/riscv/kernel/vmlinux.lds.S