aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/mpic.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/sysdev/mpic.c')
-rw-r--r--arch/powerpc/sysdev/mpic.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 86a7346f6f20..c82babb70074 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -600,7 +600,7 @@ static int irq_choose_cpu(unsigned int virt_irq)
600 cpuid = first_cpu(tmp); 600 cpuid = first_cpu(tmp);
601 } 601 }
602 602
603 return cpuid; 603 return get_hard_smp_processor_id(cpuid);
604} 604}
605#else 605#else
606static int irq_choose_cpu(unsigned int virt_irq) 606static int irq_choose_cpu(unsigned int virt_irq)
@@ -1260,6 +1260,7 @@ void __init mpic_set_default_senses(struct mpic *mpic, u8 *senses, int count)
1260void __init mpic_init(struct mpic *mpic) 1260void __init mpic_init(struct mpic *mpic)
1261{ 1261{
1262 int i; 1262 int i;
1263 int cpu;
1263 1264
1264 BUG_ON(mpic->num_sources == 0); 1265 BUG_ON(mpic->num_sources == 0);
1265 1266
@@ -1302,6 +1303,11 @@ void __init mpic_init(struct mpic *mpic)
1302 1303
1303 mpic_pasemi_msi_init(mpic); 1304 mpic_pasemi_msi_init(mpic);
1304 1305
1306 if (mpic->flags & MPIC_PRIMARY)
1307 cpu = hard_smp_processor_id();
1308 else
1309 cpu = 0;
1310
1305 for (i = 0; i < mpic->num_sources; i++) { 1311 for (i = 0; i < mpic->num_sources; i++) {
1306 /* start with vector = source number, and masked */ 1312 /* start with vector = source number, and masked */
1307 u32 vecpri = MPIC_VECPRI_MASK | i | 1313 u32 vecpri = MPIC_VECPRI_MASK | i |
@@ -1312,8 +1318,7 @@ void __init mpic_init(struct mpic *mpic)
1312 continue; 1318 continue;
1313 /* init hw */ 1319 /* init hw */
1314 mpic_irq_write(i, MPIC_INFO(IRQ_VECTOR_PRI), vecpri); 1320 mpic_irq_write(i, MPIC_INFO(IRQ_VECTOR_PRI), vecpri);
1315 mpic_irq_write(i, MPIC_INFO(IRQ_DESTINATION), 1321 mpic_irq_write(i, MPIC_INFO(IRQ_DESTINATION), 1 << cpu);
1316 1 << hard_smp_processor_id());
1317 } 1322 }
1318 1323
1319 /* Init spurious vector */ 1324 /* Init spurious vector */