Skip to contentSkip to conversation

x86/apic: remove the legacy bigsmp APIC driver

PATCH In review Matt Wilson 3 participants 7 messages Aug 27, 2013 – Aug 28, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/apic: remove the legacy bigsmp APIC driver

The bigsmp APIC driver was used on legacy (32-bit only) x86 platforms with 8 or more CPUs. In Linux the X86_BIGSMP Kconfig option depends on X86_32. Since we no longer support 32-bit hypervisors on the x86 platform we can remove this code.

Cc Keir Fraser <[email protected]>
Cc Jan Beulich <[email protected]>
Cc Andrew Cooper <[email protected]>
---
 docs/misc/xen-command-line.markdown          |    7 +--
 xen/arch/x86/acpi/boot.c                     |    1 -
 xen/arch/x86/genapic/Makefile                |    1 -
 xen/arch/x86/genapic/bigsmp.c                |   58 --------------------------
 xen/arch/x86/genapic/probe.c                 |   20 ---------
 xen/arch/x86/mpparse.c                       |    9 ----
 xen/include/asm-x86/mach-generic/mach_apic.h |    1 -
 xen/include/asm-x86/mpspec.h                 |    1 -
 8 files changed, 3 insertions(+), 95 deletions(-)
 delete mode 100644 xen/arch/x86/genapic/bigsmp.c
docs/misc/xen-command-line.markdown +3 -4
index 13c0306..d135c9c 100644
@@ -132,11 +132,10 @@ domain 0 command line
 Permit Xen to use superpages when performing memory management.
 
 ### apic
-> `= bigsmp | default`
+> `= default`
 
-Override Xen's logic for choosing the APIC driver.  By default, if
-there are more than 8 CPUs, Xen will switch to `bigsmp` over
-`default`.
+Override Xen's logic for choosing the APIC driver.  Currently
+there is only one APIC driver: `default`.
 
 ### allow\_unsafe
 > `= <boolean>`
xen/arch/x86/acpi/boot.c +0 -1
index 0e1d570..a095af2 100644
@@ -624,7 +624,6 @@ static void __init acpi_process_madt(void)
 		error = acpi_parse_madt_lapic_entries();
 		if (!error) {
 			acpi_lapic = 1;
-			generic_bigsmp_probe();
  
 			/*
 			 * Parse MADT IO-APIC entries
xen/arch/x86/genapic/Makefile +0 -1
index de72b5d..3e7a350 100644
@@ -1,4 +1,3 @@
-obj-y += bigsmp.o
 obj-y += x2apic.o
 obj-y += default.o
 obj-y += delivery.o
xen/arch/x86/genapic/bigsmp.c deleted +0 -58

58 lines not on this page · raw message

xen/arch/x86/genapic/probe.c +0 -20
index a5f2a24..19e5598 100644
@@ -16,35 +16,15 @@
 #include <asm/mach-generic/mach_apic.h>
 #include <asm/setup.h>
 
-extern const struct genapic apic_bigsmp;
-
 const struct genapic *__read_mostly genapic;
 
 const struct genapic *apic_probe[] __initdata = {
-	&apic_bigsmp, 
 	&apic_default,	/* must be last */
 	NULL,
 };
 
 static bool_t __initdata cmdline_apic;
 
-void __init generic_bigsmp_probe(void)
-{
-	/*
-	 * This routine is used to switch to bigsmp mode when
-	 * - There is no apic= option specified by the user
-	 * - generic_apic_probe() has choosen apic_default as the sub_arch
-	 * - we find more than 8 CPUs in acpi LAPIC listing with xAPIC support
-	 */
-
-	if (!cmdline_apic && genapic == &apic_default)
-		if (apic_bigsmp.probe()) {
-			genapic = &apic_bigsmp;
-			printk(KERN_INFO "Overriding APIC driver with %s\n",
-			       genapic->name);
-		}
-}
-
 static void __init genapic_apic_force(char *str)
 {
 	int i;
xen/arch/x86/mpparse.c +0 -9
index 97d34bc..bc3586d 100644
@@ -54,7 +54,6 @@ struct mpc_config_intsrc __read_mostly mp_irqs[MAX_IRQ_SOURCES];
 int __read_mostly mp_irq_entries;
 
 bool_t __read_mostly pic_mode;
-bool_t __read_mostly def_to_bigsmp = 0;
 unsigned long __read_mostly mp_lapic_addr;
 
 /* Processor that is doing the boot up */
@@ -164,14 +163,6 @@ static int __devinit MP_processor_info_x(struct mpc_config_processor *m,
 		cpumask_set_cpu(cpu, &cpu_present_map);
 	}
 
-	if (++num_processors > 8) {
-		/*
-		 * No need for processor or APIC checks: physical delivery
-		 * (bigsmp) mode should always work.
-		 */
-		def_to_bigsmp = 1;
-	}
-
 	return cpu;
 }
 
