Commit 66f57430 authored by Len Brown's avatar Len Brown Committed by Len Brown

[ACPI] delete ACPI DMI/BIOS cutoff year by default

CONFIG_ACPI_BLACKLIST_YEAR=2001 for old behaviour
parent 7cc3b88a
......@@ -830,9 +830,15 @@ acpi_boot_init (void)
*/
error = acpi_blacklisted();
if (error) {
printk(KERN_WARNING PREFIX "BIOS listed in blacklist, disabling ACPI support\n");
disable_acpi();
return error;
extern int acpi_force;
if (acpi_force) {
printk(KERN_WARNING PREFIX "acpi=force override\n");
} else {
printk(KERN_WARNING PREFIX "Disabling ACPI support\n");
disable_acpi();
return error;
}
}
/*
......
......@@ -443,27 +443,6 @@ static __initdata struct dmi_blacklist dmi_blacklist[]={
{ NULL, }
};
/*
* Walk the blacklist table running matching functions until someone
* returns 1 or we hit the end.
*/
static __init void dmi_check_blacklist(void)
{
#ifdef CONFIG_ACPI_BOOT
if (dmi_ident[DMI_BIOS_DATE]) {
char *s = strrchr(dmi_ident[DMI_BIOS_DATE], '/');
if (s && !acpi_force)
acpi_bios_year(s+1);
}
#endif
dmi_check_system(dmi_blacklist);
}
/*
* Process a DMI table entry. Right now all we care about are the BIOS
......@@ -521,7 +500,7 @@ void __init dmi_scan_machine(void)
{
int err = dmi_iterate(dmi_decode);
if(err == 0)
dmi_check_blacklist();
dmi_check_system(dmi_blacklist);
else
printk(KERN_INFO "DMI not present.\n");
}
......
......@@ -220,6 +220,16 @@ config ACPI_CUSTOM_DSDT_FILE
help
Enter the full path name to the file wich includes the AmlCode declaration.
config ACPI_BLACKLIST_YEAR
int "Disable ACPI for systems before Jan 1st this year"
default 0
help
enter a 4-digit year, eg. 2001 to disable ACPI by default
on platforms with DMI BIOS date before January 1st that year.
"acpi=force" can be used to override this mechanism.
Enter 0 to disable this mechanism and allow ACPI to
run by default no matter what the year. (default)
config ACPI_DEBUG
bool "Debug Statements"
......
......@@ -2,7 +2,9 @@
* blacklist.c
*
* Check to see if the given machine has a known bad ACPI BIOS
* or if the BIOS is too old.
*
* Copyright (C) 2004 Len Brown <len.brown@intel.com>
* Copyright (C) 2002 Andy Grover <andrew.grover@intel.com>
*
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......@@ -30,6 +32,7 @@
#include <linux/init.h>
#include <linux/acpi.h>
#include <acpi/acpi_bus.h>
#include <linux/dmi.h>
enum acpi_blacklist_predicates
{
......@@ -69,27 +72,45 @@ static struct acpi_blacklist_item acpi_blacklist[] __initdata =
{""}
};
#define ACPI_BLACKLIST_CUTOFF_YEAR 2001
/*
* Notice: this is called from dmi_scan.c, which contains second (!) blacklist
*/
void __init
acpi_bios_year(char *s)
#if CONFIG_ACPI_BLACKLIST_YEAR
static int __init
blacklist_by_year(void)
{
int year, disable = 0;
int year;
char *s = dmi_get_system_info(DMI_BIOS_DATE);
if (!s)
return 0;
if (!*s)
return 0;
s = strrchr(s, '/');
if (!s)
return 0;
s += 1;
year = simple_strtoul(s,NULL,0);
if (year >= 1000)
disable = year < ACPI_BLACKLIST_CUTOFF_YEAR;
else if (year < 1 || (year > 90 && year <= 99))
disable = 1;
if (disable) {
printk(KERN_NOTICE "ACPI disabled because your bios is from %s and too old\n", s);
printk(KERN_NOTICE "You can enable it with acpi=force\n");
acpi_disabled = 1;
if (year < 100) { /* 2-digit year */
year += 1900;
if (year < 1996) /* no dates < spec 1.0 */
year += 100;
}
if (year < CONFIG_ACPI_BLACKLIST_YEAR) {
printk(KERN_ERR PREFIX "BIOS age (%d) fails cutoff (%d), "
"acpi=force is required to enable ACPI\n",
year, CONFIG_ACPI_BLACKLIST_YEAR);
return 1;
}
return 0;
}
#else
static inline int blacklist_by_year(void) { return 0; }
#endif
int __init
acpi_blacklisted(void)
......@@ -141,6 +162,8 @@ acpi_blacklisted(void)
}
}
blacklisted += blacklist_by_year();
return blacklisted;
}
......@@ -596,7 +596,10 @@ acpi_early_init (void)
acpi_status status = AE_OK;
struct acpi_buffer buffer = {sizeof(acpi_fadt), &acpi_fadt};
ACPI_FUNCTION_TRACE("acpi_bus_init");
ACPI_FUNCTION_TRACE("acpi_early_init");
if (acpi_disabled)
return;
/* enable workarounds, unless strict ACPI spec. compliance */
if (!acpi_strict)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment