The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] clustered apic patch missing APIC_DFR_CLUSTER def
@ 2004-10-28 18:27 Chris Wright
  2004-10-28 23:35 ` James Cleverdon
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Wright @ 2004-10-28 18:27 UTC (permalink / raw)
  To: jamesclv, ak; +Cc: linux-kernel

The cluster apic support does not compile.  I added the APIC_DFR_CLUSTER
def to asm-x86_64/apicdef.h (stolen from i386 one).  Also added
APIC_DFR_FLAT while there.  This may only be papering over real fix.

Additionally, cluster_cpu_present_to_apicid() is defined but not used
anywhere.  So remove it.

Signed-off-by: Chris Wright <chrisw@osdl.org>

===== include/asm-x86_64/apicdef.h 1.6 vs edited =====
--- 1.6/include/asm-x86_64/apicdef.h	2004-10-28 00:39:50 -07:00
+++ edited/include/asm-x86_64/apicdef.h	2004-10-28 11:15:19 -07:00
@@ -32,6 +32,8 @@
 #define			SET_APIC_LOGICAL_ID(x)	(((x)<<24))
 #define			APIC_ALL_CPUS		0xFFu
 #define		APIC_DFR	0xE0
+#define			APIC_DFR_CLUSTER		0x0FFFFFFFu
+#define			APIC_DFR_FLAT			0xFFFFFFFFu
 #define		APIC_SPIV	0xF0
 #define			APIC_SPIV_FOCUS_DISABLED	(1<<9)
 #define			APIC_SPIV_APIC_ENABLED		(1<<8)
===== arch/x86_64/kernel/genapic_cluster.c 1.1 vs edited =====
--- 1.1/arch/x86_64/kernel/genapic_cluster.c	2004-10-28 00:39:50 -07:00
+++ edited/arch/x86_64/kernel/genapic_cluster.c	2004-10-28 11:18:10 -07:00
@@ -57,14 +57,6 @@
 	apic_write_around(APIC_LDR, val);
 }
 
-static int cluster_cpu_present_to_apicid(int mps_cpu)
-{
-	if ((unsigned)mps_cpu < NR_CPUS)
-		return (int)bios_cpu_apicid[mps_cpu];
-	else
-		return BAD_APICID;
-}
-
 /* Start with all IRQs pointing to boot CPU.  IRQ balancing will shift them. */
 
 static cpumask_t cluster_target_cpus(void)

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

* Re: [PATCH] clustered apic patch missing APIC_DFR_CLUSTER def
  2004-10-28 18:27 [PATCH] clustered apic patch missing APIC_DFR_CLUSTER def Chris Wright
@ 2004-10-28 23:35 ` James Cleverdon
  2004-10-28 23:38   ` Andi Kleen
  2004-10-28 23:51   ` Chris Wright
  0 siblings, 2 replies; 4+ messages in thread
From: James Cleverdon @ 2004-10-28 23:35 UTC (permalink / raw)
  To: Chris Wright, ak; +Cc: linux-kernel

Hmmm...  The patch containing APIC_DFR_CLUSTER and friends went
into the -mm tree in the June/July timeframe.  It must not have
been pushed with the main cluster patch.

You're right, we're using the generic version of
cpu_present_to_apicid().  The cluster one can go.


On Thursday 28 October 2004 11:27 am, Chris Wright wrote:
> The cluster apic support does not compile.  I added the
> APIC_DFR_CLUSTER def to asm-x86_64/apicdef.h (stolen from i386 one). 
> Also added APIC_DFR_FLAT while there.  This may only be papering over
> real fix.
>
> Additionally, cluster_cpu_present_to_apicid() is defined but not used
> anywhere.  So remove it.
>
> Signed-off-by: Chris Wright <chrisw@osdl.org>
>
> ===== include/asm-x86_64/apicdef.h 1.6 vs edited =====
> --- 1.6/include/asm-x86_64/apicdef.h	2004-10-28 00:39:50 -07:00
> +++ edited/include/asm-x86_64/apicdef.h	2004-10-28 11:15:19 -07:00
> @@ -32,6 +32,8 @@
>  #define			SET_APIC_LOGICAL_ID(x)	(((x)<<24))
>  #define			APIC_ALL_CPUS		0xFFu
>  #define		APIC_DFR	0xE0
> +#define			APIC_DFR_CLUSTER		0x0FFFFFFFu
> +#define			APIC_DFR_FLAT			0xFFFFFFFFu
>  #define		APIC_SPIV	0xF0
>  #define			APIC_SPIV_FOCUS_DISABLED	(1<<9)
>  #define			APIC_SPIV_APIC_ENABLED		(1<<8)
> ===== arch/x86_64/kernel/genapic_cluster.c 1.1 vs edited =====
> --- 1.1/arch/x86_64/kernel/genapic_cluster.c	2004-10-28 00:39:50
> -07:00 +++ edited/arch/x86_64/kernel/genapic_cluster.c	2004-10-28
> 11:18:10 -07:00 @@ -57,14 +57,6 @@
>  	apic_write_around(APIC_LDR, val);
>  }
>
> -static int cluster_cpu_present_to_apicid(int mps_cpu)
> -{
> -	if ((unsigned)mps_cpu < NR_CPUS)
> -		return (int)bios_cpu_apicid[mps_cpu];
> -	else
> -		return BAD_APICID;
> -}
> -
>  /* Start with all IRQs pointing to boot CPU.  IRQ balancing will
> shift them. */
>
>  static cpumask_t cluster_target_cpus(void)

