stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86, irq, fix logical AND/OR error in check_irq_vectors_for_cpu_disable()
@ 2013-12-23 14:39 Prarit Bhargava
  2013-12-24  2:51 ` Chen, Gong
  2013-12-27 22:01 ` H. Peter Anvin
  0 siblings, 2 replies; 8+ messages in thread
From: Prarit Bhargava @ 2013-12-23 14:39 UTC (permalink / raw)
  To: linux-kernel
  Cc: Prarit Bhargava, Michel Lespinasse, Seiji Aguchi, Yang Zhang,
	Paul Gortmaker, Janet Morgan, Tony Luck, Ruiv Wang, Gong Chen,
	Andi Kleen, H. Peter Anvin, x86, stable

Patch is against linux-tip.git and was tested on both linux.git and tip without
any issues.  As expected, the number of required vectors for the down'd cpu
drops from 202 to 181 on my test system (which has 509 vectors assigned in
total).

Many thanks to Gong Chen for catching this.

P.

----8<----

Gong Chen caught this coding error during inspection of the patch.  The
code should be AND not OR.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Cc: Michel Lespinasse <walken@google.com>
Cc: Seiji Aguchi <seiji.aguchi@hds.com>
Cc: Yang Zhang <yang.z.zhang@Intel.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Janet Morgan <janet.morgan@intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Ruiv Wang <ruiv.wang@gmail.com>
Cc: Gong Chen <gong.chen@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: H. Peter Anvin <hpa@linux.intel.com>
Cc: x86@kernel.org
Cc: <stable@vger.kernel.org>
---
 arch/x86/kernel/irq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c
index 7d40698..aed7acc 100644
--- a/arch/x86/kernel/irq.c
+++ b/arch/x86/kernel/irq.c
@@ -281,7 +281,7 @@ int check_irq_vectors_for_cpu_disable(void)
 			desc = irq_to_desc(irq);
 			data = irq_desc_get_irq_data(desc);
 			affinity = data->affinity;
-			if (irq_has_action(irq) || !irqd_is_per_cpu(data) ||
+			if (irq_has_action(irq) && !irqd_is_per_cpu(data) &&
 			    !cpumask_subset(affinity, cpu_online_mask))
 				this_count++;
 		}
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-12-28 15:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-23 14:39 [PATCH] x86, irq, fix logical AND/OR error in check_irq_vectors_for_cpu_disable() Prarit Bhargava
2013-12-24  2:51 ` Chen, Gong
2013-12-24 13:19   ` Prarit Bhargava
2013-12-25  2:40     ` Chen, Gong
2013-12-27 16:13       ` Prarit Bhargava
2013-12-28  1:07         ` H. Peter Anvin
2013-12-28 15:58           ` Prarit Bhargava
2013-12-27 22:01 ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).