* [PATCH] genirq: fix descriptor init on non-sparse IRQs
@ 2011-05-31 16:14 Linus Walleij
2011-06-03 12:58 ` [tip:irq/urgent] genirq: Fix " tip-bot for Linus Walleij
0 siblings, 1 reply; 2+ messages in thread
From: Linus Walleij @ 2011-05-31 16:14 UTC (permalink / raw)
To: Thomas Gleixner, linux-kernel; +Cc: Jonathan Cameron, Lee Jones, Linus Walleij
From: Linus Walleij <linus.walleij@linaro.org>
The genirq changes are initializing descriptors for sparse IRQs
quite differently from how non-sparse (stacked?) IRQs are
initialized, with the effect that on my platform all IRQs are
default-disabled on sparse IRQs and default-enabled if non-sparse
IRQs are used, crashing some GPIO driver.
Fix this by refactoring the non-sparse IRQs to use the same
descriptor init function as the sparse IRQs. Tested on Ux500.
Signed-off: Linus Walleij <linus.walleij@linaro.org>
---
kernel/irq/irqdesc.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 886e803..c7ddc87 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -257,13 +257,11 @@ int __init early_irq_init(void)
count = ARRAY_SIZE(irq_desc);
for (i = 0; i < count; i++) {
- desc[i].irq_data.irq = i;
- desc[i].irq_data.chip = &no_irq_chip;
desc[i].kstat_irqs = alloc_percpu(unsigned int);
- irq_settings_clr_and_set(desc, ~0, _IRQ_DEFAULT_INIT_FLAGS);
- alloc_masks(desc + i, GFP_KERNEL, node);
- desc_smp_init(desc + i, node);
+ alloc_masks(&desc[i], GFP_KERNEL, node);
+ raw_spin_lock_init(&desc[i].lock);
lockdep_set_class(&desc[i].lock, &irq_desc_lock_class);
+ desc_set_defaults(i, &desc[i], node);
}
return arch_early_irq_init();
}
--
1.7.3.2
^ permalink raw reply [flat|nested] 2+ messages in thread* [tip:irq/urgent] genirq: Fix descriptor init on non-sparse IRQs
2011-05-31 16:14 [PATCH] genirq: fix descriptor init on non-sparse IRQs Linus Walleij
@ 2011-06-03 12:58 ` tip-bot for Linus Walleij
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Linus Walleij @ 2011-06-03 12:58 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, linus.walleij, tglx
Commit-ID: e7fbad300a7a6432238f086e3c9a61538a905858
Gitweb: http://git.kernel.org/tip/e7fbad300a7a6432238f086e3c9a61538a905858
Author: Linus Walleij <linus.walleij@stericsson.com>
AuthorDate: Tue, 31 May 2011 18:14:39 +0200
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 3 Jun 2011 14:53:16 +0200
genirq: Fix descriptor init on non-sparse IRQs
The genirq changes are initializing descriptors for sparse IRQs quite
differently from how non-sparse (stacked?) IRQs are initialized, with
the effect that on my platform all IRQs are default-disabled on sparse
IRQs and default-enabled if non-sparse IRQs are used, crashing some
GPIO driver.
Fix this by refactoring the non-sparse IRQs to use the same descriptor
init function as the sparse IRQs.
Signed-off: Linus Walleij <linus.walleij@linaro.org>
Link: http://lkml.kernel.org/r/1306858479-16622-1-git-send-email-linus.walleij@stericsson.com
Cc: stable@kernel.org # 2.6.39
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
kernel/irq/irqdesc.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 886e803..c7ddc87 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -257,13 +257,11 @@ int __init early_irq_init(void)
count = ARRAY_SIZE(irq_desc);
for (i = 0; i < count; i++) {
- desc[i].irq_data.irq = i;
- desc[i].irq_data.chip = &no_irq_chip;
desc[i].kstat_irqs = alloc_percpu(unsigned int);
- irq_settings_clr_and_set(desc, ~0, _IRQ_DEFAULT_INIT_FLAGS);
- alloc_masks(desc + i, GFP_KERNEL, node);
- desc_smp_init(desc + i, node);
+ alloc_masks(&desc[i], GFP_KERNEL, node);
+ raw_spin_lock_init(&desc[i].lock);
lockdep_set_class(&desc[i].lock, &irq_desc_lock_class);
+ desc_set_defaults(i, &desc[i], node);
}
return arch_early_irq_init();
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-06-03 12:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-31 16:14 [PATCH] genirq: fix descriptor init on non-sparse IRQs Linus Walleij
2011-06-03 12:58 ` [tip:irq/urgent] genirq: Fix " tip-bot for Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®