diff mbox

Oneiric SRU: genirq: Fix irqfixup, irqpoll regression

Message ID 20111121004430.A6B83F88D3@lochsa.rtg.net
State New
Headers show

Commit Message

Tim Gardner Nov. 21, 2011, 12:44 a.m. UTC
From 3f21b6ce938f2df057659e2e1cdbeddac0bda3c8 Mon Sep 17 00:00:00 2001
From: Edward Donovan <edward.donovan@numble.net>
Date: Tue, 1 Nov 2011 15:29:44 -0400
Subject: [PATCH] genirq: Fix irqfixup, irqpoll regression

BugLink: http://bugs.launchpad.net/bugs/855199

commit d05c65fff0 ("genirq: spurious: Run only one poller at a time")
introduced a regression, leaving the boot options 'irqfixup' and
'irqpoll' non-functional. The patch placed tests in each function, to
exit if the function is already running. The test in 'misrouted_irq'
exited when it should have proceeded, effectively disabling
'misrouted_irq' and 'poll_spurious_irqs'.

The check for an already running poller needs to be "!= 1" not "== 1"
as "1" is the value when the first poller starts running.

Signed-off-by: Edward Donovan <edward.donovan@numble.net>
Cc: maciej.rutecki@gmail.com
Link: http://lkml.kernel.org/r/1320175784-6745-1-git-send-email-edward.donovan@numble.net
Cc: stable@vger.kernel.org # >= 2.6.39
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
(cherry picked from commit c75d720fca8a91ce99196d33adea383621027bf2)

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
---
 kernel/irq/spurious.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Stefan Bader Nov. 21, 2011, 2:16 p.m. UTC | #1
On 21.11.2011 01:44, Tim Gardner wrote:
> From 3f21b6ce938f2df057659e2e1cdbeddac0bda3c8 Mon Sep 17 00:00:00 2001
> From: Edward Donovan <edward.donovan@numble.net>
> Date: Tue, 1 Nov 2011 15:29:44 -0400
> Subject: [PATCH] genirq: Fix irqfixup, irqpoll regression
> 
> BugLink: http://bugs.launchpad.net/bugs/855199
> 
> commit d05c65fff0 ("genirq: spurious: Run only one poller at a time")
> introduced a regression, leaving the boot options 'irqfixup' and
> 'irqpoll' non-functional. The patch placed tests in each function, to
> exit if the function is already running. The test in 'misrouted_irq'
> exited when it should have proceeded, effectively disabling
> 'misrouted_irq' and 'poll_spurious_irqs'.
> 
> The check for an already running poller needs to be "!= 1" not "== 1"
> as "1" is the value when the first poller starts running.
> 
> Signed-off-by: Edward Donovan <edward.donovan@numble.net>
> Cc: maciej.rutecki@gmail.com
> Link: http://lkml.kernel.org/r/1320175784-6745-1-git-send-email-edward.donovan@numble.net
> Cc: stable@vger.kernel.org # >= 2.6.39
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> (cherry picked from commit c75d720fca8a91ce99196d33adea383621027bf2)
> 
> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
> ---
>  kernel/irq/spurious.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c
> index aa57d5d..b5f4742 100644
> --- a/kernel/irq/spurious.c
> +++ b/kernel/irq/spurious.c
> @@ -115,7 +115,7 @@ static int misrouted_irq(int irq)
>  	struct irq_desc *desc;
>  	int i, ok = 0;
>  
> -	if (atomic_inc_return(&irq_poll_active) == 1)
> +	if (atomic_inc_return(&irq_poll_active) != 1)
>  		goto out;
>  
>  	irq_poll_cpu = smp_processor_id();

