mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-02 15:26:39 +07:00
x86/PCI: Fix a potential regression when using dmi_get_bios_year()
dmi_get_bios_year() may return 0 when it cannot parse
the BIOS date string. Previously this has been checked in
pci_acpi_crs_quirks().
Update the code to restore old behaviour.
Reported-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Lukas Wunner <lukas@wunner.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rafael J . Wysocki <rjw@rjwysocki.net>
Cc: linux-acpi@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Fixes: 69c42d493d
("x86/pci: Simplify code by using the new dmi_get_bios_year() helper")
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
3af3452586
commit
47a9973d3e
@ -140,7 +140,9 @@ static const struct dmi_system_id pci_crs_quirks[] __initconst = {
|
||||
|
||||
void __init pci_acpi_crs_quirks(void)
|
||||
{
|
||||
if ((dmi_get_bios_year() < 2008) && (iomem_resource.end <= 0xffffffff))
|
||||
int year = dmi_get_bios_year();
|
||||
|
||||
if (year >= 0 && year < 2008 && iomem_resource.end <= 0xffffffff)
|
||||
pci_use_crs = false;
|
||||
|
||||
dmi_check_system(pci_crs_quirks);
|
||||
|
Loading…
Reference in New Issue
Block a user