aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2015-03-27 08:22:50 -0400
committerWill Deacon <will.deacon@arm.com>2015-03-27 08:22:50 -0400
commit849176c96dab827548176e851525bd1c3fff5a6a (patch)
tree9bc0528b11290bb3bbfd0e1bbc1c55a646937374
parent24deabf1b29a72ec7cb8e4f5e8151d60f0066467 (diff)
parenta9fea8b388ed5838fe0744970e67f7019d420824 (diff)
Merge branch 'aarch64/kvm-bounce-page' into aarch64/for-next/core
Just as we thought we'd fixed this, another old linker reared its ugly head trying to build linux-next. Unfortunately, it's the linker binary provided on kernel.org, so give up trying to be clever and align the hyp page to 4k.
-rw-r--r--arch/arm/kernel/vmlinux.lds.S31
-rw-r--r--arch/arm/kvm/init.S3
2 files changed, 1 insertions, 33 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 @@
12#include <asm/pgtable.h> 12#include <asm/pgtable.h>
13#endif 13#endif
14 14
15/*
16 * Poor man's version of LOG2CEIL(), which is
17 * not available in binutils before v2.24.
18 */
19#define LOG2_ROUNDUP(size) ( \
20 __LOG2_ROUNDUP(size, 2) \
21 __LOG2_ROUNDUP(size, 3) \
22 __LOG2_ROUNDUP(size, 4) \
23 __LOG2_ROUNDUP(size, 5) \
24 __LOG2_ROUNDUP(size, 6) \
25 __LOG2_ROUNDUP(size, 7) \
26 __LOG2_ROUNDUP(size, 8) \
27 __LOG2_ROUNDUP(size, 9) \
28 __LOG2_ROUNDUP(size, 10) \
29 __LOG2_ROUNDUP(size, 11) \
30 12)
31
32#define __LOG2_ROUNDUP(size, order) \
33 (size) <= (1 << order) ? order :
34
35#define PROC_INFO \ 15#define PROC_INFO \
36 . = ALIGN(4); \ 16 . = ALIGN(4); \
37 VMLINUX_SYMBOL(__proc_info_begin) = .; \ 17 VMLINUX_SYMBOL(__proc_info_begin) = .; \
@@ -43,20 +23,11 @@
43 VMLINUX_SYMBOL(__idmap_text_start) = .; \ 23 VMLINUX_SYMBOL(__idmap_text_start) = .; \
44 *(.idmap.text) \ 24 *(.idmap.text) \
45 VMLINUX_SYMBOL(__idmap_text_end) = .; \ 25 VMLINUX_SYMBOL(__idmap_text_end) = .; \
46 . = ALIGN(1 << LOG2_ROUNDUP(__hyp_idmap_size)); \ 26 . = ALIGN(PAGE_SIZE); \
47 VMLINUX_SYMBOL(__hyp_idmap_text_start) = .; \ 27 VMLINUX_SYMBOL(__hyp_idmap_text_start) = .; \
48 *(.hyp.idmap.text) \ 28 *(.hyp.idmap.text) \
49 VMLINUX_SYMBOL(__hyp_idmap_text_end) = .; 29 VMLINUX_SYMBOL(__hyp_idmap_text_end) = .;
50 30
51/*
52 * If the HYP idmap .text section is populated, it needs to be positioned
53 * such that it will not cross a page boundary in the final output image.
54 * So align it to the section size rounded up to the next power of 2.
55 * If __hyp_idmap_size is undefined, the section will be empty so define
56 * it as 0 in that case.
57 */
58PROVIDE(__hyp_idmap_size = 0);
59
60#ifdef CONFIG_HOTPLUG_CPU 31#ifdef CONFIG_HOTPLUG_CPU
61#define ARM_CPU_DISCARD(x) 32#define ARM_CPU_DISCARD(x)
62#define ARM_CPU_KEEP(x) x 33#define ARM_CPU_KEEP(x) x
diff --git a/arch/arm/kvm/init.S b/arch/arm/kvm/init.S
index 11fb1d56f449..3988e72d16ff 100644
--- a/arch/arm/kvm/init.S
+++ b/arch/arm/kvm/init.S
@@ -157,6 +157,3 @@ target: @ We're now in the trampoline code, switch page tables
157__kvm_hyp_init_end: 157__kvm_hyp_init_end:
158 158
159 .popsection 159 .popsection
160
161 .global __hyp_idmap_size
162 .set __hyp_idmap_size, __kvm_hyp_init_end - __kvm_hyp_init