[PATCH 1/2] UBUNTU: SAUCE: book3e cleanups for CONFIG_RELOCATABLE
Ben Collins
bcollins at ubuntu.com
Tue Apr 29 23:59:16 UTC 2014
This patch fixes sauce patches related to CONFIG_RELOCATABLE and issues
with upstream usage of __end_interrupts with is named differently in
exceptions-64e.S for BOOK3E.
Signed-off-by: Ben Collins <ben.c at servergy.com>
---
arch/powerpc/include/asm/sections.h | 13 +++++++++++--
arch/powerpc/kernel/head_64.S | 2 +-
arch/powerpc/lib/feature-fixups.c | 5 ++++-
3 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/include/asm/sections.h b/arch/powerpc/include/asm/sections.h
index d0e784e..ed44bb1 100644
--- a/arch/powerpc/include/asm/sections.h
+++ b/arch/powerpc/include/asm/sections.h
@@ -8,8 +8,13 @@
#ifdef __powerpc64__
+#ifdef CONFIG_PPC_BOOK3E
+extern char interrupt_base_book3e[];
+extern char interrupt_end_book3e[];
+#else
extern char __start_interrupts[];
extern char __end_interrupts[];
+#endif
extern char __prom_init_toc_start[];
extern char __prom_init_toc_end[];
@@ -26,9 +31,13 @@ static inline int overlaps_interrupt_vector_text(unsigned long start,
unsigned long end)
{
unsigned long real_start, real_end;
+#ifdef CONFIG_PPC_BOOK3E
+ real_start = interrupt_base_book3e - _stext;
+ real_end = interrupt_end_book3e - _stext;
+#else
real_start = __start_interrupts - _stext;
real_end = __end_interrupts - _stext;
-
+#endif
return start < (unsigned long)__va(real_end) &&
(unsigned long)__va(real_start) < end;
}
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index 804ed65..0d5cbe5 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -490,7 +490,7 @@ _STATIC(__after_prom_start)
bne 3f
#ifdef CONFIG_PPC_BOOK3E
- LOAD_REG_ADDR(r5, __end_interrupts)
+ LOAD_REG_ADDR(r5, interrupt_end_book3e)
LOAD_REG_ADDR(r11, _stext)
sub r5,r5,r11
#else
diff --git a/arch/powerpc/lib/feature-fixups.c b/arch/powerpc/lib/feature-fixups.c
index 7a8a748..46b4f57 100644
--- a/arch/powerpc/lib/feature-fixups.c
+++ b/arch/powerpc/lib/feature-fixups.c
@@ -141,8 +141,11 @@ void do_final_fixups(void)
src = (int *)(KERNELBASE + PHYSICAL_START);
dest = (int *)KERNELBASE;
+#ifdef CONFIG_PPC_BOOK3E
+ length = (interrupt_end_book3e - _stext) / sizeof(int);
+#else
length = (__end_interrupts - _stext) / sizeof(int);
-
+#endif
while (length--) {
patch_instruction(dest, *src);
src++;
--
1.9.1
More information about the kernel-team
mailing list