-- 
James Cleverdon
IBM LTC (xSeries Linux Solutions)
{jamesclv(Unix, preferred), cleverdj(Notes)} at us dot ibm dot comm


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

* Re: [PATCH] clustered apic patch missing APIC_DFR_CLUSTER def
  2004-10-28 23:35 ` James Cleverdon
@ 2004-10-28 23:38   ` Andi Kleen
  2004-10-28 23:51   ` Chris Wright
  1 sibling, 0 replies; 4+ messages in thread
From: Andi Kleen @ 2004-10-28 23:38 UTC (permalink / raw)
  To: James Cleverdon; +Cc: Chris Wright, ak, linux-kernel

On Thu, Oct 28, 2004 at 04:35:23PM -0700, James Cleverdon wrote:
> Hmmm...  The patch containing APIC_DFR_CLUSTER and friends went
> into the -mm tree in the June/July timeframe.  It must not have
> been pushed with the main cluster patch.

Andrew moved it into the x86-64 kexec APIC patch for some unknown
reason.  And that obviously was not pushed ...

I already sent a patch to Linus and will send patches for 
the other known buglets too (warnings, safe_smp_processor_id())

-Andi

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

* Re: [PATCH] clustered apic patch missing APIC_DFR_CLUSTER def
  2004-10-28 23:35 ` James Cleverdon
  2004-10-28 23:38   ` Andi Kleen
@ 2004-10-28 23:51   ` Chris Wright
  1 sibling, 0 replies; 4+ messages in thread
From: Chris Wright @ 2004-10-28 23:51 UTC (permalink / raw)
  To: James Cleverdon; +Cc: Chris Wright, ak, linux-kernel

* James Cleverdon (jamesclv@us.ibm.com) wrote:
> Hmmm...  The patch containing APIC_DFR_CLUSTER and friends went
> into the -mm tree in the June/July timeframe.  It must not have
> been pushed with the main cluster patch.

OK, looks like Andi just sent something similar (i dropped the l (ell), since
it looked meant to be only 32bit).

> You're right, we're using the generic version of
> cpu_present_to_apicid().  The cluster one can go.

This part resent (below).

thanks,
-chris

Remove cluster_cpu_present_to_apicid(), it's defined but not used anywhere.

Signed-off-by: Chris Wright <chrisw@osdl.org>

===== arch/x86_64/kernel/genapic_cluster.c 1.1 vs edited =====
--- 1.1/arch/x86_64/kernel/genapic_cluster.c	2004-10-28 00:39:50 -07:00
+++ edited/arch/x86_64/kernel/genapic_cluster.c	2004-10-28 11:18:10 -07:00
@@ -57,14 +57,6 @@
 	apic_write_around(APIC_LDR, val);
 }
 
-static int cluster_cpu_present_to_apicid(int mps_cpu)
-{
-	if ((unsigned)mps_cpu < NR_CPUS)
-		return (int)bios_cpu_apicid[mps_cpu];
-	else
-		return BAD_APICID;
-}
-
 /* Start with all IRQs pointing to boot CPU.  IRQ balancing will shift them. */
 
 static cpumask_t cluster_target_cpus(void)

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

end of thread, other threads:[~2004-10-29  0:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-28 18:27 [PATCH] clustered apic patch missing APIC_DFR_CLUSTER def Chris Wright
2004-10-28 23:35 ` James Cleverdon
2004-10-28 23:38   ` Andi Kleen
2004-10-28 23:51   ` Chris Wright

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