* [PATCH -tip] irq: DEBUG_SHIRQ executed on irq setup failure
@ 2009-03-31 17:14 Luis Henriques
2009-04-01 10:14 ` Thomas Gleixner
0 siblings, 1 reply; 2+ messages in thread
From: Luis Henriques @ 2009-03-31 17:14 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Thomas Gleixner, linux-kernel
When requesting an IRQ, the DEBUG_SHIRQ code executes a fake IRQ just to make
sure the driver is ready to receive an IRQ immediately. The problem was that
this fake IRQ was being executed even if interrupt line failed to be allocated
by __setup_irq.
Signed-off-by: Luis Henriques <henrix@sapo.pt>
---
kernel/irq/manage.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index a3eb7ba..8e1be16 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -914,7 +914,7 @@ int request_threaded_irq(unsigned int irq, irq_handler_t handler,
kfree(action);
#ifdef CONFIG_DEBUG_SHIRQ
- if (irqflags & IRQF_SHARED) {
+ if (retval && (irqflags & IRQF_SHARED)) {
/*
* It's a shared IRQ -- the driver ought to be prepared for it
* to happen immediately, so let's make sure....
--
1.6.2.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH -tip] irq: DEBUG_SHIRQ executed on irq setup failure
2009-03-31 17:14 [PATCH -tip] irq: DEBUG_SHIRQ executed on irq setup failure Luis Henriques
@ 2009-04-01 10:14 ` Thomas Gleixner
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Gleixner @ 2009-04-01 10:14 UTC (permalink / raw)
To: Luis Henriques; +Cc: Ingo Molnar, linux-kernel
On Tue, 31 Mar 2009, Luis Henriques wrote:
> When requesting an IRQ, the DEBUG_SHIRQ code executes a fake IRQ just to make
> sure the driver is ready to receive an IRQ immediately. The problem was that
> this fake IRQ was being executed even if interrupt line failed to be allocated
> by __setup_irq.
Good point !
> Signed-off-by: Luis Henriques <henrix@sapo.pt>
> ---
> kernel/irq/manage.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
> index a3eb7ba..8e1be16 100644
> --- a/kernel/irq/manage.c
> +++ b/kernel/irq/manage.c
> @@ -914,7 +914,7 @@ int request_threaded_irq(unsigned int irq, irq_handler_t handler,
> kfree(action);
>
> #ifdef CONFIG_DEBUG_SHIRQ
> - if (irqflags & IRQF_SHARED) {
> + if (retval && (irqflags & IRQF_SHARED)) {
!retval might actually prevent the situation you described above :)
Thanks,
tglx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-04-01 10:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-31 17:14 [PATCH -tip] irq: DEBUG_SHIRQ executed on irq setup failure Luis Henriques
2009-04-01 10:14 ` Thomas Gleixner
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®