Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 169934
b: refs/heads/master
c: 5231a68
h: refs/heads/master
v: v3
  • Loading branch information
Suresh Siddha authored and Ingo Molnar committed Nov 2, 2009
1 parent bfe3fbc commit 079e3ac
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b3ec0a37a7907813bb4fb85a2d94102c152470b7
refs/heads/master: 5231a68614b94f60e8f6c56bc6e3d75955b9e75e
32 changes: 28 additions & 4 deletions trunk/arch/x86/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ EXPORT_SYMBOL_GPL(vector_used_by_percpu_irq);
/* A cpu has been removed from cpu_online_mask. Reset irq affinities. */
void fixup_irqs(void)
{
unsigned int irq;
unsigned int irq, vector;
static int warned;
struct irq_desc *desc;

Expand Down Expand Up @@ -336,9 +336,33 @@ void fixup_irqs(void)
printk("Cannot set affinity for irq %i\n", irq);
}

/* That doesn't seem sufficient. Give it 1ms. */
local_irq_enable();
/*
* We can remove mdelay() and then send spuriuous interrupts to
* new cpu targets for all the irqs that were handled previously by
* this cpu. While it works, I have seen spurious interrupt messages
* (nothing wrong but still...).
*
* So for now, retain mdelay(1) and check the IRR and then send those
* interrupts to new targets as this cpu is already offlined...
*/
mdelay(1);
local_irq_disable();

for (vector = FIRST_EXTERNAL_VECTOR; vector < NR_VECTORS; vector++) {
unsigned int irr;

if (__get_cpu_var(vector_irq)[vector] < 0)
continue;

irr = apic_read(APIC_IRR + (vector / 32 * 0x10));
if (irr & (1 << (vector % 32))) {
irq = __get_cpu_var(vector_irq)[vector];

desc = irq_to_desc(irq);
spin_lock(&desc->lock);
if (desc->chip->retrigger)
desc->chip->retrigger(irq);
spin_unlock(&desc->lock);
}
}
}
#endif

0 comments on commit 079e3ac

Please sign in to comment.