@@ -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;
}
@@ -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
@@ -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++;
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(-)