]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: kernel: perform relocation processing from ID map
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 18 Apr 2016 15:09:43 +0000 (17:09 +0200)
committerWill Deacon <will.deacon@arm.com>
Tue, 26 Apr 2016 11:21:54 +0000 (12:21 +0100)
commit3b3642d69ffcf8dd13b01409a6abbef55754023e
tree13471ceb09b0a000472a200807df7566dd7feee7
parent7856083b08daefa205d5057e5bfc5f25b1b6932c
arm64: kernel: perform relocation processing from ID map

Refactor the relocation processing so that the code executes from the
ID map while accessing the relocation tables via the virtual mapping.
This way, we can use literals containing virtual addresses as before,
instead of having to use convoluted absolute expressions.

For symmetry with the secondary code path, the relocation code and the
subsequent jump to the virtual entry point are implemented in a function
called __primary_switch(), and __mmap_switched() is renamed to
__primary_switched(). Also, the call sequence in stext() is aligned with
the one in secondary_startup(), by replacing the awkward 'adr_l lr' and
'b cpu_setup' sequence with a simple branch and link.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/head.S
arch/arm64/kernel/vmlinux.lds.S