diff options
author | Yinghai Lu <yinghai@kernel.org> | 2009-04-27 20:58:23 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-28 06:21:15 -0400 |
commit | fcef5911c7ea89b80d5bfc727f402f37c9eefd57 (patch) | |
tree | e37ad2cda662933b01b2ba6e28e570a18ef1edc2 /kernel/irq | |
parent | 9ec4fa271faf2db3b8e1419c998da1ca6b094eb6 (diff) |
x86/irq: remove leftover code from NUMA_MIGRATE_IRQ_DESC
The original feature of migrating irq_desc dynamic was too fragile
and was causing problems: it caused crashes on systems with lots of
cards with MSI-X when user-space irq-balancer was enabled.
We now have new patches that create irq_desc according to device
numa node. This patch removes the leftover bits of the dynamic balancer.
[ Impact: remove dead code ]
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
LKML-Reference: <49F654AF.8000808@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/irq')
-rw-r--r-- | kernel/irq/Makefile | 2 | ||||
-rw-r--r-- | kernel/irq/chip.c | 12 | ||||
-rw-r--r-- | kernel/irq/handle.c | 9 | ||||
-rw-r--r-- | kernel/irq/numa_migrate.c | 2 |
4 files changed, 5 insertions, 20 deletions
diff --git a/kernel/irq/Makefile b/kernel/irq/Makefile index 3394f8f52964..2f065277f8ee 100644 --- a/kernel/irq/Makefile +++ b/kernel/irq/Makefile | |||
@@ -3,5 +3,5 @@ obj-y := handle.o manage.o spurious.o resend.o chip.o devres.o | |||
3 | obj-$(CONFIG_GENERIC_IRQ_PROBE) += autoprobe.o | 3 | obj-$(CONFIG_GENERIC_IRQ_PROBE) += autoprobe.o |
4 | obj-$(CONFIG_PROC_FS) += proc.o | 4 | obj-$(CONFIG_PROC_FS) += proc.o |
5 | obj-$(CONFIG_GENERIC_PENDING_IRQ) += migration.o | 5 | obj-$(CONFIG_GENERIC_PENDING_IRQ) += migration.o |
6 | obj-$(CONFIG_NUMA_MIGRATE_IRQ_DESC) += numa_migrate.o | 6 | obj-$(CONFIG_SPARSE_IRQ) += numa_migrate.o |
7 | obj-$(CONFIG_PM_SLEEP) += pm.o | 7 | obj-$(CONFIG_PM_SLEEP) += pm.o |
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index c687ba4363f2..13c68e71b726 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -359,7 +359,6 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc) | |||
359 | 359 | ||
360 | spin_lock(&desc->lock); | 360 | spin_lock(&desc->lock); |
361 | mask_ack_irq(desc, irq); | 361 | mask_ack_irq(desc, irq); |
362 | desc = irq_remap_to_desc(irq, desc); | ||
363 | 362 | ||
364 | if (unlikely(desc->status & IRQ_INPROGRESS)) | 363 | if (unlikely(desc->status & IRQ_INPROGRESS)) |
365 | goto out_unlock; | 364 | goto out_unlock; |
@@ -438,7 +437,6 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc) | |||
438 | desc->status &= ~IRQ_INPROGRESS; | 437 | desc->status &= ~IRQ_INPROGRESS; |
439 | out: | 438 | out: |
440 | desc->chip->eoi(irq); | 439 | desc->chip->eoi(irq); |
441 | desc = irq_remap_to_desc(irq, desc); | ||
442 | 440 | ||
443 | spin_unlock(&desc->lock); | 441 | spin_unlock(&desc->lock); |
444 | } | 442 | } |
@@ -475,7 +473,6 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc) | |||
475 | !desc->action)) { | 473 | !desc->action)) { |
476 | desc->status |= (IRQ_PENDING | IRQ_MASKED); | 474 | desc->status |= (IRQ_PENDING | IRQ_MASKED); |
477 | mask_ack_irq(desc, irq); | 475 | mask_ack_irq(desc, irq); |
478 | desc = irq_remap_to_desc(irq, desc); | ||
479 | goto out_unlock; | 476 | goto out_unlock; |
480 | } | 477 | } |
481 | kstat_incr_irqs_this_cpu(irq, desc); | 478 | kstat_incr_irqs_this_cpu(irq, desc); |
@@ -483,7 +480,6 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc) | |||
483 | /* Start handling the irq */ | 480 | /* Start handling the irq */ |
484 | if (desc->chip->ack) | 481 | if (desc->chip->ack) |
485 | desc->chip->ack(irq); | 482 | desc->chip->ack(irq); |
486 | desc = irq_remap_to_desc(irq, desc); | ||
487 | 483 | ||
488 | /* Mark the IRQ currently in progress.*/ | 484 | /* Mark the IRQ currently in progress.*/ |
489 | desc->status |= IRQ_INPROGRESS; | 485 | desc->status |= IRQ_INPROGRESS; |
@@ -544,10 +540,8 @@ handle_percpu_irq(unsigned int irq, struct irq_desc *desc) | |||
544 | if (!noirqdebug) | 540 | if (!noirqdebug) |
545 | note_interrupt(irq, desc, action_ret); | 541 | note_interrupt(irq, desc, action_ret); |
546 | 542 | ||
547 | if (desc->chip->eoi) { | 543 | if (desc->chip->eoi) |
548 | desc->chip->eoi(irq); | 544 | desc->chip->eoi(irq); |
549 | desc = irq_remap_to_desc(irq, desc); | ||
550 | } | ||
551 | } | 545 | } |
552 | 546 | ||
553 | void | 547 | void |
@@ -582,10 +576,8 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, | |||
582 | 576 | ||
583 | /* Uninstall? */ | 577 | /* Uninstall? */ |
584 | if (handle == handle_bad_irq) { | 578 | if (handle == handle_bad_irq) { |
585 | if (desc->chip != &no_irq_chip) { | 579 | if (desc->chip != &no_irq_chip) |
586 | mask_ack_irq(desc, irq); | 580 | mask_ack_irq(desc, irq); |
587 | desc = irq_remap_to_desc(irq, desc); | ||
588 | } | ||
589 | desc->status |= IRQ_DISABLED; | 581 | desc->status |= IRQ_DISABLED; |
590 | desc->depth = 1; | 582 | desc->depth = 1; |
591 | } | 583 | } |
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c index 882c79800107..3e0cbc44bd73 100644 --- a/kernel/irq/handle.c +++ b/kernel/irq/handle.c | |||
@@ -458,11 +458,8 @@ unsigned int __do_IRQ(unsigned int irq) | |||
458 | /* | 458 | /* |
459 | * No locking required for CPU-local interrupts: | 459 | * No locking required for CPU-local interrupts: |
460 | */ | 460 | */ |
461 | if (desc->chip->ack) { | 461 | if (desc->chip->ack) |
462 | desc->chip->ack(irq); | 462 | desc->chip->ack(irq); |
463 | /* get new one */ | ||
464 | desc = irq_remap_to_desc(irq, desc); | ||
465 | } | ||
466 | if (likely(!(desc->status & IRQ_DISABLED))) { | 463 | if (likely(!(desc->status & IRQ_DISABLED))) { |
467 | action_ret = handle_IRQ_event(irq, desc->action); | 464 | action_ret = handle_IRQ_event(irq, desc->action); |
468 | if (!noirqdebug) | 465 | if (!noirqdebug) |
@@ -473,10 +470,8 @@ unsigned int __do_IRQ(unsigned int irq) | |||
473 | } | 470 | } |
474 | 471 | ||
475 | spin_lock(&desc->lock); | 472 | spin_lock(&desc->lock); |
476 | if (desc->chip->ack) { | 473 | if (desc->chip->ack) |
477 | desc->chip->ack(irq); | 474 | desc->chip->ack(irq); |
478 | desc = irq_remap_to_desc(irq, desc); | ||
479 | } | ||
480 | /* | 475 | /* |
481 | * REPLAY is when Linux resends an IRQ that was dropped earlier | 476 | * REPLAY is when Linux resends an IRQ that was dropped earlier |
482 | * WAITING is used by probe to mark irqs that are being tested | 477 | * WAITING is used by probe to mark irqs that are being tested |
diff --git a/kernel/irq/numa_migrate.c b/kernel/irq/numa_migrate.c index 5760d7251626..ce72bc3f4ced 100644 --- a/kernel/irq/numa_migrate.c +++ b/kernel/irq/numa_migrate.c | |||
@@ -97,9 +97,7 @@ static struct irq_desc *__real_move_irq_desc(struct irq_desc *old_desc, | |||
97 | 97 | ||
98 | /* free the old one */ | 98 | /* free the old one */ |
99 | free_one_irq_desc(old_desc, desc); | 99 | free_one_irq_desc(old_desc, desc); |
100 | spin_unlock(&old_desc->lock); | ||
101 | kfree(old_desc); | 100 | kfree(old_desc); |
102 | spin_lock(&desc->lock); | ||
103 | 101 | ||
104 | return desc; | 102 | return desc; |
105 | 103 | ||