* [PATCH] powerpc/xics/opal: Fix processor numbers in OPAL ICP
@ 2016-09-06 3:43 Benjamin Herrenschmidt
2016-09-08 9:47 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2016-09-06 3:43 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Michael Ellerman
When using the OPAL ICP backend we incorrectly pass Linux CPU numbers
rather than HW CPU numbers to OPAL.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Fixes: d74361881f0dfe5f9dcac37d1b753a15a2345d8c
---
diff --git a/arch/powerpc/sysdev/xics/icp-opal.c b/arch/powerpc/sysdev/xics/icp-opal.c
index 57d72f1..9114243 100644
--- a/arch/powerpc/sysdev/xics/icp-opal.c
+++ b/arch/powerpc/sysdev/xics/icp-opal.c
@@ -23,10 +23,10 @@
static void icp_opal_teardown_cpu(void)
{
- int cpu = smp_processor_id();
+ int hw_cpu = hard_smp_processor_id();
/* Clear any pending IPI */
- opal_int_set_mfrr(cpu, 0xff);
+ opal_int_set_mfrr(hw_cpu, 0xff);
}
static void icp_opal_flush_ipi(void)
@@ -101,14 +101,16 @@ static void icp_opal_eoi(struct irq_data *d)
static void icp_opal_cause_ipi(int cpu, unsigned long data)
{
- opal_int_set_mfrr(cpu, IPI_PRIORITY);
+ int hw_cpu = get_hard_smp_processor_id(cpu);
+
+ opal_int_set_mfrr(hw_cpu, IPI_PRIORITY);
}
static irqreturn_t icp_opal_ipi_action(int irq, void *dev_id)
{
- int cpu = smp_processor_id();
+ int hw_cpu = hard_smp_processor_id();
- opal_int_set_mfrr(cpu, 0xff);
+ opal_int_set_mfrr(hw_cpu, 0xff);
return smp_ipi_demux();
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: powerpc/xics/opal: Fix processor numbers in OPAL ICP
2016-09-06 3:43 [PATCH] powerpc/xics/opal: Fix processor numbers in OPAL ICP Benjamin Herrenschmidt
@ 2016-09-08 9:47 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2016-09-08 9:47 UTC (permalink / raw)
To: Benjamin Herrenschmidt, linuxppc-dev; +Cc: Michael Ellerman
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 401 bytes --]
On Tue, 2016-06-09 at 03:43:45 UTC, Benjamin Herrenschmidt wrote:
> When using the OPAL ICP backend we incorrectly pass Linux CPU numbers
> rather than HW CPU numbers to OPAL.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Fixes: d74361881f0dfe5f9dcac37d1b753a15a2345d8c
Applied to powerpc fixes, thanks.
https://git.kernel.org/powerpc/c/f8e33475b0da98c4bffc91017a
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-08 9:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-06 3:43 [PATCH] powerpc/xics/opal: Fix processor numbers in OPAL ICP Benjamin Herrenschmidt
2016-09-08 9:47 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).