* [PATCHv2] Remove EFI memmap quirk for UV @ 2015-12-11 20:59 Alex Thorlton 2015-12-11 20:59 ` [PATCH] Remove EFI memmap quirk for UV2+ Alex Thorlton 0 siblings, 1 reply; 6+ messages in thread From: Alex Thorlton @ 2015-12-11 20:59 UTC (permalink / raw) To: linux-kernel-u79uwXL29TY76Z2rM5mHXA Cc: Alex Thorlton, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86-DgEjT+Ai2ygdnm+yROfE0A, Matt Fleming, Dimitri Sivanich, Hedi Berriche, Mike Travis, Len Brown, linux-efi-u79uwXL29TY76Z2rM5mHXA Hey guys, This is my second shot at a patch to remove this quirk. This version uses dmi_check_system to determine if we're on a UV that still needs the quirk, to avoid issues on older hardware. Let me know what everyone thinks! Signed-off-by: Alex Thorlton <athorlton-sJ/iWh9BUns@public.gmane.org> Cc: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org> Cc: Ingo Molnar <mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Cc: "H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org> Cc: x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org Cc: Matt Fleming <matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org> Cc: Dimitri Sivanich <sivanich-sJ/iWh9BUns@public.gmane.org> Cc: Hedi Berriche <hedi-sJ/iWh9BUns@public.gmane.org> Cc: Mike Travis <travis-sJ/iWh9BUns@public.gmane.org> Cc: Len Brown <len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> Cc: linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Alex Thorlton (1): Remove EFI memmap quirk for UV2+ arch/x86/kernel/apic/x2apic_uv_x.c | 5 ++++- arch/x86/platform/efi/quirks.c | 17 +++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) -- 1.8.5.6 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] Remove EFI memmap quirk for UV2+ 2015-12-11 20:59 [PATCHv2] Remove EFI memmap quirk for UV Alex Thorlton @ 2015-12-11 20:59 ` Alex Thorlton [not found] ` <1449867585-189233-2-git-send-email-athorlton-sJ/iWh9BUns@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Alex Thorlton @ 2015-12-11 20:59 UTC (permalink / raw) To: linux-kernel Cc: Alex Thorlton, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, Matt Fleming, Dimitri Sivanich, Hedi Berriche, Mike Travis, Len Brown, linux-efi Commit a5d90c923bcf ("x86/efi: Quirk out SGI UV") added a quirk to efi_apply_memmap_quirks to force SGI UV systems to fall back to the old EFI memmap mechanism. We have a BIOS fix for this issue on all systems except for UV1. This commit fixes up the EFI quirk/MMR mapping code so that we only apply the special case to UV1 hardware. Signed-off-by: Alex Thorlton <athorlton@sgi.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: x86@kernel.org Cc: Matt Fleming <matt@codeblueprint.co.uk> Cc: Dimitri Sivanich <sivanich@sgi.com> Cc: Hedi Berriche <hedi@sgi.com> Cc: Mike Travis <travis@sgi.com> Cc: Len Brown <len.brown@intel.com> Cc: linux-efi@vger.kernel.org --- arch/x86/kernel/apic/x2apic_uv_x.c | 5 ++++- arch/x86/platform/efi/quirks.c | 17 +++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c index 4a13946..96ba195 100644 --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c @@ -888,7 +888,10 @@ void __init uv_system_init(void) return; } pr_info("UV: Found %s hub\n", hub); - map_low_mmrs(); + + /* We now only need to map the MMRs on UV1 */ + if (is_uv1_hub()) + map_low_mmrs(); m_n_config.v = uv_read_local_mmr(UVH_RH_GAM_CONFIG_MMR ); m_val = m_n_config.s.m_skt; diff --git a/arch/x86/platform/efi/quirks.c b/arch/x86/platform/efi/quirks.c index 1c7380d..2d66db8 100644 --- a/arch/x86/platform/efi/quirks.c +++ b/arch/x86/platform/efi/quirks.c @@ -8,6 +8,7 @@ #include <linux/memblock.h> #include <linux/bootmem.h> #include <linux/acpi.h> +#include <linux/dmi.h> #include <asm/efi.h> #include <asm/uv/uv.h> @@ -248,6 +249,16 @@ out: return ret; } +static const struct dmi_system_id sgi_uv1_dmi[] = { + { NULL, "SGI UV1", + { DMI_MATCH(DMI_PRODUCT_NAME, "Stoutland Platform"), + DMI_MATCH(DMI_PRODUCT_VERSION, "1.0"), + DMI_MATCH(DMI_BIOS_VENDOR, "SGI.COM"), + } + }, + { } /* NULL entry stops DMI scanning */ +}; + void __init efi_apply_memmap_quirks(void) { /* @@ -260,10 +271,8 @@ void __init efi_apply_memmap_quirks(void) efi_unmap_memmap(); } - /* - * UV doesn't support the new EFI pagetable mapping yet. - */ - if (is_uv_system()) + /* UV2+ BIOS has a fix for this issue. UV1 still needs the quirk. */ + if (dmi_check_system(sgi_uv1_dmi)) set_bit(EFI_OLD_MEMMAP, &efi.flags); } -- 1.8.5.6 ^ permalink raw reply related [flat|nested] 6+ messages in thread
[parent not found: <1449867585-189233-2-git-send-email-athorlton-sJ/iWh9BUns@public.gmane.org>]
* Re: [PATCH] Remove EFI memmap quirk for UV2+ [not found] ` <1449867585-189233-2-git-send-email-athorlton-sJ/iWh9BUns@public.gmane.org> @ 2015-12-14 8:41 ` Ingo Molnar [not found] ` <20151214084157.GB28073-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Ingo Molnar @ 2015-12-14 8:41 UTC (permalink / raw) To: Alex Thorlton Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86-DgEjT+Ai2ygdnm+yROfE0A, Matt Fleming, Dimitri Sivanich, Hedi Berriche, Mike Travis, Len Brown, linux-efi-u79uwXL29TY76Z2rM5mHXA * Alex Thorlton <athorlton-sJ/iWh9BUns@public.gmane.org> wrote: > Commit a5d90c923bcf ("x86/efi: Quirk out SGI UV") added a quirk to > efi_apply_memmap_quirks to force SGI UV systems to fall back to the old > EFI memmap mechanism. We have a BIOS fix for this issue on all systems > except for UV1. This commit fixes up the EFI quirk/MMR mapping code so > that we only apply the special case to UV1 hardware. > > Signed-off-by: Alex Thorlton <athorlton-sJ/iWh9BUns@public.gmane.org> > Cc: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org> > Cc: Ingo Molnar <mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> > Cc: "H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org> > Cc: x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org > Cc: Matt Fleming <matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org> > Cc: Dimitri Sivanich <sivanich-sJ/iWh9BUns@public.gmane.org> > Cc: Hedi Berriche <hedi-sJ/iWh9BUns@public.gmane.org> > Cc: Mike Travis <travis-sJ/iWh9BUns@public.gmane.org> > Cc: Len Brown <len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > Cc: linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > > --- > arch/x86/kernel/apic/x2apic_uv_x.c | 5 ++++- > arch/x86/platform/efi/quirks.c | 17 +++++++++++++---- > 2 files changed, 17 insertions(+), 5 deletions(-) > > diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c > index 4a13946..96ba195 100644 > --- a/arch/x86/kernel/apic/x2apic_uv_x.c > +++ b/arch/x86/kernel/apic/x2apic_uv_x.c > @@ -888,7 +888,10 @@ void __init uv_system_init(void) > return; > } > pr_info("UV: Found %s hub\n", hub); > - map_low_mmrs(); > + > + /* We now only need to map the MMRs on UV1 */ > + if (is_uv1_hub()) > + map_low_mmrs(); > > m_n_config.v = uv_read_local_mmr(UVH_RH_GAM_CONFIG_MMR ); > m_val = m_n_config.s.m_skt; > diff --git a/arch/x86/platform/efi/quirks.c b/arch/x86/platform/efi/quirks.c > index 1c7380d..2d66db8 100644 > --- a/arch/x86/platform/efi/quirks.c > +++ b/arch/x86/platform/efi/quirks.c > @@ -8,6 +8,7 @@ > #include <linux/memblock.h> > #include <linux/bootmem.h> > #include <linux/acpi.h> > +#include <linux/dmi.h> > #include <asm/efi.h> > #include <asm/uv/uv.h> > > @@ -248,6 +249,16 @@ out: > return ret; > } > > +static const struct dmi_system_id sgi_uv1_dmi[] = { > + { NULL, "SGI UV1", > + { DMI_MATCH(DMI_PRODUCT_NAME, "Stoutland Platform"), > + DMI_MATCH(DMI_PRODUCT_VERSION, "1.0"), > + DMI_MATCH(DMI_BIOS_VENDOR, "SGI.COM"), > + } > + }, > + { } /* NULL entry stops DMI scanning */ > +}; > + > void __init efi_apply_memmap_quirks(void) > { > /* > @@ -260,10 +271,8 @@ void __init efi_apply_memmap_quirks(void) > efi_unmap_memmap(); > } > > - /* > - * UV doesn't support the new EFI pagetable mapping yet. > - */ > - if (is_uv_system()) > + /* UV2+ BIOS has a fix for this issue. UV1 still needs the quirk. */ > + if (dmi_check_system(sgi_uv1_dmi)) > set_bit(EFI_OLD_MEMMAP, &efi.flags); > } Ok, this looks good to me and I'll apply it if it looks good to Matt as well. This also means we cannot (yet) remove the old memmap code from the EFI code, but that's the price of compatibility. Btw., can UV1 users fix this via a BIOS update? In that case feel free to nudge your users via something like: > + /* UV2+ BIOS has a fix for this issue. UV1 still needs the quirk. */ > + if (dmi_check_system(sgi_uv1_dmi)) { > + pr_info("x86/uv: Activating EFI memmap workaround.\n"); > + pr_info("x86/uv: Please upgrade your BIOS to version x.y.z+ to get rid of this message.\n"); > set_bit(EFI_OLD_MEMMAP, &efi.flags); or so. (But only if it's expected of them to upgrade the BIOS to resolve other bugs as well - I personally only upgrade BIOSen if absolutely necessary.) Thanks, Ingo ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <20151214084157.GB28073-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH] Remove EFI memmap quirk for UV2+ [not found] ` <20151214084157.GB28073-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2015-12-14 15:56 ` Matt Fleming 2015-12-14 18:20 ` Alex Thorlton 1 sibling, 0 replies; 6+ messages in thread From: Matt Fleming @ 2015-12-14 15:56 UTC (permalink / raw) To: Ingo Molnar Cc: Alex Thorlton, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86-DgEjT+Ai2ygdnm+yROfE0A, Dimitri Sivanich, Hedi Berriche, Mike Travis, Len Brown, linux-efi-u79uwXL29TY76Z2rM5mHXA On Mon, 14 Dec, at 09:41:58AM, Ingo Molnar wrote: > > Ok, this looks good to me and I'll apply it if it looks good to Matt as well. Yep, looks OK to me. Feel free to pick it up directly, Reviewed-by: Matt Fleming <matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Remove EFI memmap quirk for UV2+ [not found] ` <20151214084157.GB28073-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2015-12-14 15:56 ` Matt Fleming @ 2015-12-14 18:20 ` Alex Thorlton [not found] ` <20151214182053.GL164416-7ppMa7wkY9tKToyKb8PD+Zs2JHu2awxn0E9HWUfgJXw@public.gmane.org> 1 sibling, 1 reply; 6+ messages in thread From: Alex Thorlton @ 2015-12-14 18:20 UTC (permalink / raw) To: Ingo Molnar Cc: Alex Thorlton, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86-DgEjT+Ai2ygdnm+yROfE0A, Matt Fleming, Dimitri Sivanich, Hedi Berriche, Mike Travis, Len Brown, linux-efi-u79uwXL29TY76Z2rM5mHXA On Mon, Dec 14, 2015 at 09:41:58AM +0100, Ingo Molnar wrote: > * Alex Thorlton <athorlton-sJ/iWh9BUns@public.gmane.org> wrote: > Ok, this looks good to me and I'll apply it if it looks good to Matt as well. Cool! Thanks, Ingo. > Btw., can UV1 users fix this via a BIOS update? Unfortunately, no. This fix was put into UV2+ BIOS a while back, but we haven't spun a new UV1 BIOS for several years, and don't intend to release another version. This issue is likely going to follow UV1s to their grave :( - Alex ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <20151214182053.GL164416-7ppMa7wkY9tKToyKb8PD+Zs2JHu2awxn0E9HWUfgJXw@public.gmane.org>]
* Re: [PATCH] Remove EFI memmap quirk for UV2+ [not found] ` <20151214182053.GL164416-7ppMa7wkY9tKToyKb8PD+Zs2JHu2awxn0E9HWUfgJXw@public.gmane.org> @ 2016-01-19 10:57 ` Ingo Molnar 0 siblings, 0 replies; 6+ messages in thread From: Ingo Molnar @ 2016-01-19 10:57 UTC (permalink / raw) To: Alex Thorlton Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86-DgEjT+Ai2ygdnm+yROfE0A, Matt Fleming, Dimitri Sivanich, Hedi Berriche, Mike Travis, Len Brown, linux-efi-u79uwXL29TY76Z2rM5mHXA * Alex Thorlton <athorlton-sJ/iWh9BUns@public.gmane.org> wrote: > On Mon, Dec 14, 2015 at 09:41:58AM +0100, Ingo Molnar wrote: > > * Alex Thorlton <athorlton-sJ/iWh9BUns@public.gmane.org> wrote: > > Ok, this looks good to me and I'll apply it if it looks good to Matt as well. > > Cool! Thanks, Ingo. > > > Btw., can UV1 users fix this via a BIOS update? > > Unfortunately, no. This fix was put into UV2+ BIOS a while back, but we haven't > spun a new UV1 BIOS for several years, and don't intend to release another > version. This issue is likely going to follow UV1s to their grave :( That's ok! We are responsible for past decisions/compromises/mistakes, as long as the systems keep working, there's no problem with that. Thanks, Ingo ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-01-19 10:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-11 20:59 [PATCHv2] Remove EFI memmap quirk for UV Alex Thorlton
2015-12-11 20:59 ` [PATCH] Remove EFI memmap quirk for UV2+ Alex Thorlton
[not found] ` <1449867585-189233-2-git-send-email-athorlton-sJ/iWh9BUns@public.gmane.org>
2015-12-14 8:41 ` Ingo Molnar
[not found] ` <20151214084157.GB28073-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-12-14 15:56 ` Matt Fleming
2015-12-14 18:20 ` Alex Thorlton
[not found] ` <20151214182053.GL164416-7ppMa7wkY9tKToyKb8PD+Zs2JHu2awxn0E9HWUfgJXw@public.gmane.org>
2016-01-19 10:57 ` Ingo Molnar
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).