[PATCH] Fix migrate_irqs_away
Anton Blanchard
anton at samba.org
Sun Jul 25 05:15:37 EST 2004
In migrate_irqs_away we werent converting a virtual irq to a real one.
Signed-off-by: Anton Blanchard <anton at samba.org>
===== xics.c 1.44 vs edited =====
--- 1.44/arch/ppc64/kernel/xics.c Fri May 28 15:34:39 2004
+++ edited/xics.c Sun Jul 25 04:59:24 2004
@@ -657,7 +657,7 @@
int set_indicator = rtas_token("set-indicator");
const unsigned int giqs = 9005UL; /* Global Interrupt Queue Server */
int status = 0;
- unsigned int irq, cpu = smp_processor_id();
+ unsigned int irq, virq, cpu = smp_processor_id();
int xics_status[2];
unsigned long flags;
@@ -677,11 +677,12 @@
iosync();
printk(KERN_WARNING "HOTPLUG: Migrating IRQs away\n");
- for_each_irq(irq) {
- irq_desc_t *desc = get_irq_desc(irq);
+ for_each_irq(virq) {
+ irq_desc_t *desc = get_irq_desc(virq);
/* We need to get IPIs still. */
- if (irq_offset_down(irq) == XICS_IPI)
+ irq = virt_irq_to_real(irq_offset_down(virq));
+ if (irq == XICS_IPI || irq == NO_IRQ)
continue;
/* We only need to migrate enabled IRQS */
@@ -696,7 +697,7 @@
if (status) {
printk(KERN_ERR "migrate_irqs_away: irq=%d "
"ibm,get-xive returns %d\n",
- irq, status);
+ virq, status);
goto unlock;
}
@@ -709,17 +710,17 @@
goto unlock;
printk(KERN_WARNING "IRQ %d affinity broken off cpu %u\n",
- irq, cpu);
+ virq, cpu);
/* Reset affinity to all cpus */
xics_status[0] = default_distrib_server;
- status = rtas_call(ibm_set_xive, 3, 1, NULL,
- irq, xics_status[0], xics_status[1]);
+ status = rtas_call(ibm_set_xive, 3, 1, NULL, irq,
+ xics_status[0], xics_status[1]);
if (status)
printk(KERN_ERR "migrate_irqs_away irq=%d "
"ibm,set-xive returns %d\n",
- irq, status);
+ virq, status);
unlock:
spin_unlock_irqrestore(&desc->lock, flags);
** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc64-dev
mailing list