From: Benjamin Herrenschmidt Date: Mon, 8 Oct 2018 04:08:31 +0000 (+1100) Subject: powerpc: Fix HMIs on big-endian with CONFIG_RELOCATABLE=y X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=505a314fb28ce122091691c51426fa85c084e115;p=openwrt%2Fstaging%2Fblogic.git powerpc: Fix HMIs on big-endian with CONFIG_RELOCATABLE=y HMIs will crash the kernel due to BRANCH_LINK_TO_FAR(hmi_exception_realmode) Calling into the OPD instead of the actual code. Fixes: 2337d207288f ("powerpc/64: CONFIG_RELOCATABLE support for hmi interrupts") Signed-off-by: Benjamin Herrenschmidt [mpe: Use DOTSYM() rather than #ifdef] Signed-off-by: Michael Ellerman --- diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index 89d32bb79d5e..ed3d6fa8be53 100644 --- a/arch/powerpc/kernel/exceptions-64s.S +++ b/arch/powerpc/kernel/exceptions-64s.S @@ -1031,7 +1031,7 @@ TRAMP_REAL_BEGIN(hmi_exception_early) EXCEPTION_PROLOG_COMMON_2(PACA_EXGEN) EXCEPTION_PROLOG_COMMON_3(0xe60) addi r3,r1,STACK_FRAME_OVERHEAD - BRANCH_LINK_TO_FAR(hmi_exception_realmode) /* Function call ABI */ + BRANCH_LINK_TO_FAR(DOTSYM(hmi_exception_realmode)) /* Function call ABI */ cmpdi cr0,r3,0 /* Windup the stack. */