public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH][2.4]  generic support for systems with more than 8 CPUs (2/2)
@ 2002-12-22  6:59 Pallipadi, Venkatesh
  2002-12-22 12:17 ` William Lee Irwin III
  2002-12-22 17:43 ` Martin J. Bligh
  0 siblings, 2 replies; 6+ messages in thread
From: Pallipadi, Venkatesh @ 2002-12-22  6:59 UTC (permalink / raw)
  To: Martin J. Bligh, Nakajima, Jun, Van Maren, Kevin,
	William Lee Irwin III, Christoph Hellwig, James Cleverdon,
	John Stultz, Mallick, Asit K, Saxena, Sunil, Linux Kernel
  Cc: Protasevich, Natalie

[-- Attachment #1: Type: text/plain, Size: 3202 bytes --]

2/2 : switching to physical mode APIC setup in case of more than 8 CPU system

Thanks,
-Venkatesh

diff -urN linux-2.4.21-pre2.org/Documentation/Configure.help linux-2.4.21-pre2/Documentation/Configure.help
--- linux-2.4.21-pre2.org/Documentation/Configure.help	2002-12-17 20:05:15.000000000 -0800
+++ linux-2.4.21-pre2/Documentation/Configure.help	2002-12-17 20:11:23.000000000 -0800
@@ -262,6 +262,13 @@
 
   If you don't have this computer, you may safely say N.
 
+Other more than 8 logical CPU system support
+CONFIG_X86_MANY_CPU
+  This option is required to support systems with more than 8 logical CPUs.
+
+  If you don't have such a computer, you may safely say N.
+  You dont have to choose this for IBM Summit/x440 systems.
+
 IO-APIC support on uniprocessors
 CONFIG_X86_UP_IOAPIC
   An IO-APIC (I/O Advanced Programmable Interrupt Controller) is an
diff -urN linux-2.4.21-pre2.org/arch/i386/config.in linux-2.4.21-pre2/arch/i386/config.in
--- linux-2.4.21-pre2.org/arch/i386/config.in	2002-12-17 20:05:15.000000000 -0800
+++ linux-2.4.21-pre2/arch/i386/config.in	2002-12-17 20:11:23.000000000 -0800
@@ -229,6 +229,10 @@
          define_bool CONFIG_X86_CLUSTERED_APIC y
       fi
    fi
+   bool 'Other more than 8 logical CPU system support' CONFIG_X86_MANY_CPU
+   if [ "$CONFIG_X86_MANY_CPU" = "y" ]; then
+      define_bool CONFIG_X86_CLUSTERED_APIC y
+   fi
 fi
 
 if [ "$CONFIG_X86_NUMA" != "y" ]; then
diff -urN linux-2.4.21-pre2.org/arch/i386/kernel/mpparse.c linux-2.4.21-pre2/arch/i386/kernel/mpparse.c
--- linux-2.4.21-pre2.org/arch/i386/kernel/mpparse.c	2002-12-17 20:12:21.000000000 -0800
+++ linux-2.4.21-pre2/arch/i386/kernel/mpparse.c	2002-12-17 20:11:23.000000000 -0800
@@ -590,15 +590,6 @@
 	}
 
 
-	printk("Enabling APIC mode: ");
-	if(clustered_apic_mode == CLUSTERED_APIC_NUMAQ)
-		printk("Clustered Logical.	");
-	else if(clustered_apic_mode == CLUSTERED_APIC_XAPIC)
-		printk("Physical.	");
-	else
-		printk("Flat.	");
-	printk("Using %d I/O APICs\n",nr_ioapics);
-
 	if (!num_processors)
 		printk(KERN_ERR "SMP mptable: no processors registered!\n");
 	return num_processors;
@@ -834,6 +825,33 @@
 
 	printk("Processors: %d\n", num_processors);
 	printk("xAPIC support %s present\n", (xapic_support?"is":"is not"));
