arm64: vmlinux.ld.S: add assertion for tramp_pg_dir offset
authorJoey Gouly <joey.gouly@arm.com>
Tue, 2 Feb 2021 12:36:58 +0000 (12:36 +0000)
committerWill Deacon <will@kernel.org>
Wed, 3 Feb 2021 20:43:45 +0000 (20:43 +0000)
commit0188a894c390e51475274ece76b4d601782d709e
tree79cf592206f63eed00a6b74f88f573ce836cd627
parent00ef543419366e8b742435992d08e0d5a87fd561
arm64: vmlinux.ld.S: add assertion for tramp_pg_dir offset

Add TRAMP_SWAPPER_OFFSET and use that instead of hardcoding
the offset between swapper_pg_dir and tramp_pg_dir.

Then use TRAMP_SWAPPER_OFFSET to assert that the offset is
correct at link time.

Signed-off-by: Joey Gouly <joey.gouly@arm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20210202123658.22308-3-joey.gouly@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/memory.h
arch/arm64/kernel/entry.S
arch/arm64/kernel/vmlinux.lds.S