From: Bjorn Helgaas Date: Sun, 26 Mar 2006 09:37:07 +0000 (-0800) Subject: [PATCH] DMI: only ioremap stuff we actually need X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=27d8e3d15bcf9d7cd99bf6ca910ea9e34328c7fb;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [PATCH] DMI: only ioremap stuff we actually need dmi_scan_machine() tries to ioremap 0x10000 (64K) bytes, even though it only looks at the first 32 bytes or so. If the SMBIOS table is near the end of a memory region, the ioremap() may fail when it shouldn't. This is in the efi_enabled path, so it really only affects ia64 at the moment. Signed-off-by: Bjorn Helgaas Cc: Matt Domsch Cc: "Tolentino, Matthew E" Cc: "Brown, Len" Cc: Andi Kleen Acked-by: "Luck, Tony" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/i386/kernel/dmi_scan.c b/arch/i386/kernel/dmi_scan.c index bfecbd46f22a..c032f9e06bb6 100644 --- a/arch/i386/kernel/dmi_scan.c +++ b/arch/i386/kernel/dmi_scan.c @@ -224,7 +224,7 @@ void __init dmi_scan_machine(void) * needed during early boot. This also means we can * iounmap the space when we're done with it. */ - p = dmi_ioremap((unsigned long)efi.smbios, 0x10000); + p = dmi_ioremap((unsigned long)efi.smbios, 32); if (p == NULL) goto out;