diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2015-03-27 10:18:01 +0000 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2015-03-27 12:21:27 +0000 |
commit | a9fea8b388ed5838fe0744970e67f7019d420824 (patch) | |
tree | 69c95a69f36ad31bc884e6f86a131ee47158fac7 /arch/arm/kernel/vmlinux.lds.S | |
parent | 12eb3e833961bfe532b763a6e4e817ec87f48bc7 (diff) | |
download | linux-stable-a9fea8b388ed5838fe0744970e67f7019d420824.tar.gz linux-stable-a9fea8b388ed5838fe0744970e67f7019d420824.tar.bz2 linux-stable-a9fea8b388ed5838fe0744970e67f7019d420824.zip |
ARM: kvm: round HYP section to page size instead of log2 upper bound
Older binutils do not support expressions involving the values of
external symbols so just round up the HYP region to the page size.
Tested-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
[will: when will this ever end?!]
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm/kernel/vmlinux.lds.S')
-rw-r--r-- | arch/arm/kernel/vmlinux.lds.S | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index 808398ec024e..f2db429ea75d 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S @@ -12,26 +12,6 @@ #include <asm/pgtable.h> #endif -/* - * Poor man's version of LOG2CEIL(), which is - * not available in binutils before v2.24. - */ -#define LOG2_ROUNDUP(size) ( \ - __LOG2_ROUNDUP(size, 2) \ - __LOG2_ROUNDUP(size, 3) \ - __LOG2_ROUNDUP(size, 4) \ - __LOG2_ROUNDUP(size, 5) \ - __LOG2_ROUNDUP(size, 6) \ - __LOG2_ROUNDUP(size, 7) \ - __LOG2_ROUNDUP(size, 8) \ - __LOG2_ROUNDUP(size, 9) \ - __LOG2_ROUNDUP(size, 10) \ - __LOG2_ROUNDUP(size, 11) \ - 12) - -#define __LOG2_ROUNDUP(size, order) \ - (size) <= (1 << order) ? order : - #define PROC_INFO \ . = ALIGN(4); \ VMLINUX_SYMBOL(__proc_info_begin) = .; \ @@ -43,20 +23,11 @@ VMLINUX_SYMBOL(__idmap_text_start) = .; \ *(.idmap.text) \ VMLINUX_SYMBOL(__idmap_text_end) = .; \ - . = ALIGN(1 << LOG2_ROUNDUP(__hyp_idmap_size)); \ + . = ALIGN(PAGE_SIZE); \ VMLINUX_SYMBOL(__hyp_idmap_text_start) = .; \ *(.hyp.idmap.text) \ VMLINUX_SYMBOL(__hyp_idmap_text_end) = .; -/* - * If the HYP idmap .text section is populated, it needs to be positioned - * such that it will not cross a page boundary in the final output image. - * So align it to the section size rounded up to the next power of 2. - * If __hyp_idmap_size is undefined, the section will be empty so define - * it as 0 in that case. - */ -PROVIDE(__hyp_idmap_size = 0); - #ifdef CONFIG_HOTPLUG_CPU #define ARM_CPU_DISCARD(x) #define ARM_CPU_KEEP(x) x |