Commit 92cb3694 authored by Anton Blanchard's avatar Anton Blanchard Committed by Benjamin Herrenschmidt

powerpc/pseries: Fix xics interrupt affinity

Commit 57b150cc (irq: only update affinity if
->set_affinity() is sucessfull) broke xics irq affinity.

We need to use the cpumask passed in, instead of accessing ->affinity directly.
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent e443ed35
...@@ -163,14 +163,13 @@ static inline void lpar_qirr_info(int n_cpu , u8 value) ...@@ -163,14 +163,13 @@ static inline void lpar_qirr_info(int n_cpu , u8 value)
/* Interface to generic irq subsystem */ /* Interface to generic irq subsystem */
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
static int get_irq_server(unsigned int virq, unsigned int strict_check) static int get_irq_server(unsigned int virq, cpumask_t cpumask,
unsigned int strict_check)
{ {
int server; int server;
/* For the moment only implement delivery to all cpus or one cpu */ /* For the moment only implement delivery to all cpus or one cpu */
cpumask_t cpumask;
cpumask_t tmp = CPU_MASK_NONE; cpumask_t tmp = CPU_MASK_NONE;
cpumask_copy(&cpumask, irq_to_desc(virq)->affinity);
if (!distribute_irqs) if (!distribute_irqs)
return default_server; return default_server;
...@@ -192,7 +191,8 @@ static int get_irq_server(unsigned int virq, unsigned int strict_check) ...@@ -192,7 +191,8 @@ static int get_irq_server(unsigned int virq, unsigned int strict_check)
return default_server; return default_server;
} }
#else #else
static int get_irq_server(unsigned int virq, unsigned int strict_check) static int get_irq_server(unsigned int virq, cpumask_t cpumask,
unsigned int strict_check)
{ {
return default_server; return default_server;
} }
...@@ -211,7 +211,7 @@ static void xics_unmask_irq(unsigned int virq) ...@@ -211,7 +211,7 @@ static void xics_unmask_irq(unsigned int virq)
if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS) if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS)
return; return;
server = get_irq_server(virq, 0); server = get_irq_server(virq, *(irq_to_desc(virq)->affinity), 0);
call_status = rtas_call(ibm_set_xive, 3, 1, NULL, irq, server, call_status = rtas_call(ibm_set_xive, 3, 1, NULL, irq, server,
DEFAULT_PRIORITY); DEFAULT_PRIORITY);
...@@ -405,7 +405,7 @@ static int xics_set_affinity(unsigned int virq, const struct cpumask *cpumask) ...@@ -405,7 +405,7 @@ static int xics_set_affinity(unsigned int virq, const struct cpumask *cpumask)
* For the moment only implement delivery to all cpus or one cpu. * For the moment only implement delivery to all cpus or one cpu.
* Get current irq_server for the given irq * Get current irq_server for the given irq
*/ */
irq_server = get_irq_server(virq, 1); irq_server = get_irq_server(virq, *cpumask, 1);
if (irq_server == -1) { if (irq_server == -1) {
char cpulist[128]; char cpulist[128];
cpumask_scnprintf(cpulist, sizeof(cpulist), cpumask); cpumask_scnprintf(cpulist, sizeof(cpulist), cpumask);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment