# This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/03/18 22:38:17-05:00 len.brown@intel.com # [ACPI] clean up acpi_disabled use # # include/asm-x86_64/acpi.h # 2004/03/18 22:37:50-05:00 len.brown@intel.com +4 -0 # clean up acpi_disabled use # # include/asm-ia64/acpi.h # 2004/03/18 22:37:50-05:00 len.brown@intel.com +1 -0 # clean up acpi_disabled use # # include/asm-i386/acpi.h # 2004/03/18 22:37:50-05:00 len.brown@intel.com +4 -0 # clean up acpi_disabled use # # include/acpi/acpi_bus.h # 2004/03/18 22:37:50-05:00 len.brown@intel.com +0 -2 # clean up acpi_disabled use # # drivers/char/sonypi.h # 2004/03/18 22:37:50-05:00 len.brown@intel.com +0 -1 # clean up acpi_disabled use # # drivers/acpi/bus.c # 2004/03/18 22:37:50-05:00 len.brown@intel.com +2 -17 # clean up acpi_disabled use # # arch/ia64/kernel/acpi.c # 2004/03/18 22:37:49-05:00 len.brown@intel.com +0 -2 # clean up acpi_disabled use # # arch/i386/kernel/setup.c # 2004/03/18 22:37:49-05:00 len.brown@intel.com +4 -5 # clean up acpi_disabled use # # arch/i386/kernel/dmi_scan.c # 2004/03/18 22:37:49-05:00 len.brown@intel.com +3 -6 # clean up acpi_disabled use # # arch/i386/kernel/acpi/boot.c # 2004/03/18 22:37:49-05:00 len.brown@intel.com +2 -2 # clean up acpi_disabled use # diff -Nru a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c --- a/arch/i386/kernel/acpi/boot.c Thu Mar 18 22:38:24 2004 +++ b/arch/i386/kernel/acpi/boot.c Thu Mar 18 22:38:24 2004 @@ -668,7 +668,7 @@ */ error = acpi_table_init(); if (error) { - acpi_disabled = 1; + disable_acpi(); return error; } @@ -680,7 +680,7 @@ error = acpi_blacklisted(); if (error) { printk(KERN_WARNING PREFIX "BIOS listed in blacklist, disabling ACPI support\n"); - acpi_disabled = 1; + disable_acpi(); return error; } diff -Nru a/arch/i386/kernel/dmi_scan.c b/arch/i386/kernel/dmi_scan.c --- a/arch/i386/kernel/dmi_scan.c Thu Mar 18 22:38:24 2004 +++ b/arch/i386/kernel/dmi_scan.c Thu Mar 18 22:38:24 2004 @@ -529,7 +529,7 @@ { if (!acpi_force) { printk(KERN_NOTICE "%s detected: acpi off\n",d->ident); - acpi_disabled = 1; + disable_acpi(); } else { printk(KERN_NOTICE "Warning: DMI blacklist says broken, but acpi forced\n"); @@ -537,8 +537,6 @@ return 0; } -extern int acpi_ht; - /* * Limit ACPI to CPU enumeration for HT */ @@ -546,7 +544,7 @@ { if (!acpi_force) { printk(KERN_NOTICE "%s detected: force use of acpi=ht\n", d->ident); - acpi_disabled = 1; + disable_acpi(); acpi_ht = 1; } else { printk(KERN_NOTICE @@ -1063,8 +1061,7 @@ if (disable && !acpi_force) { 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; - acpi_ht = 0; + disable_acpi(); } } } diff -Nru a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c --- a/arch/i386/kernel/setup.c Thu Mar 18 22:38:24 2004 +++ b/arch/i386/kernel/setup.c Thu Mar 18 22:38:24 2004 @@ -78,7 +78,6 @@ EXPORT_SYMBOL(acpi_disabled); #ifdef CONFIG_ACPI_BOOT -extern int __initdata acpi_ht; int __initdata acpi_force = 0; #endif @@ -570,14 +569,13 @@ #ifdef CONFIG_ACPI_BOOT /* "acpi=off" disables both ACPI table parsing and interpreter */ else if (!memcmp(from, "acpi=off", 8)) { - acpi_ht = 0; - acpi_disabled = 1; + disable_acpi(); } /* acpi=force to over-ride black-list */ else if (!memcmp(from, "acpi=force", 10)) { acpi_force = 1; - acpi_ht=1; + acpi_ht = 1; acpi_disabled = 0; } @@ -588,8 +586,9 @@ /* Limit ACPI just to boot-time to enable HT */ else if (!memcmp(from, "acpi=ht", 7)) { + if (!acpi_force) + disable_acpi(); acpi_ht = 1; - if (!acpi_force) acpi_disabled = 1; } /* "pci=noacpi" disables ACPI interrupt routing */ diff -Nru a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c --- a/arch/ia64/kernel/acpi.c Thu Mar 18 22:38:24 2004 +++ b/arch/ia64/kernel/acpi.c Thu Mar 18 22:38:24 2004 @@ -62,8 +62,6 @@ unsigned char acpi_kbd_controller_present = 1; unsigned char acpi_legacy_devices; -int acpi_disabled; /* XXX this shouldn't be needed---we can't boot without ACPI! */ - const char * acpi_get_sysname (void) { diff -Nru a/drivers/acpi/bus.c b/drivers/acpi/bus.c --- a/drivers/acpi/bus.c Thu Mar 18 22:38:24 2004 +++ b/drivers/acpi/bus.c Thu Mar 18 22:38:24 2004 @@ -704,29 +704,14 @@ pm_active = 1; else { printk(KERN_INFO PREFIX "APM is already active, exiting\n"); - acpi_disabled = 1; + disable_acpi(); result = -ENODEV; } #endif } else - acpi_disabled = 1; + disable_acpi(); return_VALUE(result); } - -static int __init acpi_setup(char *str) -{ - while (str && *str) { - if (strncmp(str, "off", 3) == 0) - acpi_disabled = 1; - str = strchr(str, ','); - if (str) - str += strspn(str, ", \t"); - } - return 1; -} - subsys_initcall(acpi_init); - -__setup("acpi=", acpi_setup); diff -Nru a/drivers/char/sonypi.h b/drivers/char/sonypi.h --- a/drivers/char/sonypi.h Thu Mar 18 22:38:24 2004 +++ b/drivers/char/sonypi.h Thu Mar 18 22:38:24 2004 @@ -396,7 +396,6 @@ } #ifdef CONFIG_ACPI -extern int acpi_disabled; #define SONYPI_ACPI_ACTIVE (!acpi_disabled) #else #define SONYPI_ACPI_ACTIVE 0 diff -Nru a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h --- a/include/acpi/acpi_bus.h Thu Mar 18 22:38:24 2004 +++ b/include/acpi/acpi_bus.h Thu Mar 18 22:38:24 2004 @@ -32,8 +32,6 @@ #define PREFIX "ACPI: " -extern int acpi_disabled; - /* TBD: Make dynamic */ #define ACPI_MAX_HANDLES 10 struct acpi_handle_list { diff -Nru a/include/asm-i386/acpi.h b/include/asm-i386/acpi.h --- a/include/asm-i386/acpi.h Thu Mar 18 22:38:24 2004 +++ b/include/asm-i386/acpi.h Thu Mar 18 22:38:24 2004 @@ -116,6 +116,9 @@ extern int acpi_ioapic; extern int acpi_noirq; extern int acpi_strict; +extern int acpi_disabled; +extern int __initdata acpi_ht; +static inline void disable_acpi(void) { acpi_disabled = 1; acpi_ht = 0; } /* Fixmap pages to reserve for ACPI boot-time tables (see fixmap.h) */ #define FIX_ACPI_PAGES 4 @@ -143,6 +146,7 @@ #else /* CONFIG_ACPI_BOOT */ # define acpi_lapic 0 # define acpi_ioapic 0 +static inline void disable_acpi(void) { } #endif diff -Nru a/include/asm-ia64/acpi.h b/include/asm-ia64/acpi.h --- a/include/asm-ia64/acpi.h Thu Mar 18 22:38:24 2004 +++ b/include/asm-ia64/acpi.h Thu Mar 18 22:38:24 2004 @@ -88,6 +88,7 @@ #define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) \ ((Acq) = ia64_acpi_release_global_lock((unsigned int *) GLptr)) +#define acpi_disabled 0 /* ACPI always enabled on IA64 */ #define acpi_strict 1 /* no ACPI spec workarounds on IA64 */ const char *acpi_get_sysname (void); diff -Nru a/include/asm-x86_64/acpi.h b/include/asm-x86_64/acpi.h --- a/include/asm-x86_64/acpi.h Thu Mar 18 22:38:24 2004 +++ b/include/asm-x86_64/acpi.h Thu Mar 18 22:38:24 2004 @@ -105,6 +105,9 @@ extern int acpi_ioapic; extern int acpi_noirq; extern int acpi_strict; +extern int acpi_disabled; +extern int acpi_ht; +static inline void disable_acpi(void) { acpi_disabled = 1; acpi_ht = 0; } /* Fixmap pages to reserve for ACPI boot-time tables (see fixmap.h) */ #define FIX_ACPI_PAGES 4 @@ -112,6 +115,7 @@ #else /* !CONFIG_ACPI_BOOT */ #define acpi_lapic 0 #define acpi_ioapic 0 +static inline void disable_acpi(void) { } #endif /* !CONFIG_ACPI_BOOT */ #ifdef CONFIG_ACPI_PCI