+
+#ifdef CONFIG_X86_CLUSTERED_APIC
+	/*
+	 * Switch to Physical destination mode in case of generic
+	 * more than 8 CPU system, which has xAPIC support
+	 */
+#define FLAT_APIC_CPU_MAX	8
+	if ((clustered_apic_mode == CLUSTERED_APIC_NONE) &&
+	    (xapic_support) &&
+	    (num_processors > FLAT_APIC_CPU_MAX)) {
+		clustered_apic_mode = CLUSTERED_APIC_XAPIC;
+		apic_broadcast_id = APIC_BROADCAST_ID_XAPIC;
+		int_dest_addr_mode = APIC_DEST_PHYSICAL;
+		int_delivery_mode = dest_Fixed;
+		esr_disable = 1;
+	}
+#endif
+
+	printk("Enabling APIC mode: ");
+	if (clustered_apic_mode == CLUSTERED_APIC_NUMAQ)
+		printk("Clustered Logical.	");
+	else if (clustered_apic_mode == CLUSTERED_APIC_XAPIC)
+		printk("Physical.	");
+	else
+		printk("Flat.	");
+	printk("Using %d I/O APICs\n",nr_ioapics);
+
 	/*
 	 * Only use the first configuration found.
 	 */




[-- Attachment #2: physapic_2.4.21-pre2.patch --]
[-- Type: application/octet-stream, Size: 3008 bytes --]

diff -urN linux-2.4.21-pre2.org/Documentation/Configure.help linux-2.4.21-pre2/Documentation/Configure.help
--- linux-2.4.21-pre2.org/Documentation/Configure.help	2002-12-17 20:05:15.000000000 -0800
+++ linux-2.4.21-pre2/Documentation/Configure.help	2002-12-17 20:11:23.000000000 -0800
@@ -262,6 +262,13 @@
 
   If you don't have this computer, you may safely say N.
 
+Other more than 8 logical CPU system support
+CONFIG_X86_MANY_CPU
+  This option is required to support systems with more than 8 logical CPUs.
+
+  If you don't have such a computer, you may safely say N.
+  You dont have to choose this for IBM Summit/x440 systems.
+
 IO-APIC support on uniprocessors
 CONFIG_X86_UP_IOAPIC
   An IO-APIC (I/O Advanced Programmable Interrupt Controller) is an
diff -urN linux-2.4.21-pre2.org/arch/i386/config.in linux-2.4.21-pre2/arch/i386/config.in
--- linux-2.4.21-pre2.org/arch/i386/config.in	2002-12-17 20:05:15.000000000 -0800
+++ linux-2.4.21-pre2/arch/i386/config.in	2002-12-17 20:11:23.000000000 -0800
@@ -229,6 +229,10 @@
          define_bool CONFIG_X86_CLUSTERED_APIC y
       fi
    fi
+   bool 'Other more than 8 logical CPU system support' CONFIG_X86_MANY_CPU
+   if [ "$CONFIG_X86_MANY_CPU" = "y" ]; then
+      define_bool CONFIG_X86_CLUSTERED_APIC y
+   fi
 fi
 
 if [ "$CONFIG_X86_NUMA" != "y" ]; then
diff -urN linux-2.4.21-pre2.org/arch/i386/kernel/mpparse.c linux-2.4.21-pre2/arch/i386/kernel/mpparse.c
--- linux-2.4.21-pre2.org/arch/i386/kernel/mpparse.c	2002-12-17 20:12:21.000000000 -0800
+++ linux-2.4.21-pre2/arch/i386/kernel/mpparse.c	2002-12-17 20:11:23.000000000 -0800
@@ -590,15 +590,6 @@
 	}
 
 
-	printk("Enabling APIC mode: ");
-	if(clustered_apic_mode == CLUSTERED_APIC_NUMAQ)
-		printk("Clustered Logical.	");
-	else if(clustered_apic_mode == CLUSTERED_APIC_XAPIC)
-		printk("Physical.	");
-	else
-		printk("Flat.	");
-	printk("Using %d I/O APICs\n",nr_ioapics);
-
 	if (!num_processors)
 		printk(KERN_ERR "SMP mptable: no processors registered!\n");
 	return num_processors;
@@ -834,6 +825,33 @@
 
 	printk("Processors: %d\n", num_processors);
 	printk("xAPIC support %s present\n", (xapic_support?"is":"is not"));
