diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-15 22:23:40 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-15 22:23:40 -0400 |
| commit | 5f6fb45466b2273ffb91c9cf209f164f666c33b1 (patch) | |
| tree | 2b19f24b678ae379be1b19338c3095c1f76ed41d /kernel/irq/migration.c | |
| parent | 3904afb41d4316f7a2968c615d689e19149a4f84 (diff) | |
| parent | c0185808eb85139f45dbfd0de66963c498d0c4db (diff) | |
Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (116 commits)
x86: Enable forced interrupt threading support
x86: Mark low level interrupts IRQF_NO_THREAD
x86: Use generic show_interrupts
x86: ioapic: Avoid redundant lookup of irq_cfg
x86: ioapic: Use new move_irq functions
x86: Use the proper accessors in fixup_irqs()
x86: ioapic: Use irq_data->state
x86: ioapic: Simplify irq chip and handler setup
x86: Cleanup the genirq name space
genirq: Add chip flag to force mask on suspend
genirq: Add desc->irq_data accessor
genirq: Add comments to Kconfig switches
genirq: Fixup fasteoi handler for oneshot mode
genirq: Provide forced interrupt threading
sched: Switch wait_task_inactive to schedule_hrtimeout()
genirq: Add IRQF_NO_THREAD
genirq: Allow shared oneshot interrupts
genirq: Prepare the handling of shared oneshot interrupts
genirq: Make warning in handle_percpu_event useful
x86: ioapic: Move trigger defines to io_apic.h
...
Fix up trivial(?) conflicts in arch/x86/pci/xen.c due to genirq name
space changes clashing with the Xen cleanups. The set_irq_msi() had
moved to xen_bind_pirq_msi_to_irq().
Diffstat (limited to 'kernel/irq/migration.c')
| -rw-r--r-- | kernel/irq/migration.c | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/kernel/irq/migration.c b/kernel/irq/migration.c index 441fd629ff04..ec4806d4778b 100644 --- a/kernel/irq/migration.c +++ b/kernel/irq/migration.c | |||
| @@ -4,23 +4,23 @@ | |||
| 4 | 4 | ||
| 5 | #include "internals.h" | 5 | #include "internals.h" |
| 6 | 6 | ||
| 7 | void move_masked_irq(int irq) | 7 | void irq_move_masked_irq(struct irq_data *idata) |
| 8 | { | 8 | { |
| 9 | struct irq_desc *desc = irq_to_desc(irq); | 9 | struct irq_desc *desc = irq_data_to_desc(idata); |
| 10 | struct irq_chip *chip = desc->irq_data.chip; | 10 | struct irq_chip *chip = idata->chip; |
| 11 | 11 | ||
| 12 | if (likely(!(desc->status & IRQ_MOVE_PENDING))) | 12 | if (likely(!irqd_is_setaffinity_pending(&desc->irq_data))) |
| 13 | return; | 13 | return; |
| 14 | 14 | ||
| 15 | /* | 15 | /* |
| 16 | * Paranoia: cpu-local interrupts shouldn't be calling in here anyway. | 16 | * Paranoia: cpu-local interrupts shouldn't be calling in here anyway. |
| 17 | */ | 17 | */ |
| 18 | if (CHECK_IRQ_PER_CPU(desc->status)) { | 18 | if (!irqd_can_balance(&desc->irq_data)) { |
| 19 | WARN_ON(1); | 19 | WARN_ON(1); |
| 20 | return; | 20 | return; |
| 21 | } | 21 | } |
| 22 | 22 | ||
| 23 | desc->status &= ~IRQ_MOVE_PENDING; | 23 | irqd_clr_move_pending(&desc->irq_data); |
| 24 | 24 | ||
| 25 | if (unlikely(cpumask_empty(desc->pending_mask))) | 25 | if (unlikely(cpumask_empty(desc->pending_mask))) |
| 26 | return; | 26 | return; |
| @@ -53,15 +53,20 @@ void move_masked_irq(int irq) | |||
| 53 | cpumask_clear(desc->pending_mask); | 53 | cpumask_clear(desc->pending_mask); |
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | void move_native_irq(int irq) | 56 | void move_masked_irq(int irq) |
| 57 | { | ||
| 58 | irq_move_masked_irq(irq_get_irq_data(irq)); | ||
| 59 | } | ||
| 60 | |||
| 61 | void irq_move_irq(struct irq_data *idata) | ||
| 57 | { | 62 | { |
| 58 | struct irq_desc *desc = irq_to_desc(irq); | 63 | struct irq_desc *desc = irq_data_to_desc(idata); |
| 59 | bool masked; | 64 | bool masked; |
| 60 | 65 | ||
| 61 | if (likely(!(desc->status & IRQ_MOVE_PENDING))) | 66 | if (likely(!irqd_is_setaffinity_pending(idata))) |
| 62 | return; | 67 | return; |
| 63 | 68 | ||
| 64 | if (unlikely(desc->status & IRQ_DISABLED)) | 69 | if (unlikely(desc->istate & IRQS_DISABLED)) |
| 65 | return; | 70 | return; |
| 66 | 71 | ||
| 67 | /* | 72 | /* |
| @@ -69,10 +74,15 @@ void move_native_irq(int irq) | |||
| 69 | * threaded interrupt with ONESHOT set, we can end up with an | 74 | * threaded interrupt with ONESHOT set, we can end up with an |
| 70 | * interrupt storm. | 75 | * interrupt storm. |
| 71 | */ | 76 | */ |
| 72 | masked = desc->status & IRQ_MASKED; | 77 | masked = desc->istate & IRQS_MASKED; |
| 73 | if (!masked) | 78 | if (!masked) |
| 74 | desc->irq_data.chip->irq_mask(&desc->irq_data); | 79 | idata->chip->irq_mask(idata); |
| 75 | move_masked_irq(irq); | 80 | irq_move_masked_irq(idata); |
| 76 | if (!masked) | 81 | if (!masked) |
| 77 | desc->irq_data.chip->irq_unmask(&desc->irq_data); | 82 | idata->chip->irq_unmask(idata); |
| 83 | } | ||
| 84 | |||
| 85 | void move_native_irq(int irq) | ||
| 86 | { | ||
| 87 | irq_move_irq(irq_get_irq_data(irq)); | ||
| 78 | } | 88 | } |
