diff mbox

[1/2] UBUNTU: SAUCE: book3e cleanups for CONFIG_RELOCATABLE

Message ID 536041d8.ac7f320a.19f6.2ba5@mx.google.com
State New
Headers show

Commit Message

Benjamin Collins April 29, 2014, 11:59 p.m. UTC
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@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(-)

Comments

Benjamin Collins April 30, 2014, 12:22 a.m. UTC | #1
In case it wasn't apparent, both of these patches are for utopic to get powerpc64-emb compiling.

--
Ben Collins - Principal Architect
Servergy, Inc. - www.servergy.com
Andy Whitcroft April 30, 2014, 8:15 a.m. UTC | #2
On Tue, Apr 29, 2014 at 08:22:33PM -0400, Ben Collins wrote:
> In case it wasn't apparent, both of these patches are for utopic to get powerpc64-emb compiling.

Thanks Ben, I'll hoover them up.

-apw
diff mbox

Patch

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++;