aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/xics.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/pseries/xics.c')
-rw-r--r--arch/powerpc/platforms/pseries/xics.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c
index b9b9e11609ec..1ee66db003be 100644
--- a/arch/powerpc/platforms/pseries/xics.c
+++ b/arch/powerpc/platforms/pseries/xics.c
@@ -163,14 +163,13 @@ static inline void lpar_qirr_info(int n_cpu , u8 value)
163/* Interface to generic irq subsystem */ 163/* Interface to generic irq subsystem */
164 164
165#ifdef CONFIG_SMP 165#ifdef CONFIG_SMP
166static int get_irq_server(unsigned int virq, unsigned int strict_check) 166static int get_irq_server(unsigned int virq, cpumask_t cpumask,
167 unsigned int strict_check)
167{ 168{
168 int server; 169 int server;
169 /* For the moment only implement delivery to all cpus or one cpu */ 170 /* For the moment only implement delivery to all cpus or one cpu */
170 cpumask_t cpumask;
171 cpumask_t tmp = CPU_MASK_NONE; 171 cpumask_t tmp = CPU_MASK_NONE;
172 172
173 cpumask_copy(&cpumask, irq_to_desc(virq)->affinity);
174 if (!distribute_irqs) 173 if (!distribute_irqs)
175 return default_server; 174 return default_server;
176 175
@@ -192,10 +191,7 @@ static int get_irq_server(unsigned int virq, unsigned int strict_check)
192 return default_server; 191 return default_server;
193} 192}
194#else 193#else
195static int get_irq_server(unsigned int virq, unsigned int strict_check) 194#define get_irq_server(virq, cpumask, strict_check) (default_server)
196{
197 return default_server;
198}
199#endif 195#endif
200 196
201static void xics_unmask_irq(unsigned int virq) 197static void xics_unmask_irq(unsigned int virq)
@@ -211,7 +207,7 @@ static void xics_unmask_irq(unsigned int virq)
211 if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS) 207 if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS)
212 return; 208 return;
213 209
214 server = get_irq_server(virq, 0); 210 server = get_irq_server(virq, *(irq_to_desc(virq)->affinity), 0);
215 211
216 call_status = rtas_call(ibm_set_xive, 3, 1, NULL, irq, server, 212 call_status = rtas_call(ibm_set_xive, 3, 1, NULL, irq, server,
217 DEFAULT_PRIORITY); 213 DEFAULT_PRIORITY);
@@ -405,7 +401,7 @@ static int xics_set_affinity(unsigned int virq, const struct cpumask *cpumask)
405 * For the moment only implement delivery to all cpus or one cpu. 401 * For the moment only implement delivery to all cpus or one cpu.
406 * Get current irq_server for the given irq 402 * Get current irq_server for the given irq
407 */ 403 */
408 irq_server = get_irq_server(virq, 1); 404 irq_server = get_irq_server(virq, *cpumask, 1);
409 if (irq_server == -1) { 405 if (irq_server == -1) {
410 char cpulist[128]; 406 char cpulist[128];
411 cpumask_scnprintf(cpulist, sizeof(cpulist), cpumask); 407 cpumask_scnprintf(cpulist, sizeof(cpulist), cpumask);