Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38412
b: refs/heads/master
c: e7b946e
h: refs/heads/master
v: v3
  • Loading branch information
Eric W. Biederman authored and Linus Torvalds committed Oct 4, 2006
1 parent e93e361 commit d6fb464
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 8 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: a24ceab4f44f21749aa0b6bd38bee37c775e036f
refs/heads/master: e7b946e98a456077dd6897f726f3d6197bd7e3b9
6 changes: 6 additions & 0 deletions trunk/include/linux/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ static inline void set_native_irq_info(int irq, cpumask_t mask)

void set_pending_irq(unsigned int irq, cpumask_t mask);
void move_native_irq(int irq);
void move_masked_irq(int irq);

#ifdef CONFIG_PCI_MSI
/*
Expand Down Expand Up @@ -246,6 +247,10 @@ static inline void move_native_irq(int irq)
{
}

static inline void move_masked_irq(int irq)
{
}

static inline void set_pending_irq(unsigned int irq, cpumask_t mask)
{
}
Expand All @@ -261,6 +266,7 @@ static inline void set_irq_info(int irq, cpumask_t mask)

#define move_irq(x)
#define move_native_irq(x)
#define move_masked_irq(x)

#endif /* CONFIG_SMP */

Expand Down
28 changes: 21 additions & 7 deletions trunk/kernel/irq/migration.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ void set_pending_irq(unsigned int irq, cpumask_t mask)
spin_unlock_irqrestore(&desc->lock, flags);
}

void move_native_irq(int irq)
void move_masked_irq(int irq)
{
struct irq_desc *desc = irq_desc + irq;
cpumask_t tmp;
Expand Down Expand Up @@ -48,15 +48,29 @@ void move_native_irq(int irq)
* when an active trigger is comming in. This could
* cause some ioapics to mal-function.
* Being paranoid i guess!
*
* For correct operation this depends on the caller
* masking the irqs.
*/
if (likely(!cpus_empty(tmp))) {
if (likely(!(desc->status & IRQ_DISABLED)))
desc->chip->disable(irq);

desc->chip->set_affinity(irq,tmp);

if (likely(!(desc->status & IRQ_DISABLED)))
desc->chip->enable(irq);
}
cpus_clear(irq_desc[irq].pending_mask);
}

void move_native_irq(int irq)
{
struct irq_desc *desc = irq_desc + irq;

if (likely(!(desc->status & IRQ_MOVE_PENDING)))
return;

if (likely(!(desc->status & IRQ_DISABLED)))
desc->chip->disable(irq);

move_masked_irq(irq);

if (likely(!(desc->status & IRQ_DISABLED)))
desc->chip->enable(irq);
}

0 comments on commit d6fb464

Please sign in to comment.