public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] x86: use logical apicid in x2apic_cluster's x2apic_cpu_mask_to_apicid_and()
@ 2008-12-23  1:33 Suresh Siddha
  2008-12-23  1:46 ` Mike Travis
  0 siblings, 1 reply; 3+ messages in thread
From: Suresh Siddha @ 2008-12-23  1:33 UTC (permalink / raw)
  To: mingo, hpa, tglx; +Cc: travis, rusty, linux-kernel

From: Suresh Siddha <suresh.b.siddha@intel.com>
Subject: x86: use logical apicid in x2apic_cluster's x2apic_cpu_mask_to_apicid_and()

These commits:

	commit 95d313cf1c1ecedc8bec5727b09bdacbf67dfc45
	Author: Mike Travis <travis@sgi.com>
	Date:   Tue Dec 16 17:33:54 2008 -0800

	    x86: Add cpu_mask_to_apicid_and

and
	commit 6eeb7c5a99434596c5953a95baa17d2f085664e3
	Author: Mike Travis <travis@sgi.com>
	Date:   Tue Dec 16 17:33:55 2008 -0800

	    x86: update add-cpu_mask_to_apicid_and to use struct cpumask*

broke interrupt delivery on x2apic platforms.  As x2apic cluster mode uses
logical delivery mode, we need to use logical apicid instead of physical apicid
in x2apic_cpu_mask_to_apicid_and()

Impact: fixes the broken interrupt delivery issue on generic x2apic platforms.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
---

Index: tip/arch/x86/kernel/genx2apic_cluster.c
===================================================================
--- tip.orig/arch/x86/kernel/genx2apic_cluster.c	2008-12-22 17:15:38.000000000 -0800
+++ tip/arch/x86/kernel/genx2apic_cluster.c	2008-12-22 17:16:17.000000000 -0800
@@ -114,7 +114,7 @@
 	int cpu;
 
 	/*
-	 * We're using fixed IRQ delivery, can only return one phys APIC ID.
+	 * We're using fixed IRQ delivery, can only return one logical APIC ID.
 	 * May as well be the first.
 	 */
 	cpu = cpumask_first(cpumask);
@@ -130,14 +130,14 @@
 	int cpu;
 
 	/*
-	 * We're using fixed IRQ delivery, can only return one phys APIC ID.
+	 * We're using fixed IRQ delivery, can only return one logical APIC ID.
 	 * May as well be the first.
 	 */
 	for_each_cpu_and(cpu, cpumask, andmask)
 		if (cpumask_test_cpu(cpu, cpu_online_mask))
 			break;
 	if (cpu < nr_cpu_ids)
-		return per_cpu(x86_cpu_to_apicid, cpu);
+		return per_cpu(x86_cpu_to_logical_apicid, cpu);
 	return BAD_APICID;
 }
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] x86: use logical apicid in x2apic_cluster's x2apic_cpu_mask_to_apicid_and()
  2008-12-23  1:33 [patch] x86: use logical apicid in x2apic_cluster's x2apic_cpu_mask_to_apicid_and() Suresh Siddha
@ 2008-12-23  1:46 ` Mike Travis
  2008-12-23  2:05   ` H. Peter Anvin
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Travis @ 2008-12-23  1:46 UTC (permalink / raw)
  To: Suresh Siddha; +Cc: mingo, hpa, tglx, rusty, linux-kernel

Suresh Siddha wrote:
> From: Suresh Siddha <suresh.b.siddha@intel.com>
> Subject: x86: use logical apicid in x2apic_cluster's x2apic_cpu_mask_to_apicid_and()
> 
> These commits:
> 
> 	commit 95d313cf1c1ecedc8bec5727b09bdacbf67dfc45
> 	Author: Mike Travis <travis@sgi.com>
> 	Date:   Tue Dec 16 17:33:54 2008 -0800
> 
> 	    x86: Add cpu_mask_to_apicid_and
> 
> and
> 	commit 6eeb7c5a99434596c5953a95baa17d2f085664e3
> 	Author: Mike Travis <travis@sgi.com>
> 	Date:   Tue Dec 16 17:33:55 2008 -0800
> 
> 	    x86: update add-cpu_mask_to_apicid_and to use struct cpumask*
> 
> broke interrupt delivery on x2apic platforms.  As x2apic cluster mode uses
> logical delivery mode, we need to use logical apicid instead of physical apicid
> in x2apic_cpu_mask_to_apicid_and()
> 
> Impact: fixes the broken interrupt delivery issue on generic x2apic platforms.
> 
> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>

Thanks Suresh for catching this!  You can add my

Acked-by: Mike Travis <travis@sgi.com>

> ---
> 
> Index: tip/arch/x86/kernel/genx2apic_cluster.c
> ===================================================================
> --- tip.orig/arch/x86/kernel/genx2apic_cluster.c	2008-12-22 17:15:38.000000000 -0800
> +++ tip/arch/x86/kernel/genx2apic_cluster.c	2008-12-22 17:16:17.000000000 -0800
> @@ -114,7 +114,7 @@
>  	int cpu;
>  
>  	/*
> -	 * We're using fixed IRQ delivery, can only return one phys APIC ID.
> +	 * We're using fixed IRQ delivery, can only return one logical APIC ID.
>  	 * May as well be the first.
>  	 */
>  	cpu = cpumask_first(cpumask);
> @@ -130,14 +130,14 @@
>  	int cpu;
>  
>  	/*
> -	 * We're using fixed IRQ delivery, can only return one phys APIC ID.
> +	 * We're using fixed IRQ delivery, can only return one logical APIC ID.
>  	 * May as well be the first.
>  	 */
>  	for_each_cpu_and(cpu, cpumask, andmask)
>  		if (cpumask_test_cpu(cpu, cpu_online_mask))
>  			break;
>  	if (cpu < nr_cpu_ids)
> -		return per_cpu(x86_cpu_to_apicid, cpu);
> +		return per_cpu(x86_cpu_to_logical_apicid, cpu);
>  	return BAD_APICID;
>  }
>  


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] x86: use logical apicid in x2apic_cluster's x2apic_cpu_mask_to_apicid_and()
  2008-12-23  1:46 ` Mike Travis
@ 2008-12-23  2:05   ` H. Peter Anvin
  0 siblings, 0 replies; 3+ messages in thread
From: H. Peter Anvin @ 2008-12-23  2:05 UTC (permalink / raw)
  To: Mike Travis; +Cc: Suresh Siddha, mingo, tglx, rusty, linux-kernel

Mike Travis wrote:
> Suresh Siddha wrote:
>> From: Suresh Siddha <suresh.b.siddha@intel.com>
>> Subject: x86: use logical apicid in x2apic_cluster's x2apic_cpu_mask_to_apicid_and()
>>
>> Impact: fixes the broken interrupt delivery issue on generic x2apic platforms.
>>
>> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
> 
> Thanks Suresh for catching this!  You can add my
> 
> Acked-by: Mike Travis <travis@sgi.com>
> 

Applied to tip:cpus4096, thanks!

	-hpa

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-12-23  2:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-23  1:33 [patch] x86: use logical apicid in x2apic_cluster's x2apic_cpu_mask_to_apicid_and() Suresh Siddha
2008-12-23  1:46 ` Mike Travis
2008-12-23  2:05   ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox