From: Prarit Bhargava <prarit@redhat.com>
To: linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, Michel Lespinasse <walken@google.com>,
Andi Kleen <ak@linux.intel.com>,
Seiji Aguchi <seiji.aguchi@hds.com>,
Yang Zhang <yang.z.zhang@Intel.com>,
Paul Gortmaker <paul.gortmaker@windriver.com>,
janet.morgan@Intel.com, tony.luck@Intel.com, ruiv.wang@gmail.com
Subject: Re: [PATCH] x86: Add check for number of available vectors before CPU down [v3]
Date: Mon, 23 Dec 2013 07:32:40 -0500 [thread overview]
Message-ID: <52B82D68.4030502@redhat.com> (raw)
In-Reply-To: <20131223071240.GA18274@gchen.bj.intel.com>
On 12/23/2013 02:12 AM, Chen, Gong wrote:
> On Fri, Dec 20, 2013 at 10:50:09AM -0500, Prarit Bhargava wrote:
>> +int check_vectors(void)
>> +{
>> + int irq, cpu;
>> + unsigned int vector, this_count, count;
>> + struct irq_desc *desc;
>> + struct irq_data *data;
>> + struct cpumask *affinity;
>> +
>> + this_count = 0;
>> + for (vector = FIRST_EXTERNAL_VECTOR; vector < NR_VECTORS; vector++) {
>> + irq = __this_cpu_read(vector_irq[vector]);
>> + if (irq >= 0) {
>> + 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) ||
> This line looks weird. Why counter will be increased once the irq has
> action? Do you mean
>
> if (irq_has_action(irq) && !irqd_is_per_cpu(data) &&
> !cpumask_subset(affinity, cpu_online_mask))
>
>
Yes, you're absolutely right. I mixed up the and and or's on this line of code.
I will send out a patch against tip shortly.
P.
prev parent reply other threads:[~2013-12-23 12:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-20 15:50 [PATCH] x86: Add check for number of available vectors before CPU down [v3] Prarit Bhargava
2013-12-20 22:56 ` Andi Kleen
2013-12-20 23:06 ` Luck, Tony
2013-12-21 0:08 ` H. Peter Anvin
2013-12-20 23:39 ` [tip:x86/urgent] x86: Add check for number of available vectors before CPU down tip-bot for Prarit Bhargava
2013-12-20 23:39 ` [tip:x86/urgent] x86, irq: Change check_vectors() to check_irq_vectors_for_cpu_disable() tip-bot for H. Peter Anvin
2013-12-23 7:12 ` [PATCH] x86: Add check for number of available vectors before CPU down [v3] Chen, Gong
2013-12-23 12:32 ` Prarit Bhargava [this message]
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=52B82D68.4030502@redhat.com \
--to=prarit@redhat.com \
--cc=ak@linux.intel.com \
--cc=hpa@zytor.com \
--cc=janet.morgan@Intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paul.gortmaker@windriver.com \
--cc=ruiv.wang@gmail.com \
--cc=seiji.aguchi@hds.com \
--cc=tglx@linutronix.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.