diff options
author | Joey Gouly <joey.gouly@arm.com> | 2021-02-02 15:36:57 +0300 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2021-02-03 23:43:45 +0300 |
commit | 00ef543419366e8b742435992d08e0d5a87fd561 (patch) | |
tree | e41fabcdd9176181f10a0732d290f081f62dcd6d /arch/arm64/include/asm/memory.h | |
parent | b9ba680969d1016888fed4e03d8ecb4b97726f34 (diff) | |
download | linux-00ef543419366e8b742435992d08e0d5a87fd561.tar.xz |
arm64: vmlinux.ld.S: add assertion for reserved_pg_dir offset
Add RESERVED_SWAPPER_OFFSET and use that instead of hardcoding
the offset between swapper_pg_dir and reserved_pg_dir.
Then use RESERVED_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-2-joey.gouly@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/include/asm/memory.h')
-rw-r--r-- | arch/arm64/include/asm/memory.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h index 18fce223b67b..f6bf8a972a16 100644 --- a/arch/arm64/include/asm/memory.h +++ b/arch/arm64/include/asm/memory.h @@ -159,6 +159,12 @@ #define IOREMAP_MAX_ORDER (PMD_SHIFT) #endif +/* + * Open-coded (swapper_pg_dir - reserved_pg_dir) as this cannot be calculated + * until link time. + */ +#define RESERVED_SWAPPER_OFFSET (PAGE_SIZE) + #ifndef __ASSEMBLY__ #include <linux/bitops.h> |