diff options
author | Paul Mackerras <paulus@samba.org> | 2008-12-03 04:11:06 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-12-03 04:11:06 -0500 |
commit | 527491885554002837b5742202adc0ab5f536e54 (patch) | |
tree | 6d9c44776e0b4368eccd414b92b957fac3c5a4c6 /arch/powerpc/sysdev/mpic.c | |
parent | cea555d384b85271035814c5adad23e6c7fc5d2a (diff) | |
parent | 2434bbb30e79468c49cff3cff6005236f55ed188 (diff) |
Merge branch 'merge'
Diffstat (limited to 'arch/powerpc/sysdev/mpic.c')
-rw-r--r-- | arch/powerpc/sysdev/mpic.c | 11 |
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 |
606 | static int irq_choose_cpu(unsigned int virt_irq) | 606 | static 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) | |||
1260 | void __init mpic_init(struct mpic *mpic) | 1260 | void __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 */ |