Seems to be doing what it claims.
Herton Ronaldo Krzesinski Nov. 21, 2011, 2:25 p.m. UTC | #2
On Sun, Nov 20, 2011 at 05:44:30PM -0700, Tim Gardner wrote:
> From 3f21b6ce938f2df057659e2e1cdbeddac0bda3c8 Mon Sep 17 00:00:00 2001
> From: Edward Donovan <edward.donovan@numble.net>
> Date: Tue, 1 Nov 2011 15:29:44 -0400
> Subject: [PATCH] genirq: Fix irqfixup, irqpoll regression
> 
> BugLink: http://bugs.launchpad.net/bugs/855199
> 
> commit d05c65fff0 ("genirq: spurious: Run only one poller at a time")
> introduced a regression, leaving the boot options 'irqfixup' and
> 'irqpoll' non-functional. The patch placed tests in each function, to
> exit if the function is already running. The test in 'misrouted_irq'
> exited when it should have proceeded, effectively disabling
> 'misrouted_irq' and 'poll_spurious_irqs'.
> 
> The check for an already running poller needs to be "!= 1" not "== 1"
> as "1" is the value when the first poller starts running.
> 
> Signed-off-by: Edward Donovan <edward.donovan@numble.net>
> Cc: maciej.rutecki@gmail.com
> Link: http://lkml.kernel.org/r/1320175784-6745-1-git-send-email-edward.donovan@numble.net
> Cc: stable@vger.kernel.org # >= 2.6.39
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> (cherry picked from commit c75d720fca8a91ce99196d33adea383621027bf2)

Acked-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>

> 
> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
> ---
>  kernel/irq/spurious.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c
> index aa57d5d..b5f4742 100644
> --- a/kernel/irq/spurious.c
> +++ b/kernel/irq/spurious.c
> @@ -115,7 +115,7 @@ static int misrouted_irq(int irq)
>  	struct irq_desc *desc;
>  	int i, ok = 0;
>  
> -	if (atomic_inc_return(&irq_poll_active) == 1)
> +	if (atomic_inc_return(&irq_poll_active) != 1)
>  		goto out;
>  
>  	irq_poll_cpu = smp_processor_id();
> -- 
> 1.7.0.4
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>
Tim Gardner Nov. 21, 2011, 2:41 p.m. UTC | #3
On 11/20/2011 05:44 PM, Tim Gardner wrote:
>  From 3f21b6ce938f2df057659e2e1cdbeddac0bda3c8 Mon Sep 17 00:00:00 2001
> From: Edward Donovan<edward.donovan@numble.net>
> Date: Tue, 1 Nov 2011 15:29:44 -0400
> Subject: [PATCH] genirq: Fix irqfixup, irqpoll regression
>
> BugLink: http://bugs.launchpad.net/bugs/855199
>
> commit d05c65fff0 ("genirq: spurious: Run only one poller at a time")
> introduced a regression, leaving the boot options 'irqfixup' and
> 'irqpoll' non-functional. The patch placed tests in each function, to
> exit if the function is already running. The test in 'misrouted_irq'
> exited when it should have proceeded, effectively disabling
> 'misrouted_irq' and 'poll_spurious_irqs'.
>
> The check for an already running poller needs to be "!= 1" not "== 1"
> as "1" is the value when the first poller starts running.
>
> Signed-off-by: Edward Donovan<edward.donovan@numble.net>
> Cc: maciej.rutecki@gmail.com
> Link: http://lkml.kernel.org/r/1320175784-6745-1-git-send-email-edward.donovan@numble.net
> Cc: stable@vger.kernel.org #>= 2.6.39
> Signed-off-by: Thomas Gleixner<tglx@linutronix.de>
> (cherry picked from commit c75d720fca8a91ce99196d33adea383621027bf2)
>
> Signed-off-by: Tim Gardner<tim.gardner@canonical.com>
> ---
>   kernel/irq/spurious.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c
> index aa57d5d..b5f4742 100644
> --- a/kernel/irq/spurious.c
> +++ b/kernel/irq/spurious.c
> @@ -115,7 +115,7 @@ static int misrouted_irq(int irq)
>   	struct irq_desc *desc;
>   	int i, ok = 0;
>
> -	if (atomic_inc_return(&irq_poll_active) == 1)
> +	if (atomic_inc_return(&irq_poll_active) != 1)
>   		goto out;
>
>   	irq_poll_cpu = smp_processor_id();
diff mbox

Patch

diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c
index aa57d5d..b5f4742 100644
--- a/kernel/irq/spurious.c
+++ b/kernel/irq/spurious.c
@@ -115,7 +115,7 @@  static int misrouted_irq(int irq)
 	struct irq_desc *desc;
 	int i, ok = 0;
 
-	if (atomic_inc_return(&irq_poll_active) == 1)
+	if (atomic_inc_return(&irq_poll_active) != 1)
 		goto out;
 
 	irq_poll_cpu = smp_processor_id();