powerpc/64s: Merge HV and non-HV paths for doorbell IRQ replay
authorNicholas Piggin <npiggin@gmail.com>
Fri, 11 Aug 2017 16:39:03 +0000 (02:39 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 23 Aug 2017 13:13:27 +0000 (23:13 +1000)
This results in smaller code, and fewer branches. This relies on the
fact that both the 0xe80 and 0xa00 handlers call the same upper level
code, namely doorbell_exception().

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
[mpe: Mention we rely on the implementation of the 0xe80/0xa00 handlers]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/entry_64.S
arch/powerpc/kernel/exceptions-64s.S
arch/powerpc/kernel/irq.c

index e925c1c99c71cab982967e7f7df6325e3135506f..e7bff7f9d08fd39970ff5af2723a967b1e10163f 100644 (file)
@@ -966,11 +966,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
 #ifdef CONFIG_PPC_BOOK3E
        cmpwi   cr0,r3,0x280
 #else
-       BEGIN_FTR_SECTION
-               cmpwi   cr0,r3,0xe80
-       FTR_SECTION_ELSE
-               cmpwi   cr0,r3,0xa00
-       ALT_FTR_SECTION_END_IFSET(CPU_FTR_HVMODE)
+       cmpwi   cr0,r3,0xa00
 #endif /* CONFIG_PPC_BOOK3E */
        bne     1f
        addi    r3,r1,STACK_FRAME_OVERHEAD;
index 6a6d4d9208272733432cf8a9e873770ac8ff76ed..ab1dc98b73d0b223a5964695c38554e0e7139b22 100644 (file)
@@ -1676,7 +1676,7 @@ _GLOBAL(__replay_interrupt)
        cmpwi   r3,0x500
        beq     hardware_interrupt_common
 BEGIN_FTR_SECTION
-       cmpwi   r3,0xe80
+       cmpwi   r3,0xa00
        beq     h_doorbell_common_msgclr
        cmpwi   r3,0xea0
        beq     h_virt_irq_common
index b5d7c27186bd0d5401b58f86e6155e6919aa2a0d..4e65bf82f5e0b1b368170177a43b4cd830fc0932 100644 (file)
@@ -207,8 +207,6 @@ notrace unsigned int __check_irq_replay(void)
 #else
        if (happened & PACA_IRQ_DBELL) {
                local_paca->irq_happened &= ~PACA_IRQ_DBELL;
-               if (cpu_has_feature(CPU_FTR_HVMODE))
-                       return 0xe80;
                return 0xa00;
        }
 #endif /* CONFIG_PPC_BOOK3E */