Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/xive: Remove P9 DD1 flag XIVE_IRQ_FLAG_EOI_FW

This flag was used to support the P9 DD1 and we have stopped
supporting this CPU when DD2 came out. See skiboot commit:

https://github.com/open-power/skiboot/commit/0b0d15e3c170

Also, remove eoi handler which is now unused.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201210171450.1933725-11-clg@kaod.org

authored by

Cédric Le Goater and committed by
Michael Ellerman
cf58b746 b5277d18

+3 -36
+1 -1
arch/powerpc/include/asm/opal-api.h
··· 1093 1093 OPAL_XIVE_IRQ_LSI = 0x00000004, 1094 1094 OPAL_XIVE_IRQ_SHIFT_BUG = 0x00000008, /* P9 DD1.0 workaround */ 1095 1095 OPAL_XIVE_IRQ_MASK_VIA_FW = 0x00000010, /* P9 DD1.0 workaround */ 1096 - OPAL_XIVE_IRQ_EOI_VIA_FW = 0x00000020, 1096 + OPAL_XIVE_IRQ_EOI_VIA_FW = 0x00000020, /* P9 DD1.0 workaround */ 1097 1097 }; 1098 1098 1099 1099 /* Flags for OPAL_XIVE_GET/SET_QUEUE_INFO */
+1 -1
arch/powerpc/include/asm/xive.h
··· 62 62 #define XIVE_IRQ_FLAG_LSI 0x02 63 63 /* #define XIVE_IRQ_FLAG_SHIFT_BUG 0x04 */ /* P9 DD1.0 workaround */ 64 64 /* #define XIVE_IRQ_FLAG_MASK_FW 0x08 */ /* P9 DD1.0 workaround */ 65 - #define XIVE_IRQ_FLAG_EOI_FW 0x10 65 + /* #define XIVE_IRQ_FLAG_EOI_FW 0x10 */ /* P9 DD1.0 workaround */ 66 66 #define XIVE_IRQ_FLAG_H_INT_ESB 0x20 67 67 68 68 /* Special flag set by KVM for excalation interrupts */
-2
arch/powerpc/kvm/book3s_xive_template.c
··· 74 74 /* If the XIVE supports the new "store EOI facility, use it */ 75 75 if (xd->flags & XIVE_IRQ_FLAG_STORE_EOI) 76 76 __x_writeq(0, __x_eoi_page(xd) + XIVE_ESB_STORE_EOI); 77 - else if (hw_irq && xd->flags & XIVE_IRQ_FLAG_EOI_FW) 78 - opal_int_eoi(hw_irq); 79 77 else if (xd->flags & XIVE_IRQ_FLAG_LSI) { 80 78 /* 81 79 * For LSIs the HW EOI cycle is used rather than PQ bits,
+1 -13
arch/powerpc/sysdev/xive/common.c
··· 354 354 /* If the XIVE supports the new "store EOI facility, use it */ 355 355 if (xd->flags & XIVE_IRQ_FLAG_STORE_EOI) 356 356 xive_esb_write(xd, XIVE_ESB_STORE_EOI, 0); 357 - else if (hw_irq && xd->flags & XIVE_IRQ_FLAG_EOI_FW) { 358 - /* 359 - * The FW told us to call it. This happens for some 360 - * interrupt sources that need additional HW whacking 361 - * beyond the ESB manipulation. For example LPC interrupts 362 - * on P9 DD1.0 needed a latch to be clared in the LPC bridge 363 - * itself. The Firmware will take care of it. 364 - */ 365 - if (WARN_ON_ONCE(!xive_ops->eoi)) 366 - return; 367 - xive_ops->eoi(hw_irq); 368 - } else { 357 + else { 369 358 u8 eoi_val; 370 359 371 360 /* ··· 1256 1267 } xive_irq_flags[] = { 1257 1268 { XIVE_IRQ_FLAG_STORE_EOI, "STORE_EOI" }, 1258 1269 { XIVE_IRQ_FLAG_LSI, "LSI" }, 1259 - { XIVE_IRQ_FLAG_EOI_FW, "EOI_FW" }, 1260 1270 { XIVE_IRQ_FLAG_H_INT_ESB, "H_INT_ESB" }, 1261 1271 { XIVE_IRQ_FLAG_NO_EOI, "NO_EOI" }, 1262 1272 };
-12
arch/powerpc/sysdev/xive/native.c
··· 64 64 data->flags |= XIVE_IRQ_FLAG_STORE_EOI; 65 65 if (opal_flags & OPAL_XIVE_IRQ_LSI) 66 66 data->flags |= XIVE_IRQ_FLAG_LSI; 67 - if (opal_flags & OPAL_XIVE_IRQ_EOI_VIA_FW) 68 - data->flags |= XIVE_IRQ_FLAG_EOI_FW; 69 67 data->eoi_page = be64_to_cpu(eoi_page); 70 68 data->trig_page = be64_to_cpu(trig_page); 71 69 data->esb_shift = be32_to_cpu(esb_shift); ··· 378 380 } 379 381 } 380 382 381 - static void xive_native_eoi(u32 hw_irq) 382 - { 383 - /* 384 - * Not normally used except if specific interrupts need 385 - * a workaround on EOI. 386 - */ 387 - opal_int_eoi(hw_irq); 388 - } 389 - 390 383 static void xive_native_setup_cpu(unsigned int cpu, struct xive_cpu *xc) 391 384 { 392 385 s64 rc; ··· 460 471 .match = xive_native_match, 461 472 .shutdown = xive_native_shutdown, 462 473 .update_pending = xive_native_update_pending, 463 - .eoi = xive_native_eoi, 464 474 .setup_cpu = xive_native_setup_cpu, 465 475 .teardown_cpu = xive_native_teardown_cpu, 466 476 .sync_source = xive_native_sync_source,
-6
arch/powerpc/sysdev/xive/spapr.c
··· 628 628 } 629 629 } 630 630 631 - static void xive_spapr_eoi(u32 hw_irq) 632 - { 633 - /* Not used */; 634 - } 635 - 636 631 static void xive_spapr_setup_cpu(unsigned int cpu, struct xive_cpu *xc) 637 632 { 638 633 /* Only some debug on the TIMA settings */ ··· 672 677 .match = xive_spapr_match, 673 678 .shutdown = xive_spapr_shutdown, 674 679 .update_pending = xive_spapr_update_pending, 675 - .eoi = xive_spapr_eoi, 676 680 .setup_cpu = xive_spapr_setup_cpu, 677 681 .teardown_cpu = xive_spapr_teardown_cpu, 678 682 .sync_source = xive_spapr_sync_source,
-1
arch/powerpc/sysdev/xive/xive-internal.h
··· 52 52 void (*shutdown)(void); 53 53 54 54 void (*update_pending)(struct xive_cpu *xc); 55 - void (*eoi)(u32 hw_irq); 56 55 void (*sync_source)(u32 hw_irq); 57 56 u64 (*esb_rw)(u32 hw_irq, u32 offset, u64 data, bool write); 58 57 #ifdef CONFIG_SMP