[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-4308ad801193f14ff42cb746da37cf07e35f0d08@git.kernel.org>
Date: Wed, 12 May 2010 09:27:38 GMT
From: tip-bot for Peter P Waskiewicz Jr
<peter.p.waskiewicz.jr@...el.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
peter.p.waskiewicz.jr@...el.com, tglx@...utronix.de
Subject: [tip:irq/core] genirq: Clear CPU mask in affinity_hint when none is provided
Commit-ID: 4308ad801193f14ff42cb746da37cf07e35f0d08
Gitweb: http://git.kernel.org/tip/4308ad801193f14ff42cb746da37cf07e35f0d08
Author: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@...el.com>
AuthorDate: Wed, 5 May 2010 13:56:42 -0700
Committer: Thomas Gleixner <tglx@...utronix.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@...el.com>
Cc: davem@...emloft.net
Cc: arjan@...ux.jf.intel.com
Cc: bhutchings@...arflare.com
LKML-Reference: <20100505205638.5426.87189.stgit@...askie-hc2.jf.intel.com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists