diff mbox

[3/4] ARM: CPU hotplug: pass in proper affinity mask on IRQ migration

Message ID E1Qjv7j-0003Ia-FD@rmk-PC.arm.linux.org.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Russell King - ARM Linux July 21, 2011, 3:25 p.m. UTC
Now that the GIC takes care of selecting a target interrupt from the
affinity mask, we don't need all this complexity in the core code
anymore.  Just detect when we need to break affinity.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/kernel/irq.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

Comments

Santosh Shilimkar July 25, 2011, 12:38 p.m. UTC | #1
On 7/21/2011 8:55 PM, Russell King - ARM Linux wrote:
> Now that the GIC takes care of selecting a target interrupt from the
> affinity mask, we don't need all this complexity in the core code
> anymore.  Just detect when we need to break affinity.
>
> Signed-off-by: Russell King<rmk+kernel@arm.linux.org.uk>
> ---
>   arch/arm/kernel/irq.c |   10 ++++------
>   1 files changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
> index d7aa5c9..ab63c05 100644
> --- a/arch/arm/kernel/irq.c
> +++ b/arch/arm/kernel/irq.c
> @@ -133,17 +133,15 @@ int __init arch_probe_nr_irqs(void)
>
>   static bool migrate_one_irq(struct irq_data *d)
>   {
> -	unsigned int cpu = cpumask_any_and(d->affinity, cpu_online_mask);
> +	const struct cpumask *affinity = d->affinity;
>   	bool ret = false;
>
> -	if (cpu>= nr_cpu_ids) {
> -		cpu = cpumask_any(cpu_online_mask);
> +	if (cpumask_any_and(affinity, cpu_online_mask)>= nr_cpu_ids) {
> +		affinity cpu_online_mask;

I noticed, you missed '=' above and same is corrected in PATCH 4/4.
Should be fixed in this patch itself to avoid git-bisect breakage.

Regards
Santosh
Russell King - ARM Linux July 25, 2011, 1:06 p.m. UTC | #2
On Mon, Jul 25, 2011 at 06:08:59PM +0530, Santosh Shilimkar wrote:
> On 7/21/2011 8:55 PM, Russell King - ARM Linux wrote:
>> +	if (cpumask_any_and(affinity, cpu_online_mask)>= nr_cpu_ids) {
>> +		affinity cpu_online_mask;
>
> I noticed, you missed '=' above and same is corrected in PATCH 4/4.
> Should be fixed in this patch itself to avoid git-bisect breakage.

Unfortuantely, too late...
diff mbox

Patch

diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index d7aa5c9..ab63c05 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -133,17 +133,15 @@  int __init arch_probe_nr_irqs(void)
 
 static bool migrate_one_irq(struct irq_data *d)
 {
-	unsigned int cpu = cpumask_any_and(d->affinity, cpu_online_mask);
+	const struct cpumask *affinity = d->affinity;
 	bool ret = false;
 
-	if (cpu >= nr_cpu_ids) {
-		cpu = cpumask_any(cpu_online_mask);
+	if (cpumask_any_and(affinity, cpu_online_mask) >= nr_cpu_ids) {
+		affinity cpu_online_mask;
 		ret = true;
 	}
 
-	pr_debug("IRQ%u: moving from cpu%u to cpu%u\n", d->irq, d->node, cpu);
-
-	d->chip->irq_set_affinity(d, cpumask_of(cpu), true);
+	d->chip->irq_set_affinity(d, affinity, true);
 
 	return ret;
 }