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. Signed-off-by: Matt Wilson <msw@amazon.com> Cc: Keir Fraser <keir@xen.org> Cc: Jan Beulich <jbeulich@suse.com> Cc: Andrew Cooper <andrew.cooper3@citrix.com> --- 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 diff --git a/docs/misc/xen-command-line.markdown b/docs/misc/xen-command-line.markdown index 13c0306..d135c9c 100644 --- a/docs/misc/xen-command-line.markdown +++ b/docs/misc/xen-command-line.markdown @@ -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>` diff --git a/xen/arch/x86/acpi/boot.c b/xen/arch/x86/acpi/boot.c index 0e1d570..a095af2 100644 --- a/xen/arch/x86/acpi/boot.c +++ b/xen/arch/x86/acpi/boot.c @@ -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 diff --git a/xen/arch/x86/genapic/Makefile b/xen/arch/x86/genapic/Makefile index de72b5d..3e7a350 100644 --- a/xen/arch/x86/genapic/Makefile +++ b/xen/arch/x86/genapic/Makefile @@ -1,4 +1,3 @@ -obj-y += bigsmp.o obj-y += x2apic.o obj-y += default.o obj-y += delivery.o diff --git a/xen/arch/x86/genapic/bigsmp.c b/xen/arch/x86/genapic/bigsmp.c deleted file mode 100644 index 96b23d6..0000000 --- a/xen/arch/x86/genapic/bigsmp.c +++ /dev/null @@ -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 -}; diff --git a/xen/arch/x86/genapic/probe.c b/xen/arch/x86/genapic/probe.c index a5f2a24..19e5598 100644 --- a/xen/arch/x86/genapic/probe.c +++ b/xen/arch/x86/genapic/probe.c @@ -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; diff --git a/xen/arch/x86/mpparse.c b/xen/arch/x86/mpparse.c index 97d34bc..bc3586d 100644 --- a/xen/arch/x86/mpparse.c +++ b/xen/arch/x86/mpparse.c @@ -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; } diff --git a/xen/include/asm-x86/mach-generic/mach_apic.h b/xen/include/asm-x86/mach-generic/mach_apic.h index ef76456..62a4de1 100644 --- a/xen/include/asm-x86/mach-generic/mach_apic.h +++ b/xen/include/asm-x86/mach-generic/mach_apic.h @@ -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 diff --git a/xen/include/asm-x86/mpspec.h b/xen/include/asm-x86/mpspec.h index 8ae3cd5..4971f13 100644 --- a/xen/include/asm-x86/mpspec.h +++ b/xen/include/asm-x86/mpspec.h @@ -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); -- 1.7.4.5
Keir Fraser
2013-Aug-27 06:08 UTC
Re: [PATCH] x86/apic: remove the legacy bigsmp APIC driver
On 27/08/2013 06:44, "Matt Wilson" <msw@amazon.com> wrote:> 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. > > Signed-off-by: Matt Wilson <msw@amazon.com> > Cc: Keir Fraser <keir@xen.org> > Cc: Jan Beulich <jbeulich@suse.com> > Cc: Andrew Cooper <andrew.cooper3@citrix.com>Acked-by: Keir Fraser <keir@xen.org>> --- > 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 > > diff --git a/docs/misc/xen-command-line.markdown > b/docs/misc/xen-command-line.markdown > index 13c0306..d135c9c 100644 > --- a/docs/misc/xen-command-line.markdown > +++ b/docs/misc/xen-command-line.markdown > @@ -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>` > diff --git a/xen/arch/x86/acpi/boot.c b/xen/arch/x86/acpi/boot.c > index 0e1d570..a095af2 100644 > --- a/xen/arch/x86/acpi/boot.c > +++ b/xen/arch/x86/acpi/boot.c > @@ -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 > diff --git a/xen/arch/x86/genapic/Makefile b/xen/arch/x86/genapic/Makefile > index de72b5d..3e7a350 100644 > --- a/xen/arch/x86/genapic/Makefile > +++ b/xen/arch/x86/genapic/Makefile > @@ -1,4 +1,3 @@ > -obj-y += bigsmp.o > obj-y += x2apic.o > obj-y += default.o > obj-y += delivery.o > diff --git a/xen/arch/x86/genapic/bigsmp.c b/xen/arch/x86/genapic/bigsmp.c > deleted file mode 100644 > index 96b23d6..0000000 > --- a/xen/arch/x86/genapic/bigsmp.c > +++ /dev/null > @@ -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 > -}; > diff --git a/xen/arch/x86/genapic/probe.c b/xen/arch/x86/genapic/probe.c > index a5f2a24..19e5598 100644 > --- a/xen/arch/x86/genapic/probe.c > +++ b/xen/arch/x86/genapic/probe.c > @@ -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; > diff --git a/xen/arch/x86/mpparse.c b/xen/arch/x86/mpparse.c > index 97d34bc..bc3586d 100644 > --- a/xen/arch/x86/mpparse.c > +++ b/xen/arch/x86/mpparse.c > @@ -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; > } > > diff --git a/xen/include/asm-x86/mach-generic/mach_apic.h > b/xen/include/asm-x86/mach-generic/mach_apic.h > index ef76456..62a4de1 100644 > --- a/xen/include/asm-x86/mach-generic/mach_apic.h > +++ b/xen/include/asm-x86/mach-generic/mach_apic.h > @@ -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 > diff --git a/xen/include/asm-x86/mpspec.h b/xen/include/asm-x86/mpspec.h > index 8ae3cd5..4971f13 100644 > --- a/xen/include/asm-x86/mpspec.h > +++ b/xen/include/asm-x86/mpspec.h > @@ -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);
Jan Beulich
2013-Aug-27 08:17 UTC
Re: [PATCH] x86/apic: remove the legacy bigsmp APIC driver
>>> On 27.08.13 at 07:44, Matt Wilson <msw@amazon.com> wrote: > 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
Keir Fraser
2013-Aug-27 18:10 UTC
Re: [PATCH] x86/apic: remove the legacy bigsmp APIC driver
On 27/08/2013 09:17, "Jan Beulich" <JBeulich@suse.com> wrote:>>>> On 27.08.13 at 07:44, Matt Wilson <msw@amazon.com> wrote: >> 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.Thanks. You are right of course. Oops!> Jan >
Matt Wilson
2013-Aug-27 21:34 UTC
Re: [PATCH] x86/apic: remove the legacy bigsmp APIC driver
On Tue, Aug 27, 2013 at 09:17:37AM +0100, Jan Beulich wrote:> >>> On 27.08.13 at 07:44, Matt Wilson <msw@amazon.com> wrote: > > 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.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.> 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
Jan Beulich
2013-Aug-28 07:44 UTC
Re: [PATCH] x86/apic: remove the legacy bigsmp APIC driver
>>> On 27.08.13 at 23:34, Matt Wilson <msw@amazon.com> wrote: > 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.> 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
Keir Fraser
2013-Aug-28 12:49 UTC
Re: [PATCH] x86/apic: remove the legacy bigsmp APIC driver
On 28/08/2013 08:44, "Jan Beulich" <JBeulich@suse.com> wrote:>>>> On 27.08.13 at 23:34, Matt Wilson <msw@amazon.com> wrote: >> 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. > >> 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> Jan >