From: tip-bot for Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
peter.p.waskiewicz.jr@intel.com, tglx@linutronix.de
Subject: [tip:irq/core] genirq: Clear CPU mask in affinity_hint when none is provided
Date: Wed, 12 May 2010 09:27:38 GMT [thread overview]
Message-ID: <tip-4308ad801193f14ff42cb746da37cf07e35f0d08@git.kernel.org> (raw)
In-Reply-To: <20100505205638.5426.87189.stgit@ppwaskie-hc2.jf.intel.com>
Commit-ID: 4308ad801193f14ff42cb746da37cf07e35f0d08
Gitweb: http://git.kernel.org/tip/4308ad801193f14ff42cb746da37cf07e35f0d08
Author: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
AuthorDate: Wed, 5 May 2010 13:56:42 -0700
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Wed, 12 May 2010 11:23:34 +0200
genirq: Clear CPU mask in affinity_hint when none is provided
When an interrupt is disabled and torn down, the CPU mask returned
through affinity_hint right now is all CPUs. Also, for drivers that
don't provide an affinity_hint mask, this can be misleading. There
should be no hint at all, meaning an empty CPU mask.
[ tglx: use zalloc_cpumask_var instead of clearing it under the lock ]
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Cc: davem@davemloft.net
Cc: arjan@linux.jf.intel.com
Cc: bhutchings@solarflare.com
LKML-Reference: <20100505205638.5426.87189.stgit@ppwaskie-hc2.jf.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
kernel/irq/proc.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c
index 4f9427a..09a2ee5 100644
--- a/kernel/irq/proc.c
+++ b/kernel/irq/proc.c
@@ -38,14 +38,12 @@ static int irq_affinity_hint_proc_show(struct seq_file *m, void *v)
unsigned long flags;
cpumask_var_t mask;
- if (!alloc_cpumask_var(&mask, GFP_KERNEL))
+ if (!zalloc_cpumask_var(&mask, GFP_KERNEL))
return -ENOMEM;
raw_spin_lock_irqsave(&desc->lock, flags);
if (desc->affinity_hint)
cpumask_copy(mask, desc->affinity_hint);
- else
- cpumask_setall(mask);
raw_spin_unlock_irqrestore(&desc->lock, flags);
seq_cpumask(m, mask);
prev parent reply other threads:[~2010-05-12 9:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-05 20:56 [PATCH linux-next] irq: " Peter P Waskiewicz Jr
2010-05-12 9:27 ` tip-bot for Peter P Waskiewicz Jr [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=tip-4308ad801193f14ff42cb746da37cf07e35f0d08@git.kernel.org \
--to=peter.p.waskiewicz.jr@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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
Powered by JetHome