[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1340019011-18642-2-git-send-email-monstr@monstr.eu>
Date: Mon, 18 Jun 2012 13:30:04 +0200
From: Michal Simek <monstr@...str.eu>
To: linux-kernel@...r.kernel.org
Cc: Russell King <linux@....linux.org.uk>,
Marc Zyngier <marc.zyngier@....com>,
Grant Likely <grant.likely@...retlab.ca>,
Will Deacon <will.deacon@....com>,
Rob Herring <rob.herring@...xeda.com>,
Nicolas Pitre <nicolas.pitre@...aro.org>,
linux-arm-kernel@...ts.infradead.org,
Ohad Ben-Cohen <ohad@...ery.com>,
Peter Crosthwaite <peter.crosthwaite@...alogix.com>,
Michal Simek <monstr@...str.eu>
Subject: [RFC PATCH 1/8] ARM: gic: Support forcing cpumask for possible cpus in the system
gic_set_affinity doesn't support force option. Force option
should work with all possible cpus in the system not only with
online cpus.
Signed-off-by: Michal Simek <monstr@...str.eu>
---
arch/arm/common/gic.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c
index aa52699..4003cc2 100644
--- a/arch/arm/common/gic.c
+++ b/arch/arm/common/gic.c
@@ -235,9 +235,14 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
{
void __iomem *reg = gic_dist_base(d) + GIC_DIST_TARGET + (gic_irq(d) & ~3);
unsigned int shift = (gic_irq(d) % 4) * 8;
- unsigned int cpu = cpumask_any_and(mask_val, cpu_online_mask);
+ unsigned int cpu;
u32 val, mask, bit;
+ if (force)
+ cpu = cpumask_any_and(mask_val, cpu_possible_mask);
+ else
+ cpu = cpumask_any_and(mask_val, cpu_online_mask);
+
if (cpu >= 8 || cpu >= nr_cpu_ids)
return -EINVAL;
--
1.7.0.4
--
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