On Wed, 21 Sep 2016 17:43:29 +1000
Nicholas Piggin <npig...@gmail.com> wrote:

> Use assembler sections of fixed size and location to arrange pseries
> exception vector code (64e also using it in head_64.S for 0x0..0x100).
> 
> This allows better flexibility in arranging exception code and hiding
> unimportant details behind macros.
> 
> Gas sections can be a bit painful to use this way, mainly because the
> assembler does not know where they will be finally linked. Taking
> absolute addresses requires a bit of trickery for example, but it can
> be hidden behind macros for the most part.
> 
> Generated code is mostly the same except locations, offsets, alignments.

Okay, this patch requires the following change that I missed when
rebasing it. In some configurations it causes linker stubs to be
inserted in a way that shifts code and breaks things.

I thought I'd caught all such linker stub breakages at link time with
the linker script change, but not so. I'll keep working on that.


From f03ff61077b775c4d094eff152fb3ca2b98a2c59 Mon Sep 17 00:00:00 2001
From: Nicholas Piggin <npig...@gmail.com>
Date: Thu, 22 Sep 2016 13:49:57 +1000
Subject: [PATCH] powerpc/64s: hmi_exception_early is "unrelocated" so must be 
in trampoline section

---
 arch/powerpc/kernel/exceptions-64s.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/exceptions-64s.S 
b/arch/powerpc/kernel/exceptions-64s.S
index 11a7b28..df58681 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -1168,7 +1168,7 @@ COMMON_HANDLER(cbe_thermal_common, 0x1800, 
cbe_thermal_exception)
 #endif /* CONFIG_CBE_RAS */
 
 
-COMMON_HANDLER_BEGIN(hmi_exception_early)
+TRAMP_HANDLER_BEGIN(hmi_exception_early)
        EXCEPTION_PROLOG_1(PACA_EXGEN, KVMTEST_HV, 0xe60)
        mr      r10,r1                  /* Save r1                      */
        ld      r1,PACAEMERGSP(r13)     /* Use emergency stack          */
@@ -1216,7 +1216,7 @@ hmi_exception_after_realmode:
        SET_SCRATCH0(r13)
        EXCEPTION_PROLOG_0(PACA_EXGEN)
        b       tramp_real_hmi_exception
-COMMON_HANDLER_END(hmi_exception_early)
+TRAMP_HANDLER_END(hmi_exception_early)
 
 
 #define MACHINE_CHECK_HANDLER_WINDUP                   \
-- 
2.9.3

Reply via email to