]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - arch/powerpc/kernel/exceptions-64s.S
powerpc/64s: Invalidate ERAT on powersave wakeup for POWER9
[mirror_ubuntu-zesty-kernel.git] / arch / powerpc / kernel / exceptions-64s.S
index f86eb236324e1207352e1deccb67526f399c03ac..79318275e507d04cb11d7621379c0a1cc989f6b4 100644 (file)
@@ -99,7 +99,11 @@ EXC_VIRT_NONE(0x4000, 0x4100)
 #ifdef CONFIG_PPC_P7_NAP
        /*
         * If running native on arch 2.06 or later, check if we are waking up
-        * from nap/sleep/winkle, and branch to idle handler.
+        * from nap/sleep/winkle, and branch to idle handler. This tests SRR1
+        * bits 46:47. A non-0 value indicates that we are coming from a power
+        * saving state. The idle wakeup handler initially runs in real mode,
+        * but we branch to the 0xc000... address so we can turn on relocation
+        * with mtmsr.
         */
 #define IDLETEST(n)                                                    \
        BEGIN_FTR_SECTION ;                                             \
@@ -982,7 +986,7 @@ TRAMP_REAL_BEGIN(hmi_exception_early)
        EXCEPTION_PROLOG_COMMON_2(PACA_EXGEN)
        EXCEPTION_PROLOG_COMMON_3(0xe60)
        addi    r3,r1,STACK_FRAME_OVERHEAD
-       bl      hmi_exception_realmode
+       BRANCH_LINK_TO_FAR(r4, hmi_exception_realmode)
        /* Windup the stack. */
        /* Move original HSRR0 and HSRR1 into the respective regs */
        ld      r9,_MSR(r1)