Skip to content

Commit d394f2d

Browse files
Alex ThorltonIngo Molnar
authored andcommitted
x86/platform/UV: Remove EFI memmap quirk for UV2+
Commit a5d90c9 ("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 <[email protected]> Reviewed-by: Matt Fleming <[email protected]> Cc: Dimitri Sivanich <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Hedi Berriche <[email protected]> Cc: Len Brown <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Mike Travis <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent b000de5 commit d394f2d

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

arch/x86/kernel/apic/x2apic_uv_x.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,10 @@ void __init uv_system_init(void)
889889
return;
890890
}
891891
pr_info("UV: Found %s hub\n", hub);
892-
map_low_mmrs();
892+
893+
/* We now only need to map the MMRs on UV1 */
894+
if (is_uv1_hub())
895+
map_low_mmrs();
893896

894897
m_n_config.v = uv_read_local_mmr(UVH_RH_GAM_CONFIG_MMR );
895898
m_val = m_n_config.s.m_skt;

arch/x86/platform/efi/quirks.c

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <linux/memblock.h>
99
#include <linux/bootmem.h>
1010
#include <linux/acpi.h>
11+
#include <linux/dmi.h>
1112
#include <asm/efi.h>
1213
#include <asm/uv/uv.h>
1314

@@ -248,6 +249,16 @@ int __init efi_reuse_config(u64 tables, int nr_tables)
248249
return ret;
249250
}
250251

252+
static const struct dmi_system_id sgi_uv1_dmi[] = {
253+
{ NULL, "SGI UV1",
254+
{ DMI_MATCH(DMI_PRODUCT_NAME, "Stoutland Platform"),
255+
DMI_MATCH(DMI_PRODUCT_VERSION, "1.0"),
256+
DMI_MATCH(DMI_BIOS_VENDOR, "SGI.COM"),
257+
}
258+
},
259+
{ } /* NULL entry stops DMI scanning */
260+
};
261+
251262
void __init efi_apply_memmap_quirks(void)
252263
{
253264
/*
@@ -260,10 +271,8 @@ void __init efi_apply_memmap_quirks(void)
260271
efi_unmap_memmap();
261272
}
262273

263-
/*
264-
* UV doesn't support the new EFI pagetable mapping yet.
265-
*/
266-
if (is_uv_system())
274+
/* UV2+ BIOS has a fix for this issue. UV1 still needs the quirk. */
275+
if (dmi_check_system(sgi_uv1_dmi))
267276
set_bit(EFI_OLD_MEMMAP, &efi.flags);
268277
}
269278

0 commit comments

Comments
 (0)