xen/include/asm-x86/mach-generic/mach_apic.h +0 -1
index ef76456..62a4de1 100644
@@ -44,7 +44,6 @@ static inline int multi_timer_check(int apic, int irq)
 }
 
 extern void generic_apic_probe(void);
-extern void generic_bigsmp_probe(void);
 
 /*
  * The following functions based around phys_cpu_present_map are disabled in
xen/include/asm-x86/mpspec.h +0 -1
index 8ae3cd5..4971f13 100644
@@ -7,7 +7,6 @@
 
 extern unsigned char mp_bus_id_to_type[MAX_MP_BUSSES];
 
-extern bool_t def_to_bigsmp;
 extern unsigned int boot_cpu_physical_apicid;
 extern bool_t smp_found_config;
 extern void find_smp_config (void);
Signature · 1 line
1.7.4.5
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Matt Wilson

The bigsmp APIC driver was used on legacy (32-bit only) x86 platforms with 8 or more CPUs. In Linux the X86_BIGSMP Kconfig option depends on X86_32. Since we no longer support 32-bit hypervisors on the x86 platform we can remove this code.

Cc Keir Fraser <[email protected]>
Cc Jan Beulich <[email protected]>
Cc Andrew Cooper <[email protected]>
Quoted 212 lines
---
 docs/misc/xen-command-line.markdown          |    7 +--
 xen/arch/x86/acpi/boot.c                     |    1 -
 xen/arch/x86/genapic/Makefile                |    1 -
 xen/arch/x86/genapic/bigsmp.c                |   58
--------------------------
 xen/arch/x86/genapic/probe.c                 |   20 ---------
 xen/arch/x86/mpparse.c                       |    9 ----
 xen/include/asm-x86/mach-generic/mach_apic.h |    1 -
 xen/include/asm-x86/mpspec.h                 |    1 -
 8 files changed, 3 insertions(+), 95 deletions(-)
 delete mode 100644 xen/arch/x86/genapic/bigsmp.c
docs/misc/xen-command-line.markdown +3 -4
index 13c0306..d135c9c 100644
@@ -132,11 +132,10 @@ domain 0 command line
 Permit Xen to use superpages when performing memory management.
 
 ### apic
-> `= bigsmp | default`
+> `= default`
 
-Override Xen's logic for choosing the APIC driver.  By default, if
-there are more than 8 CPUs, Xen will switch to `bigsmp` over
-`default`.
+Override Xen's logic for choosing the APIC driver.  Currently
+there is only one APIC driver: `default`.
 
 ### allow\_unsafe
Quoted 1 line

= <boolean>

xen/arch/x86/acpi/boot.c +0 -1
index 0e1d570..a095af2 100644
@@ -624,7 +624,6 @@ static void __init acpi_process_madt(void)
 error = acpi_parse_madt_lapic_entries();
 if (!error) {
 acpi_lapic = 1;
-   generic_bigsmp_probe();
 
 /*
 * Parse MADT IO-APIC entries
xen/arch/x86/genapic/Makefile +0 -1
index de72b5d..3e7a350 100644
@@ -1,4 +1,3 @@
-obj-y += bigsmp.o
 obj-y += x2apic.o
 obj-y += default.o
 obj-y += delivery.o
xen/arch/x86/genapic/bigsmp.c deleted +0 -58
deleted file mode 100644
index 96b23d6..0000000
@@ -1,58 +0,0 @@
-#include <xen/config.h>
-#include <xen/cpumask.h>
-#include <asm/current.h>
-#include <asm/mpspec.h>
-#include <asm/genapic.h>
-#include <asm/fixmap.h>
-#include <asm/apicdef.h>
-#include <xen/kernel.h>
-#include <xen/smp.h>
-#include <xen/init.h>
-#include <xen/dmi.h>
-#include <asm/mach-default/mach_mpparse.h>
-#include <asm/io_apic.h>
-
-static __init int force_bigsmp(struct dmi_system_id *d)
-{
- printk(KERN_NOTICE "%s detected: force use of apic=bigsmp\n", d->ident);
- def_to_bigsmp = 1;
- return 0;
-}
-
-
-static struct dmi_system_id __initdata bigsmp_dmi_table[] = {
- { force_bigsmp, "HP ProLiant DL760 G2", {
-  DMI_MATCH(DMI_BIOS_VENDOR, "HP"),
-  DMI_MATCH(DMI_BIOS_VERSION, "P44-"),
- }},
-
- { force_bigsmp, "HP ProLiant DL740", {
-  DMI_MATCH(DMI_BIOS_VENDOR, "HP"),
-  DMI_MATCH(DMI_BIOS_VERSION, "P47-"),
-  }},
- { force_bigsmp, "UNISYS ES7000-ONE", {
-  DMI_MATCH(DMI_PRODUCT_NAME, "ES7000-ONE")
-  }},
- 
-  { }
-};
-
-
-static __init int probe_bigsmp(void)
-{ 
- /*
-  * We don't implement cluster mode, so force use of
-  * physical mode in both cases.
-  */
- if (acpi_gbl_FADT.flags &
-     (ACPI_FADT_APIC_CLUSTER | ACPI_FADT_APIC_PHYSICAL))
-  def_to_bigsmp = 1;
- else if (!def_to_bigsmp)
-  dmi_check_system(bigsmp_dmi_table);
- return def_to_bigsmp;
-} 
-
-const struct genapic apic_bigsmp = {
- APIC_INIT("bigsmp", probe_bigsmp),
- GENAPIC_PHYS
-};
xen/arch/x86/genapic/probe.c +0 -3
index a5f2a24..19e5598 100644
@@ -16,35 +16,15 @@
 #include <asm/mach-generic/mach_apic.h>
 #include <asm/setup.h>
 
