From: Prarit Bhargava <prarit@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Prarit Bhargava <prarit@redhat.com>,
Michel Lespinasse <walken@google.com>,
Seiji Aguchi <seiji.aguchi@hds.com>,
Yang Zhang <yang.z.zhang@Intel.com>,
Paul Gortmaker <paul.gortmaker@windriver.com>,
Janet Morgan <janet.morgan@Intel.com>,
Tony Luck <tony.luck@Intel.com>, Ruiv Wang <ruiv.wang@gmail.com>,
Gong Chen <gong.chen@linux.intel.com>,
Andi Kleen <ak@linux.intel.com>,
"H. Peter Anvin" <hpa@linux.intel.com>,
x86@kernel.org, <stable@vger.kernel.org>
Subject: [PATCH] x86, irq, fix logical AND/OR error in check_irq_vectors_for_cpu_disable()
Date: Mon, 23 Dec 2013 09:39:12 -0500 [thread overview]
Message-ID: <1387809552-20529-1-git-send-email-prarit@redhat.com> (raw)
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
next reply other threads:[~2013-12-23 14:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-23 14:39 Prarit Bhargava [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1387809552-20529-1-git-send-email-prarit@redhat.com \
--to=prarit@redhat.com \
--cc=ak@linux.intel.com \
--cc=gong.chen@linux.intel.com \
--cc=hpa@linux.intel.com \
--cc=janet.morgan@Intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paul.gortmaker@windriver.com \
--cc=ruiv.wang@gmail.com \
--cc=seiji.aguchi@hds.com \
--cc=stable@vger.kernel.org \
--cc=tony.luck@Intel.com \
--cc=walken@google.com \
--cc=x86@kernel.org \
--cc=yang.z.zhang@Intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®