powerpc/xics/opal: Fix processor numbers in OPAL ICP

When using the OPAL ICP backend we incorrectly pass Linux CPU numbers
rather than HW CPU numbers to OPAL.

Fixes: d74361881f0d ("powerpc/xics: Add ICP OPAL backend")
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Benjamin Herrenschmidt and committed by
Michael Ellerman
f8e33475 d81d8258

+7 -5
+7 -5
arch/powerpc/sysdev/xics/icp-opal.c
··· 23 24 static void icp_opal_teardown_cpu(void) 25 { 26 - int cpu = smp_processor_id(); 27 28 /* Clear any pending IPI */ 29 - opal_int_set_mfrr(cpu, 0xff); 30 } 31 32 static void icp_opal_flush_ipi(void) ··· 101 102 static void icp_opal_cause_ipi(int cpu, unsigned long data) 103 { 104 - opal_int_set_mfrr(cpu, IPI_PRIORITY); 105 } 106 107 static irqreturn_t icp_opal_ipi_action(int irq, void *dev_id) 108 { 109 - int cpu = smp_processor_id(); 110 111 - opal_int_set_mfrr(cpu, 0xff); 112 113 return smp_ipi_demux(); 114 }
··· 23 24 static void icp_opal_teardown_cpu(void) 25 { 26 + int hw_cpu = hard_smp_processor_id(); 27 28 /* Clear any pending IPI */ 29 + opal_int_set_mfrr(hw_cpu, 0xff); 30 } 31 32 static void icp_opal_flush_ipi(void) ··· 101 102 static void icp_opal_cause_ipi(int cpu, unsigned long data) 103 { 104 + int hw_cpu = get_hard_smp_processor_id(cpu); 105 + 106 + opal_int_set_mfrr(hw_cpu, IPI_PRIORITY); 107 } 108 109 static irqreturn_t icp_opal_ipi_action(int irq, void *dev_id) 110 { 111 + int hw_cpu = hard_smp_processor_id(); 112 113 + opal_int_set_mfrr(hw_cpu, 0xff); 114 115 return smp_ipi_demux(); 116 }