-extern const struct genapic apic_bigsmp;
-
 const struct genapic *__read_mostly genapic;
 
 const struct genapic *apic_probe[] __initdata = {
- &apic_bigsmp, 

&apic_default, /* must be last */
NULL,
};

static bool_t __initdata cmdline_apic;

xen/arch/x86/genapic/probe.c +0 -17
-void __init generic_bigsmp_probe(void)
-{
- /*
-  * This routine is used to switch to bigsmp mode when
-  * - There is no apic= option specified by the user
-  * - generic_apic_probe() has choosen apic_default as the sub_arch
-  * - we find more than 8 CPUs in acpi LAPIC listing with xAPIC support
-  */
-
- if (!cmdline_apic && genapic == &apic_default)
-  if (apic_bigsmp.probe()) {
-   genapic = &apic_bigsmp;
-   printk(KERN_INFO "Overriding APIC driver with %s\n",
-          genapic->name);
-  }
-}
-
 static void __init genapic_apic_force(char *str)
 {

int i;

xen/arch/x86/mpparse.c +0 -1
index 97d34bc..bc3586d 100644
@@ -54,7 +54,6 @@ struct mpc_config_intsrc __read_mostly
 mp_irqs[MAX_IRQ_SOURCES];
 int __read_mostly mp_irq_entries;
 
 bool_t __read_mostly pic_mode;
-bool_t __read_mostly def_to_bigsmp = 0;
 unsigned long __read_mostly mp_lapic_addr;
 

/* Processor that is doing the boot up */

xen/arch/x86/mpparse.c +0 -8
@@ -164,14 +163,6 @@ static int __devinit MP_processor_info_x(struct
 mpc_config_processor *m,
 cpumask_set_cpu(cpu, &cpu_present_map);
 }
 
- if (++num_processors > 8) {
-  /*
-   * No need for processor or APIC checks: physical delivery
-   * (bigsmp) mode should always work.
-   */
-  def_to_bigsmp = 1;
- }
-
 return cpu;
 }
xen/include/asm-x86/mach-generic/mach_apic.h +0 -1
index ef76456..62a4de1 100644
@@ -44,7 +44,6 @@ static inline int multi_timer_check(int apic, int irq)
 }
 
 extern void generic_apic_probe(void);