+
+#ifdef CONFIG_X86_CLUSTERED_APIC
+	/*
+	 * Switch to Physical destination mode in case of generic
+	 * more than 8 CPU system, which has xAPIC support
+	 */
+#define FLAT_APIC_CPU_MAX	8
+	if ((clustered_apic_mode == CLUSTERED_APIC_NONE) &&
+	    (xapic_support) &&
+	    (num_processors > FLAT_APIC_CPU_MAX)) {
+		clustered_apic_mode = CLUSTERED_APIC_XAPIC;
+		apic_broadcast_id = APIC_BROADCAST_ID_XAPIC;
+		int_dest_addr_mode = APIC_DEST_PHYSICAL;
+		int_delivery_mode = dest_Fixed;
+		esr_disable = 1;
+	}
+#endif
+
+	printk("Enabling APIC mode: ");
+	if (clustered_apic_mode == CLUSTERED_APIC_NUMAQ)
+		printk("Clustered Logical.	");
+	else if (clustered_apic_mode == CLUSTERED_APIC_XAPIC)
+		printk("Physical.	");
+	else
+		printk("Flat.	");
+	printk("Using %d I/O APICs\n",nr_ioapics);
+
 	/*
 	 * Only use the first configuration found.
 	 */

^ permalink raw reply	[flat|nested] 6+ messages in thread
* RE: [PATCH][2.4]  generic support for systems with more than 8 CPUs (2/2)
@ 2002-12-23  1:36 Pallipadi, Venkatesh
  0 siblings, 0 replies; 6+ messages in thread
From: Pallipadi, Venkatesh @ 2002-12-23  1:36 UTC (permalink / raw)
  To: William Lee Irwin III
  Cc: Martin J. Bligh, Nakajima, Jun, Van Maren, Kevin,
	Christoph Hellwig, James Cleverdon, John Stultz, Mallick, Asit K,
	Saxena, Sunil, Linux Kernel, Protasevich, Natalie



> From: William Lee Irwin III [mailto:wli@holomorphy.com]
> 
> On Sat, Dec 21, 2002 at 10:59:10PM -0800, Pallipadi, Venkatesh wrote:
> > 2/2 : switching to physical mode APIC setup in case of more 
> than 8 CPU system
> [...]
> > -	printk("Enabling APIC mode: ");
> > -	if(clustered_apic_mode == CLUSTERED_APIC_NUMAQ)
> > -		printk("Clustered Logical.	");
> > -	else if(clustered_apic_mode == CLUSTERED_APIC_XAPIC)
> > -		printk("Physical.	");
> > -	else
> > -		printk("Flat.	");
> > -	printk("Using %d I/O APICs\n",nr_ioapics);
> 
> IIRC NUMA-Q can be dynamically detected at boot by means of an MP OEM
> table's presence, in particular if there's a matching string in the 8B
> OEM record in the OEM table, with a value of "IBM NUMA" IIRC. This is
> probably a line or two's worth of change to mpparse.c and declaring a
> variable for clustered_apic_mode. If it were difficult to detect, I
> wouldn't have suggested implementing it (though do so at your 
> leisure). =)

Yes. There is already some code in base that does this. For NUMAQ specifically
this check happens and clustered mode is selected for APIC. My patch has this 
additinal check (after the initial IBM OEM check), for non-NUMAQ systems with 
more than 8 CPUs and xAPIC support. These systems can not work with the 
default flat addressing mode. So, this patch sets up such systems in physical 
mode.

Thanks,
-Venkatesh

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

end of thread, other threads:[~2002-12-23  1:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-22  6:59 [PATCH][2.4] generic support for systems with more than 8 CPUs (2/2) Pallipadi, Venkatesh
2002-12-22 12:17 ` William Lee Irwin III
2002-12-22 17:47   ` Martin J. Bligh
2002-12-22 22:23     ` William Lee Irwin III
2002-12-22 17:43 ` Martin J. Bligh
  -- strict thread matches above, loose matches on Subject: below --
2002-12-23  1:36 Pallipadi, Venkatesh

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