-extern void generic_bigsmp_probe(void);
 
 /*
  * The following functions based around phys_cpu_present_map are disabled in
xen/include/asm-x86/mpspec.h +0 -1
index 8ae3cd5..4971f13 100644
@@ -7,7 +7,6 @@
 
 extern unsigned char mp_bus_id_to_type[MAX_MP_BUSSES];
 
-extern bool_t def_to_bigsmp;
 extern unsigned int boot_cpu_physical_apicid;
 extern bool_t smp_found_config;
 extern void find_smp_config (void);
#2 lore raw
In reply to Matt Wilson
Quoted 5 lines
Quoted 1 line
Quoted 1 line · Matt Wilson

The bigsmp APIC driver was used on legacy (32-bit only) x86 platforms with 8 or more CPUs. In Linux the X86_BIGSMP Kconfig option depends on X86_32. Since we no longer support 32-bit hypervisors on the x86 platform we can remove this code.

The fact that this is 32-bit only in Linux doesn't mean anything. Linux has other 64-bit only models, which we don't have (in favor of, originally, having a single shared implementation).

On a system without x2APIC but more than 8 CPUs - how would you see us bringing up the CPUs beyond 8? This is particularly shown by your adjustment to MP_processor_info_x(), which is code removal without replacement.

Despite Keir's ack, unless I'm overlooking something I'm explicitly nack-ing this.

Jan

#3 lore raw
Quoted 10 lines · Jan Beulich
Quoted 5 lines
Quoted 1 line
Quoted 1 line · Matt Wilson

The bigsmp APIC driver was used on legacy (32-bit only) x86 platforms with 8 or more CPUs. In Linux the X86_BIGSMP Kconfig option depends on X86_32. Since we no longer support 32-bit hypervisors on the x86 platform we can remove this code.

The fact that this is 32-bit only in Linux doesn't mean anything. Linux has other 64-bit only models, which we don't have (in favor of, originally, having a single shared implementation).

Quoted 7 lines

On a system without x2APIC but more than 8 CPUs - how would you see us bringing up the CPUs beyond 8? This is particularly shown by your adjustment to MP_processor_info_x(), which is code removal without replacement.

Despite Keir's ack, unless I'm overlooking something I'm explicitly nack-ing this.

Thanks. You are right of course. Oops!

Quoted 2 lines

Jan

#4 lore raw
In reply to Jan Beulich
Quoted 6 lines · Jan Beulich
Quoted 5 lines
Quoted 1 line
Quoted 1 line · Matt Wilson

The bigsmp APIC driver was used on legacy (32-bit only) x86 platforms with 8 or more CPUs. In Linux the X86_BIGSMP Kconfig option depends on X86_32. Since we no longer support 32-bit hypervisors on the x86 platform we can remove this code.

Quoted 8 lines

The fact that this is 32-bit only in Linux doesn't mean anything. Linux has other 64-bit only models, which we don't have (in favor of, originally, having a single shared implementation).

On a system without x2APIC but more than 8 CPUs - how would you see us bringing up the CPUs beyond 8? This is particularly shown by your adjustment to MP_processor_info_x(), which is code removal without replacement.

Aargh, my mistake. I didn't realize that the default driver didn't have physical flat support, and missed that bigsmp is actually the physflat implementation.

Quoted 2 lines

Despite Keir's ack, unless I'm overlooking something I'm explicitly nack-ing this.

Agreed, sorry for the noise. What we can remove, however, is the DMI check for 32-bit only systems in the bigsmp code.

It's a bit confusing to call this mode "bigsmp" instead of "physical." Any thoughts on that?

--msw

#5 lore raw
Quoted 3 lines
Quoted 1 line
Quoted 1 line · Matt Wilson

Agreed, sorry for the noise. What we can remove, however, is the DMI check for 32-bit only systems in the bigsmp code.

Yes, feel free to send a cut down patch.

Quoted 2 lines

It's a bit confusing to call this mode "bigsmp" instead of "physical." Any thoughts on that?

I'm not really certain which one is better - both express some valid aspect.

Jan

#6 lore raw
Quoted 11 lines · Jan Beulich
Quoted 3 lines
Quoted 1 line
Quoted 1 line · Matt Wilson

Agreed, sorry for the noise. What we can remove, however, is the DMI check for 32-bit only systems in the bigsmp code.

Yes, feel free to send a cut down patch.

Quoted 2 lines

It's a bit confusing to call this mode "bigsmp" instead of "physical." Any thoughts on that?

I'm not really certain which one is better - both express some valid aspect.

The current name is fine imo.

-- Keir

Quoted 2 lines

Jan