Commit 6a4b170c authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'release' of master.kernel.org:/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6

parents eccdfcd6 64e47488
...@@ -35,4 +35,4 @@ created. Please use command "cat /proc/acpi/hotkey/polling_method" ...@@ -35,4 +35,4 @@ created. Please use command "cat /proc/acpi/hotkey/polling_method"
to retrieve it. to retrieve it.
Note: Use cmdline "acpi_generic_hotkey" to over-ride Note: Use cmdline "acpi_generic_hotkey" to over-ride
loading any platform specific drivers. platform-specific with generic driver.
This diff is collapsed.
...@@ -1212,7 +1212,6 @@ config PCI_DIRECT ...@@ -1212,7 +1212,6 @@ config PCI_DIRECT
config PCI_MMCONFIG config PCI_MMCONFIG
bool bool
depends on PCI && ACPI && (PCI_GOMMCONFIG || PCI_GOANY) depends on PCI && ACPI && (PCI_GOMMCONFIG || PCI_GOANY)
select ACPI_BOOT
default y default y
source "drivers/pci/pcie/Kconfig" source "drivers/pci/pcie/Kconfig"
......
...@@ -131,8 +131,6 @@ CONFIG_SOFTWARE_SUSPEND=y ...@@ -131,8 +131,6 @@ CONFIG_SOFTWARE_SUSPEND=y
# ACPI (Advanced Configuration and Power Interface) Support # ACPI (Advanced Configuration and Power Interface) Support
# #
CONFIG_ACPI=y CONFIG_ACPI=y
CONFIG_ACPI_BOOT=y
CONFIG_ACPI_INTERPRETER=y
CONFIG_ACPI_SLEEP=y CONFIG_ACPI_SLEEP=y
CONFIG_ACPI_SLEEP_PROC_FS=y CONFIG_ACPI_SLEEP_PROC_FS=y
CONFIG_ACPI_AC=y CONFIG_ACPI_AC=y
...@@ -144,10 +142,8 @@ CONFIG_ACPI_THERMAL=y ...@@ -144,10 +142,8 @@ CONFIG_ACPI_THERMAL=y
# CONFIG_ACPI_ASUS is not set # CONFIG_ACPI_ASUS is not set
# CONFIG_ACPI_TOSHIBA is not set # CONFIG_ACPI_TOSHIBA is not set
# CONFIG_ACPI_DEBUG is not set # CONFIG_ACPI_DEBUG is not set
CONFIG_ACPI_BUS=y
CONFIG_ACPI_EC=y CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y CONFIG_ACPI_POWER=y
CONFIG_ACPI_PCI=y
CONFIG_ACPI_SYSTEM=y CONFIG_ACPI_SYSTEM=y
# CONFIG_X86_PM_TIMER is not set # CONFIG_X86_PM_TIMER is not set
......
...@@ -11,7 +11,7 @@ obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \ ...@@ -11,7 +11,7 @@ obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \
obj-y += cpu/ obj-y += cpu/
obj-y += timers/ obj-y += timers/
obj-$(CONFIG_ACPI_BOOT) += acpi/ obj-$(CONFIG_ACPI) += acpi/
obj-$(CONFIG_X86_BIOS_REBOOT) += reboot.o obj-$(CONFIG_X86_BIOS_REBOOT) += reboot.o
obj-$(CONFIG_MCA) += mca.o obj-$(CONFIG_MCA) += mca.o
obj-$(CONFIG_X86_MSR) += msr.o obj-$(CONFIG_X86_MSR) += msr.o
......
obj-$(CONFIG_ACPI_BOOT) := boot.o obj-y := boot.o
obj-$(CONFIG_X86_IO_APIC) += earlyquirk.o obj-$(CONFIG_X86_IO_APIC) += earlyquirk.o
obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o
......
This diff is collapsed.
...@@ -8,44 +8,44 @@ ...@@ -8,44 +8,44 @@
#include <asm/pci-direct.h> #include <asm/pci-direct.h>
#include <asm/acpi.h> #include <asm/acpi.h>
static int __init check_bridge(int vendor, int device) static int __init check_bridge(int vendor, int device)
{ {
/* According to Nvidia all timer overrides are bogus. Just ignore /* According to Nvidia all timer overrides are bogus. Just ignore
them all. */ them all. */
if (vendor == PCI_VENDOR_ID_NVIDIA) { if (vendor == PCI_VENDOR_ID_NVIDIA) {
acpi_skip_timer_override = 1; acpi_skip_timer_override = 1;
} }
return 0; return 0;
} }
void __init check_acpi_pci(void) void __init check_acpi_pci(void)
{ {
int num,slot,func; int num, slot, func;
/* Assume the machine supports type 1. If not it will /* Assume the machine supports type 1. If not it will
always read ffffffff and should not have any side effect. */ always read ffffffff and should not have any side effect. */
/* Poor man's PCI discovery */ /* Poor man's PCI discovery */
for (num = 0; num < 32; num++) { for (num = 0; num < 32; num++) {
for (slot = 0; slot < 32; slot++) { for (slot = 0; slot < 32; slot++) {
for (func = 0; func < 8; func++) { for (func = 0; func < 8; func++) {
u32 class; u32 class;
u32 vendor; u32 vendor;
class = read_pci_config(num,slot,func, class = read_pci_config(num, slot, func,
PCI_CLASS_REVISION); PCI_CLASS_REVISION);
if (class == 0xffffffff) if (class == 0xffffffff)
break; break;
if ((class >> 16) != PCI_CLASS_BRIDGE_PCI) if ((class >> 16) != PCI_CLASS_BRIDGE_PCI)
continue; continue;
vendor = read_pci_config(num, slot, func, vendor = read_pci_config(num, slot, func,
PCI_VENDOR_ID); PCI_VENDOR_ID);
if (check_bridge(vendor&0xffff, vendor >> 16)) if (check_bridge(vendor & 0xffff, vendor >> 16))
return; return;
} }
} }
} }
} }
...@@ -20,12 +20,13 @@ extern void zap_low_mappings(void); ...@@ -20,12 +20,13 @@ extern void zap_low_mappings(void);
extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long)); extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long));
static void init_low_mapping(pgd_t *pgd, int pgd_limit) static void init_low_mapping(pgd_t * pgd, int pgd_limit)
{ {
int pgd_ofs = 0; int pgd_ofs = 0;
while ((pgd_ofs < pgd_limit) && (pgd_ofs + USER_PTRS_PER_PGD < PTRS_PER_PGD)) { while ((pgd_ofs < pgd_limit)
set_pgd(pgd, *(pgd+USER_PTRS_PER_PGD)); && (pgd_ofs + USER_PTRS_PER_PGD < PTRS_PER_PGD)) {
set_pgd(pgd, *(pgd + USER_PTRS_PER_PGD));
pgd_ofs++, pgd++; pgd_ofs++, pgd++;
} }
flush_tlb_all(); flush_tlb_all();
...@@ -37,12 +38,13 @@ static void init_low_mapping(pgd_t *pgd, int pgd_limit) ...@@ -37,12 +38,13 @@ static void init_low_mapping(pgd_t *pgd, int pgd_limit)
* Create an identity mapped page table and copy the wakeup routine to * Create an identity mapped page table and copy the wakeup routine to
* low memory. * low memory.
*/ */
int acpi_save_state_mem (void) int acpi_save_state_mem(void)
{ {
if (!acpi_wakeup_address) if (!acpi_wakeup_address)
return 1; return 1;
init_low_mapping(swapper_pg_dir, USER_PTRS_PER_PGD); init_low_mapping(swapper_pg_dir, USER_PTRS_PER_PGD);
memcpy((void *) acpi_wakeup_address, &wakeup_start, &wakeup_end - &wakeup_start); memcpy((void *)acpi_wakeup_address, &wakeup_start,
&wakeup_end - &wakeup_start);
acpi_copy_wakeup_routine(acpi_wakeup_address); acpi_copy_wakeup_routine(acpi_wakeup_address);
return 0; return 0;
...@@ -51,7 +53,7 @@ int acpi_save_state_mem (void) ...@@ -51,7 +53,7 @@ int acpi_save_state_mem (void)
/* /*
* acpi_restore_state - undo effects of acpi_save_state_mem * acpi_restore_state - undo effects of acpi_save_state_mem
*/ */
void acpi_restore_state_mem (void) void acpi_restore_state_mem(void)
{ {
zap_low_mappings(); zap_low_mappings();
} }
...@@ -67,7 +69,8 @@ void acpi_restore_state_mem (void) ...@@ -67,7 +69,8 @@ void acpi_restore_state_mem (void)
void __init acpi_reserve_bootmem(void) void __init acpi_reserve_bootmem(void)
{ {
if ((&wakeup_end - &wakeup_start) > PAGE_SIZE) { if ((&wakeup_end - &wakeup_start) > PAGE_SIZE) {
printk(KERN_ERR "ACPI: Wakeup code way too big, S3 disabled.\n"); printk(KERN_ERR
"ACPI: Wakeup code way too big, S3 disabled.\n");
return; return;
} }
...@@ -90,10 +93,8 @@ static int __init acpi_sleep_setup(char *str) ...@@ -90,10 +93,8 @@ static int __init acpi_sleep_setup(char *str)
return 1; return 1;
} }
__setup("acpi_sleep=", acpi_sleep_setup); __setup("acpi_sleep=", acpi_sleep_setup);
static __init int reset_videomode_after_s3(struct dmi_system_id *d) static __init int reset_videomode_after_s3(struct dmi_system_id *d)
{ {
acpi_video_flags |= 2; acpi_video_flags |= 2;
...@@ -101,14 +102,14 @@ static __init int reset_videomode_after_s3(struct dmi_system_id *d) ...@@ -101,14 +102,14 @@ static __init int reset_videomode_after_s3(struct dmi_system_id *d)
} }
static __initdata struct dmi_system_id acpisleep_dmi_table[] = { static __initdata struct dmi_system_id acpisleep_dmi_table[] = {
{ /* Reset video mode after returning from ACPI S3 sleep */ { /* Reset video mode after returning from ACPI S3 sleep */
.callback = reset_videomode_after_s3, .callback = reset_videomode_after_s3,
.ident = "Toshiba Satellite 4030cdt", .ident = "Toshiba Satellite 4030cdt",
.matches = { .matches = {
DMI_MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"), DMI_MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"),
}, },
}, },
{ } {}
}; };
static int __init acpisleep_dmi_init(void) static int __init acpisleep_dmi_init(void)
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <linux/cpufreq.h> #include <linux/cpufreq.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/seq_file.h> #include <linux/seq_file.h>
#include <linux/compiler.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/delay.h> #include <asm/delay.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
...@@ -57,6 +58,8 @@ static struct cpufreq_acpi_io *acpi_io_data[NR_CPUS]; ...@@ -57,6 +58,8 @@ static struct cpufreq_acpi_io *acpi_io_data[NR_CPUS];
static struct cpufreq_driver acpi_cpufreq_driver; static struct cpufreq_driver acpi_cpufreq_driver;
static unsigned int acpi_pstate_strict;
static int static int
acpi_processor_write_port( acpi_processor_write_port(
u16 port, u16 port,
...@@ -163,34 +166,44 @@ acpi_processor_set_performance ( ...@@ -163,34 +166,44 @@ acpi_processor_set_performance (
} }
/* /*
* Then we read the 'status_register' and compare the value with the * Assume the write went through when acpi_pstate_strict is not used.
* target state's 'status' to make sure the transition was successful. * As read status_register is an expensive operation and there
* Note that we'll poll for up to 1ms (100 cycles of 10us) before * are no specific error cases where an IO port write will fail.
* giving up.
*/ */
if (acpi_pstate_strict) {
port = data->acpi_data.status_register.address; /* Then we read the 'status_register' and compare the value
bit_width = data->acpi_data.status_register.bit_width; * with the target state's 'status' to make sure the
* transition was successful.
dprintk("Looking for 0x%08x from port 0x%04x\n", * Note that we'll poll for up to 1ms (100 cycles of 10us)
(u32) data->acpi_data.states[state].status, port); * before giving up.
*/
for (i=0; i<100; i++) {
ret = acpi_processor_read_port(port, bit_width, &value); port = data->acpi_data.status_register.address;
if (ret) { bit_width = data->acpi_data.status_register.bit_width;
dprintk("Invalid port width 0x%04x\n", bit_width);
retval = ret; dprintk("Looking for 0x%08x from port 0x%04x\n",
goto migrate_end; (u32) data->acpi_data.states[state].status, port);
for (i=0; i<100; i++) {
ret = acpi_processor_read_port(port, bit_width, &value);
if (ret) {
dprintk("Invalid port width 0x%04x\n", bit_width);
retval = ret;
goto migrate_end;
}
if (value == (u32) data->acpi_data.states[state].status)
break;
udelay(10);
} }
if (value == (u32) data->acpi_data.states[state].status) } else {
break; i = 0;
udelay(10); value = (u32) data->acpi_data.states[state].status;
} }
/* notify cpufreq */ /* notify cpufreq */
cpufreq_notify_transition(&cpufreq_freqs, CPUFREQ_POSTCHANGE); cpufreq_notify_transition(&cpufreq_freqs, CPUFREQ_POSTCHANGE);
if (value != (u32) data->acpi_data.states[state].status) { if (unlikely(value != (u32) data->acpi_data.states[state].status)) {
unsigned int tmp = cpufreq_freqs.new; unsigned int tmp = cpufreq_freqs.new;
cpufreq_freqs.new = cpufreq_freqs.old; cpufreq_freqs.new = cpufreq_freqs.old;
cpufreq_freqs.old = tmp; cpufreq_freqs.old = tmp;
...@@ -537,6 +550,8 @@ acpi_cpufreq_exit (void) ...@@ -537,6 +550,8 @@ acpi_cpufreq_exit (void)
return; return;
} }
module_param(acpi_pstate_strict, uint, 0644);
MODULE_PARM_DESC(acpi_pstate_strict, "value 0 or non-zero. non-zero -> strict ACPI checks are performed during frequency changes.");
late_initcall(acpi_cpufreq_init); late_initcall(acpi_cpufreq_init);
module_exit(acpi_cpufreq_exit); module_exit(acpi_cpufreq_exit);
......
...@@ -2423,7 +2423,7 @@ device_initcall(ioapic_init_sysfs); ...@@ -2423,7 +2423,7 @@ device_initcall(ioapic_init_sysfs);
ACPI-based IOAPIC Configuration ACPI-based IOAPIC Configuration
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
#ifdef CONFIG_ACPI_BOOT #ifdef CONFIG_ACPI
int __init io_apic_get_unique_id (int ioapic, int apic_id) int __init io_apic_get_unique_id (int ioapic, int apic_id)
{ {
...@@ -2577,4 +2577,4 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int a ...@@ -2577,4 +2577,4 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int a
return 0; return 0;
} }
#endif /*CONFIG_ACPI_BOOT*/ #endif /* CONFIG_ACPI */
...@@ -668,8 +668,6 @@ void __init get_smp_config (void) ...@@ -668,8 +668,6 @@ void __init get_smp_config (void)
struct intel_mp_floating *mpf = mpf_found; struct intel_mp_floating *mpf = mpf_found;
/* /*
* ACPI may be used to obtain the entire SMP configuration or just to
* enumerate/configure processors (CONFIG_ACPI_BOOT). Note that
* ACPI supports both logical (e.g. Hyper-Threading) and physical * ACPI supports both logical (e.g. Hyper-Threading) and physical
* processors, where MPS only supports physical. * processors, where MPS only supports physical.
*/ */
...@@ -825,7 +823,7 @@ void __init find_smp_config (void) ...@@ -825,7 +823,7 @@ void __init find_smp_config (void)
ACPI-based MP Configuration ACPI-based MP Configuration
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
#ifdef CONFIG_ACPI_BOOT #ifdef CONFIG_ACPI
void __init mp_register_lapic_address ( void __init mp_register_lapic_address (
u64 address) u64 address)
...@@ -871,7 +869,7 @@ void __init mp_register_lapic ( ...@@ -871,7 +869,7 @@ void __init mp_register_lapic (
MP_processor_info(&processor); MP_processor_info(&processor);
} }
#if defined(CONFIG_X86_IO_APIC) && (defined(CONFIG_ACPI_INTERPRETER) || defined(CONFIG_ACPI_BOOT)) #ifdef CONFIG_X86_IO_APIC
#define MP_ISA_BUS 0 #define MP_ISA_BUS 0
#define MP_MAX_IOAPIC_PIN 127 #define MP_MAX_IOAPIC_PIN 127
...@@ -1086,11 +1084,9 @@ int mp_register_gsi (u32 gsi, int edge_level, int active_high_low) ...@@ -1086,11 +1084,9 @@ int mp_register_gsi (u32 gsi, int edge_level, int active_high_low)
*/ */
static int gsi_to_irq[MAX_GSI_NUM]; static int gsi_to_irq[MAX_GSI_NUM];
#ifdef CONFIG_ACPI_BUS
/* Don't set up the ACPI SCI because it's already set up */ /* Don't set up the ACPI SCI because it's already set up */
if (acpi_fadt.sci_int == gsi) if (acpi_fadt.sci_int == gsi)
return gsi; return gsi;
#endif
ioapic = mp_find_ioapic(gsi); ioapic = mp_find_ioapic(gsi);
if (ioapic < 0) { if (ioapic < 0) {
...@@ -1133,13 +1129,11 @@ int mp_register_gsi (u32 gsi, int edge_level, int active_high_low) ...@@ -1133,13 +1129,11 @@ int mp_register_gsi (u32 gsi, int edge_level, int active_high_low)
if (gsi < MAX_GSI_NUM) { if (gsi < MAX_GSI_NUM) {
if (gsi > 15) if (gsi > 15)
gsi = pci_irq++; gsi = pci_irq++;
#ifdef CONFIG_ACPI_BUS
/* /*
* Don't assign IRQ used by ACPI SCI * Don't assign IRQ used by ACPI SCI
*/ */
if (gsi == acpi_fadt.sci_int) if (gsi == acpi_fadt.sci_int)
gsi = pci_irq++; gsi = pci_irq++;
#endif
gsi_to_irq[irq] = gsi; gsi_to_irq[irq] = gsi;
} else { } else {
printk(KERN_ERR "GSI %u is too high\n", gsi); printk(KERN_ERR "GSI %u is too high\n", gsi);
...@@ -1153,5 +1147,5 @@ int mp_register_gsi (u32 gsi, int edge_level, int active_high_low) ...@@ -1153,5 +1147,5 @@ int mp_register_gsi (u32 gsi, int edge_level, int active_high_low)
return gsi; return gsi;
} }
#endif /*CONFIG_X86_IO_APIC && (CONFIG_ACPI_INTERPRETER || CONFIG_ACPI_BOOT)*/ #endif /* CONFIG_X86_IO_APIC */
#endif /*CONFIG_ACPI_BOOT*/ #endif /* CONFIG_ACPI */
...@@ -87,14 +87,14 @@ EXPORT_SYMBOL(boot_cpu_data); ...@@ -87,14 +87,14 @@ EXPORT_SYMBOL(boot_cpu_data);
unsigned long mmu_cr4_features; unsigned long mmu_cr4_features;
#ifdef CONFIG_ACPI_INTERPRETER #ifdef CONFIG_ACPI
int acpi_disabled = 0; int acpi_disabled = 0;
#else #else
int acpi_disabled = 1; int acpi_disabled = 1;
#endif #endif
EXPORT_SYMBOL(acpi_disabled); EXPORT_SYMBOL(acpi_disabled);
#ifdef CONFIG_ACPI_BOOT #ifdef CONFIG_ACPI
int __initdata acpi_force = 0; int __initdata acpi_force = 0;
extern acpi_interrupt_flags acpi_sci_flags; extern acpi_interrupt_flags acpi_sci_flags;
#endif #endif
...@@ -798,7 +798,7 @@ static void __init parse_cmdline_early (char ** cmdline_p) ...@@ -798,7 +798,7 @@ static void __init parse_cmdline_early (char ** cmdline_p)
} }
#endif #endif
#ifdef CONFIG_ACPI_BOOT #ifdef CONFIG_ACPI
/* "acpi=off" disables both ACPI table parsing and interpreter */ /* "acpi=off" disables both ACPI table parsing and interpreter */
else if (!memcmp(from, "acpi=off", 8)) { else if (!memcmp(from, "acpi=off", 8)) {
disable_acpi(); disable_acpi();
...@@ -854,7 +854,7 @@ static void __init parse_cmdline_early (char ** cmdline_p) ...@@ -854,7 +854,7 @@ static void __init parse_cmdline_early (char ** cmdline_p)
else if (!memcmp(from, "noapic", 6)) else if (!memcmp(from, "noapic", 6))
disable_ioapic_setup(); disable_ioapic_setup();
#endif /* CONFIG_X86_LOCAL_APIC */ #endif /* CONFIG_X86_LOCAL_APIC */
#endif /* CONFIG_ACPI_BOOT */ #endif /* CONFIG_ACPI */
#ifdef CONFIG_X86_LOCAL_APIC #ifdef CONFIG_X86_LOCAL_APIC
/* enable local APIC */ /* enable local APIC */
...@@ -1579,7 +1579,7 @@ void __init setup_arch(char **cmdline_p) ...@@ -1579,7 +1579,7 @@ void __init setup_arch(char **cmdline_p)
if (efi_enabled) if (efi_enabled)
efi_map_memmap(); efi_map_memmap();
#ifdef CONFIG_ACPI_BOOT #ifdef CONFIG_ACPI
/* /*
* Parse the ACPI tables for possible boot-time SMP configuration. * Parse the ACPI tables for possible boot-time SMP configuration.
*/ */
......
...@@ -51,7 +51,7 @@ struct mip_reg *host_reg; ...@@ -51,7 +51,7 @@ struct mip_reg *host_reg;
int mip_port; int mip_port;
unsigned long mip_addr, host_addr; unsigned long mip_addr, host_addr;
#if defined(CONFIG_X86_IO_APIC) && (defined(CONFIG_ACPI_INTERPRETER) || defined(CONFIG_ACPI_BOOT)) #if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI)
/* /*
* GSI override for ES7000 platforms. * GSI override for ES7000 platforms.
...@@ -73,7 +73,7 @@ es7000_rename_gsi(int ioapic, int gsi) ...@@ -73,7 +73,7 @@ es7000_rename_gsi(int ioapic, int gsi)
return gsi; return gsi;
} }
#endif // (CONFIG_X86_IO_APIC) && (CONFIG_ACPI_INTERPRETER || CONFIG_ACPI_BOOT) #endif /* (CONFIG_X86_IO_APIC) && (CONFIG_ACPI) */
void __init void __init
setup_unisys () setup_unisys ()
......
...@@ -5,7 +5,7 @@ obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o ...@@ -5,7 +5,7 @@ obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o
obj-$(CONFIG_PCI_DIRECT) += direct.o obj-$(CONFIG_PCI_DIRECT) += direct.o
pci-y := fixup.o pci-y := fixup.o
pci-$(CONFIG_ACPI_PCI) += acpi.o pci-$(CONFIG_ACPI) += acpi.o
pci-y += legacy.o irq.o pci-y += legacy.o irq.o
pci-$(CONFIG_X86_VISWS) := visws.o fixup.o pci-$(CONFIG_X86_VISWS) := visws.o fixup.o
......
...@@ -1075,7 +1075,7 @@ static void pirq_penalize_isa_irq(int irq, int active) ...@@ -1075,7 +1075,7 @@ static void pirq_penalize_isa_irq(int irq, int active)
void pcibios_penalize_isa_irq(int irq, int active) void pcibios_penalize_isa_irq(int irq, int active)
{ {
#ifdef CONFIG_ACPI_PCI #ifdef CONFIG_ACPI
if (!acpi_noirq) if (!acpi_noirq)
acpi_penalize_isa_irq(irq, active); acpi_penalize_isa_irq(irq, active);
else else
......
...@@ -60,6 +60,7 @@ choice ...@@ -60,6 +60,7 @@ choice
config IA64_GENERIC config IA64_GENERIC
bool "generic" bool "generic"
select ACPI
select NUMA select NUMA
select ACPI_NUMA select ACPI_NUMA
select VIRTUAL_MEM_MAP select VIRTUAL_MEM_MAP
...@@ -340,6 +341,7 @@ config IA64_PALINFO ...@@ -340,6 +341,7 @@ config IA64_PALINFO
config ACPI_DEALLOCATE_IRQ config ACPI_DEALLOCATE_IRQ
bool bool
depends on ACPI
depends on IOSAPIC && EXPERIMENTAL depends on IOSAPIC && EXPERIMENTAL
default y default y
...@@ -351,38 +353,10 @@ endmenu ...@@ -351,38 +353,10 @@ endmenu
menu "Power management and ACPI" menu "Power management and ACPI"
config PM source "kernel/power/Kconfig"
bool "Power Management support"
depends on !IA64_HP_SIM
default y
help
"Power Management" means that parts of your computer are shut
off or put into a power conserving "sleep" mode if they are not
being used. There are two competing standards for doing this: APM
and ACPI. If you want to use either one, say Y here and then also
to the requisite support below.
Power Management is most important for battery powered laptop
computers; if you have a laptop, check out the Linux Laptop home
page on the WWW at <http://www.linux-on-laptops.com/> and the
Battery Powered Linux mini-HOWTO, available from
<http://www.tldp.org/docs.html#howto>.
Note that, even if you say N here, Linux on the x86 architecture
will issue the hlt instruction if nothing is to be done, thereby
sending the processor to sleep and saving power.
config ACPI
bool
depends on !IA64_HP_SIM
default y
if !IA64_HP_SIM
source "drivers/acpi/Kconfig" source "drivers/acpi/Kconfig"
endif
if PM if PM
source "arch/ia64/kernel/cpufreq/Kconfig" source "arch/ia64/kernel/cpufreq/Kconfig"
......
...@@ -107,18 +107,12 @@ CONFIG_ACPI=y ...@@ -107,18 +107,12 @@ CONFIG_ACPI=y
# #
# ACPI (Advanced Configuration and Power Interface) Support # ACPI (Advanced Configuration and Power Interface) Support
# #
CONFIG_ACPI_BOOT=y
CONFIG_ACPI_INTERPRETER=y
CONFIG_ACPI_BUTTON=m CONFIG_ACPI_BUTTON=m
CONFIG_ACPI_VIDEO=m
CONFIG_ACPI_FAN=m CONFIG_ACPI_FAN=m
CONFIG_ACPI_PROCESSOR=m CONFIG_ACPI_PROCESSOR=m
CONFIG_ACPI_THERMAL=m CONFIG_ACPI_THERMAL=m
CONFIG_ACPI_BLACKLIST_YEAR=0
# CONFIG_ACPI_DEBUG is not set # CONFIG_ACPI_DEBUG is not set
CONFIG_ACPI_BUS=y
CONFIG_ACPI_POWER=y CONFIG_ACPI_POWER=y
CONFIG_ACPI_PCI=y
CONFIG_ACPI_SYSTEM=y CONFIG_ACPI_SYSTEM=y
# #
......
...@@ -130,19 +130,12 @@ CONFIG_ACPI=y ...@@ -130,19 +130,12 @@ CONFIG_ACPI=y
# #
# ACPI (Advanced Configuration and Power Interface) Support # ACPI (Advanced Configuration and Power Interface) Support
# #
CONFIG_ACPI_BOOT=y
CONFIG_ACPI_INTERPRETER=y
# CONFIG_ACPI_BUTTON is not set # CONFIG_ACPI_BUTTON is not set
CONFIG_ACPI_VIDEO=m
CONFIG_ACPI_HOTKEY=m
# CONFIG_ACPI_FAN is not set # CONFIG_ACPI_FAN is not set
# CONFIG_ACPI_PROCESSOR is not set # CONFIG_ACPI_PROCESSOR is not set
CONFIG_ACPI_NUMA=y CONFIG_ACPI_NUMA=y
CONFIG_ACPI_BLACKLIST_YEAR=0
# CONFIG_ACPI_DEBUG is not set # CONFIG_ACPI_DEBUG is not set
CONFIG_ACPI_BUS=y
CONFIG_ACPI_POWER=y CONFIG_ACPI_POWER=y
CONFIG_ACPI_PCI=y
CONFIG_ACPI_SYSTEM=y CONFIG_ACPI_SYSTEM=y
# CONFIG_ACPI_CONTAINER is not set # CONFIG_ACPI_CONTAINER is not set
......
...@@ -128,20 +128,13 @@ CONFIG_ACPI=y ...@@ -128,20 +128,13 @@ CONFIG_ACPI=y
# #
# ACPI (Advanced Configuration and Power Interface) Support # ACPI (Advanced Configuration and Power Interface) Support
# #
CONFIG_ACPI_BOOT=y
CONFIG_ACPI_INTERPRETER=y
CONFIG_ACPI_BUTTON=m CONFIG_ACPI_BUTTON=m
# CONFIG_ACPI_VIDEO is not set
# CONFIG_ACPI_HOTKEY is not set
CONFIG_ACPI_FAN=m CONFIG_ACPI_FAN=m
CONFIG_ACPI_PROCESSOR=m CONFIG_ACPI_PROCESSOR=m
# CONFIG_ACPI_HOTPLUG_CPU is not set # CONFIG_ACPI_HOTPLUG_CPU is not set
CONFIG_ACPI_THERMAL=m CONFIG_ACPI_THERMAL=m
CONFIG_ACPI_BLACKLIST_YEAR=0
# CONFIG_ACPI_DEBUG is not set # CONFIG_ACPI_DEBUG is not set
CONFIG_ACPI_BUS=y
CONFIG_ACPI_POWER=y CONFIG_ACPI_POWER=y
CONFIG_ACPI_PCI=y
CONFIG_ACPI_SYSTEM=y CONFIG_ACPI_SYSTEM=y
# CONFIG_ACPI_CONTAINER is not set # CONFIG_ACPI_CONTAINER is not set
......
...@@ -128,19 +128,12 @@ CONFIG_ACPI=y ...@@ -128,19 +128,12 @@ CONFIG_ACPI=y
# #
# ACPI (Advanced Configuration and Power Interface) Support # ACPI (Advanced Configuration and Power Interface) Support
# #
CONFIG_ACPI_BOOT=y
CONFIG_ACPI_INTERPRETER=y
CONFIG_ACPI_BUTTON=y CONFIG_ACPI_BUTTON=y
CONFIG_ACPI_VIDEO=m
CONFIG_ACPI_HOTKEY=m
CONFIG_ACPI_FAN=y CONFIG_ACPI_FAN=y
CONFIG_ACPI_PROCESSOR=y CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_THERMAL=y CONFIG_ACPI_THERMAL=y
CONFIG_ACPI_BLACKLIST_YEAR=0
# CONFIG_ACPI_DEBUG is not set # CONFIG_ACPI_DEBUG is not set
CONFIG_ACPI_BUS=y
CONFIG_ACPI_POWER=y CONFIG_ACPI_POWER=y
CONFIG_ACPI_PCI=y
CONFIG_ACPI_SYSTEM=y CONFIG_ACPI_SYSTEM=y
# CONFIG_ACPI_CONTAINER is not set # CONFIG_ACPI_CONTAINER is not set
......
...@@ -118,20 +118,14 @@ CONFIG_ACPI=y ...@@ -118,20 +118,14 @@ CONFIG_ACPI=y
# #
# ACPI (Advanced Configuration and Power Interface) Support # ACPI (Advanced Configuration and Power Interface) Support
# #
CONFIG_ACPI_BOOT=y
CONFIG_ACPI_INTERPRETER=y
CONFIG_ACPI_BUTTON=m CONFIG_ACPI_BUTTON=m
CONFIG_ACPI_VIDEO=m
CONFIG_ACPI_FAN=m CONFIG_ACPI_FAN=m
CONFIG_ACPI_PROCESSOR=m CONFIG_ACPI_PROCESSOR=m
CONFIG_ACPI_HOTPLUG_CPU=y CONFIG_ACPI_HOTPLUG_CPU=y
CONFIG_ACPI_THERMAL=m CONFIG_ACPI_THERMAL=m
CONFIG_ACPI_NUMA=y CONFIG_ACPI_NUMA=y
CONFIG_ACPI_BLACKLIST_YEAR=0
# CONFIG_ACPI_DEBUG is not set # CONFIG_ACPI_DEBUG is not set
CONFIG_ACPI_BUS=y
CONFIG_ACPI_POWER=y CONFIG_ACPI_POWER=y
CONFIG_ACPI_PCI=y
CONFIG_ACPI_SYSTEM=y CONFIG_ACPI_SYSTEM=y
CONFIG_ACPI_CONTAINER=m CONFIG_ACPI_CONTAINER=m
......
...@@ -17,20 +17,20 @@ ...@@ -17,20 +17,20 @@
#include <asm/acpi-ext.h> #include <asm/acpi-ext.h>
struct acpi_vendor_descriptor { struct acpi_vendor_descriptor {
u8 guid_id; u8 guid_id;
efi_guid_t guid; efi_guid_t guid;
}; };
struct acpi_vendor_info { struct acpi_vendor_info {
struct acpi_vendor_descriptor *descriptor; struct acpi_vendor_descriptor *descriptor;
u8 *data; u8 *data;
u32 length; u32 length;
}; };
acpi_status acpi_status
acpi_vendor_resource_match(struct acpi_resource *resource, void *context) acpi_vendor_resource_match(struct acpi_resource *resource, void *context)
{ {
struct acpi_vendor_info *info = (struct acpi_vendor_info *) context; struct acpi_vendor_info *info = (struct acpi_vendor_info *)context;
struct acpi_resource_vendor *vendor; struct acpi_resource_vendor *vendor;
struct acpi_vendor_descriptor *descriptor; struct acpi_vendor_descriptor *descriptor;
u32 length; u32 length;
...@@ -38,8 +38,8 @@ acpi_vendor_resource_match(struct acpi_resource *resource, void *context) ...@@ -38,8 +38,8 @@ acpi_vendor_resource_match(struct acpi_resource *resource, void *context)
if (resource->id != ACPI_RSTYPE_VENDOR) if (resource->id != ACPI_RSTYPE_VENDOR)
return AE_OK; return AE_OK;
vendor = (struct acpi_resource_vendor *) &resource->data; vendor = (struct acpi_resource_vendor *)&resource->data;
descriptor = (struct acpi_vendor_descriptor *) vendor->reserved; descriptor = (struct acpi_vendor_descriptor *)vendor->reserved;
if (vendor->length <= sizeof(*info->descriptor) || if (vendor->length <= sizeof(*info->descriptor) ||
descriptor->guid_id != info->descriptor->guid_id || descriptor->guid_id != info->descriptor->guid_id ||
efi_guidcmp(descriptor->guid, info->descriptor->guid)) efi_guidcmp(descriptor->guid, info->descriptor->guid))
...@@ -50,21 +50,24 @@ acpi_vendor_resource_match(struct acpi_resource *resource, void *context) ...@@ -50,21 +50,24 @@ acpi_vendor_resource_match(struct acpi_resource *resource, void *context)
if (!info->data) if (!info->data)
return AE_NO_MEMORY; return AE_NO_MEMORY;
memcpy(info->data, vendor->reserved + sizeof(struct acpi_vendor_descriptor), length); memcpy(info->data,
vendor->reserved + sizeof(struct acpi_vendor_descriptor),
length);
info->length = length; info->length = length;
return AE_CTRL_TERMINATE; return AE_CTRL_TERMINATE;
} }
acpi_status acpi_status
acpi_find_vendor_resource(acpi_handle obj, struct acpi_vendor_descriptor *id, acpi_find_vendor_resource(acpi_handle obj, struct acpi_vendor_descriptor * id,
u8 **data, u32 *length) u8 ** data, u32 * length)
{ {
struct acpi_vendor_info info; struct acpi_vendor_info info;
info.descriptor = id; info.descriptor = id;
info.data = NULL; info.data = NULL;
acpi_walk_resources(obj, METHOD_NAME__CRS, acpi_vendor_resource_match, &info); acpi_walk_resources(obj, METHOD_NAME__CRS, acpi_vendor_resource_match,
&info);
if (!info.data) if (!info.data)
return AE_NOT_FOUND; return AE_NOT_FOUND;
...@@ -75,17 +78,19 @@ acpi_find_vendor_resource(acpi_handle obj, struct acpi_vendor_descriptor *id, ...@@ -75,17 +78,19 @@ acpi_find_vendor_resource(acpi_handle obj, struct acpi_vendor_descriptor *id,
struct acpi_vendor_descriptor hp_ccsr_descriptor = { struct acpi_vendor_descriptor hp_ccsr_descriptor = {
.guid_id = 2, .guid_id = 2,
.guid = EFI_GUID(0x69e9adf9, 0x924f, 0xab5f, 0xf6, 0x4a, 0x24, 0xd2, 0x01, 0x37, 0x0e, 0xad) .guid =
EFI_GUID(0x69e9adf9, 0x924f, 0xab5f, 0xf6, 0x4a, 0x24, 0xd2, 0x01,
0x37, 0x0e, 0xad)
}; };
acpi_status acpi_status hp_acpi_csr_space(acpi_handle obj, u64 * csr_base, u64 * csr_length)
hp_acpi_csr_space(acpi_handle obj, u64 *csr_base, u64 *csr_length)
{ {
acpi_status status; acpi_status status;
u8 *data; u8 *data;
u32 length; u32 length;
status = acpi_find_vendor_resource(obj, &hp_ccsr_descriptor, &data, &length); status =
acpi_find_vendor_resource(obj, &hp_ccsr_descriptor, &data, &length);
if (ACPI_FAILURE(status) || length != 16) if (ACPI_FAILURE(status) || length != 16)
return AE_NOT_FOUND; return AE_NOT_FOUND;
......
This diff is collapsed.
...@@ -561,7 +561,7 @@ static inline int vector_is_shared (int vector) ...@@ -561,7 +561,7 @@ static inline int vector_is_shared (int vector)
return (iosapic_intr_info[vector].count > 1); return (iosapic_intr_info[vector].count > 1);
} }
static void static int
register_intr (unsigned int gsi, int vector, unsigned char delivery, register_intr (unsigned int gsi, int vector, unsigned char delivery,
unsigned long polarity, unsigned long trigger) unsigned long polarity, unsigned long trigger)
{ {
...@@ -576,7 +576,7 @@ register_intr (unsigned int gsi, int vector, unsigned char delivery, ...@@ -576,7 +576,7 @@ register_intr (unsigned int gsi, int vector, unsigned char delivery,
index = find_iosapic(gsi); index = find_iosapic(gsi);
if (index < 0) { if (index < 0) {
printk(KERN_WARNING "%s: No IOSAPIC for GSI %u\n", __FUNCTION__, gsi); printk(KERN_WARNING "%s: No IOSAPIC for GSI %u\n", __FUNCTION__, gsi);
return; return -ENODEV;
} }
iosapic_address = iosapic_lists[index].addr; iosapic_address = iosapic_lists[index].addr;
...@@ -587,7 +587,7 @@ register_intr (unsigned int gsi, int vector, unsigned char delivery, ...@@ -587,7 +587,7 @@ register_intr (unsigned int gsi, int vector, unsigned char delivery,
rte = iosapic_alloc_rte(); rte = iosapic_alloc_rte();
if (!rte) { if (!rte) {
printk(KERN_WARNING "%s: cannot allocate memory\n", __FUNCTION__); printk(KERN_WARNING "%s: cannot allocate memory\n", __FUNCTION__);
return; return -ENOMEM;
} }
rte_index = gsi - gsi_base; rte_index = gsi - gsi_base;
...@@ -603,7 +603,7 @@ register_intr (unsigned int gsi, int vector, unsigned char delivery, ...@@ -603,7 +603,7 @@ register_intr (unsigned int gsi, int vector, unsigned char delivery,
struct iosapic_intr_info *info = &iosapic_intr_info[vector]; struct iosapic_intr_info *info = &iosapic_intr_info[vector];
if (info->trigger != trigger || info->polarity != polarity) { if (info->trigger != trigger || info->polarity != polarity) {
printk (KERN_WARNING "%s: cannot override the interrupt\n", __FUNCTION__); printk (KERN_WARNING "%s: cannot override the interrupt\n", __FUNCTION__);
return; return -EINVAL;
} }
} }
...@@ -623,6 +623,7 @@ register_intr (unsigned int gsi, int vector, unsigned char delivery, ...@@ -623,6 +623,7 @@ register_intr (unsigned int gsi, int vector, unsigned char delivery,
__FUNCTION__, vector, idesc->handler->typename, irq_type->typename); __FUNCTION__, vector, idesc->handler->typename, irq_type->typename);
idesc->handler = irq_type; idesc->handler = irq_type;
} }
return 0;
} }
static unsigned int static unsigned int
...@@ -710,7 +711,7 @@ int ...@@ -710,7 +711,7 @@ int
iosapic_register_intr (unsigned int gsi, iosapic_register_intr (unsigned int gsi,
unsigned long polarity, unsigned long trigger) unsigned long polarity, unsigned long trigger)
{ {
int vector, mask = 1; int vector, mask = 1, err;
unsigned int dest; unsigned int dest;
unsigned long flags; unsigned long flags;
struct iosapic_rte_info *rte; struct iosapic_rte_info *rte;
...@@ -737,8 +738,8 @@ iosapic_register_intr (unsigned int gsi, ...@@ -737,8 +738,8 @@ iosapic_register_intr (unsigned int gsi,
vector = assign_irq_vector(AUTO_ASSIGN); vector = assign_irq_vector(AUTO_ASSIGN);
if (vector < 0) { if (vector < 0) {
vector = iosapic_find_sharable_vector(trigger, polarity); vector = iosapic_find_sharable_vector(trigger, polarity);
if (vector < 0) if (vector < 0)
panic("%s: out of interrupt vectors!\n", __FUNCTION__); return -ENOSPC;
} }
spin_lock_irqsave(&irq_descp(vector)->lock, flags); spin_lock_irqsave(&irq_descp(vector)->lock, flags);
...@@ -753,8 +754,13 @@ iosapic_register_intr (unsigned int gsi, ...@@ -753,8 +754,13 @@ iosapic_register_intr (unsigned int gsi,
} }
dest = get_target_cpu(gsi, vector); dest = get_target_cpu(gsi, vector);
register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY, err = register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY,
polarity, trigger); polarity, trigger);
if (err < 0) {
spin_unlock(&iosapic_lock);
spin_unlock_irqrestore(&irq_descp(vector)->lock, flags);
return err;
}
/* /*
* If the vector is shared and already unmasked for * If the vector is shared and already unmasked for
......
...@@ -384,7 +384,7 @@ setup_arch (char **cmdline_p) ...@@ -384,7 +384,7 @@ setup_arch (char **cmdline_p)
if (early_console_setup(*cmdline_p) == 0) if (early_console_setup(*cmdline_p) == 0)
mark_bsp_online(); mark_bsp_online();
#ifdef CONFIG_ACPI_BOOT #ifdef CONFIG_ACPI
/* Initialize the ACPI boot-time table parser */ /* Initialize the ACPI boot-time table parser */
acpi_table_init(); acpi_table_init();
# ifdef CONFIG_ACPI_NUMA # ifdef CONFIG_ACPI_NUMA
...@@ -420,7 +420,7 @@ setup_arch (char **cmdline_p) ...@@ -420,7 +420,7 @@ setup_arch (char **cmdline_p)
cpu_init(); /* initialize the bootstrap CPU */ cpu_init(); /* initialize the bootstrap CPU */
#ifdef CONFIG_ACPI_BOOT #ifdef CONFIG_ACPI
acpi_boot_init(); acpi_boot_init();
#endif #endif
......
...@@ -36,7 +36,7 @@ int arch_register_cpu(int num) ...@@ -36,7 +36,7 @@ int arch_register_cpu(int num)
parent = &sysfs_nodes[cpu_to_node(num)]; parent = &sysfs_nodes[cpu_to_node(num)];
#endif /* CONFIG_NUMA */ #endif /* CONFIG_NUMA */
#ifdef CONFIG_ACPI_BOOT #ifdef CONFIG_ACPI
/* /*
* If CPEI cannot be re-targetted, and this is * If CPEI cannot be re-targetted, and this is
* CPEI target, then dont create the control file * CPEI target, then dont create the control file
......
...@@ -23,7 +23,7 @@ static void force_interrupt(int irq); ...@@ -23,7 +23,7 @@ static void force_interrupt(int irq);
static void register_intr_pda(struct sn_irq_info *sn_irq_info); static void register_intr_pda(struct sn_irq_info *sn_irq_info);
static void unregister_intr_pda(struct sn_irq_info *sn_irq_info); static void unregister_intr_pda(struct sn_irq_info *sn_irq_info);
extern int sn_force_interrupt_flag; int sn_force_interrupt_flag = 1;
extern int sn_ioif_inited; extern int sn_ioif_inited;
static struct list_head **sn_irq_lh; static struct list_head **sn_irq_lh;
static spinlock_t sn_irq_info_lock = SPIN_LOCK_UNLOCKED; /* non-IRQ lock */ static spinlock_t sn_irq_info_lock = SPIN_LOCK_UNLOCKED; /* non-IRQ lock */
......
...@@ -52,7 +52,7 @@ static int licenseID_open(struct inode *inode, struct file *file) ...@@ -52,7 +52,7 @@ static int licenseID_open(struct inode *inode, struct file *file)
* the bridge chip. The hardware will then send an interrupt message if the * the bridge chip. The hardware will then send an interrupt message if the
* interrupt line is active. This mimics a level sensitive interrupt. * interrupt line is active. This mimics a level sensitive interrupt.
*/ */
int sn_force_interrupt_flag = 1; extern int sn_force_interrupt_flag;
static int sn_force_interrupt_show(struct seq_file *s, void *p) static int sn_force_interrupt_show(struct seq_file *s, void *p)
{ {
......
...@@ -152,7 +152,6 @@ config X86_CPUID ...@@ -152,7 +152,6 @@ config X86_CPUID
with major 203 and minors 0 to 31 for /dev/cpu/0/cpuid to with major 203 and minors 0 to 31 for /dev/cpu/0/cpuid to
/dev/cpu/31/cpuid. /dev/cpu/31/cpuid.
# disable it for opteron optimized builds because it pulls in ACPI_BOOT
config X86_HT config X86_HT
bool bool
depends on SMP && !MK8 depends on SMP && !MK8
...@@ -474,7 +473,6 @@ config PCI_DIRECT ...@@ -474,7 +473,6 @@ config PCI_DIRECT
config PCI_MMCONFIG config PCI_MMCONFIG
bool "Support mmconfig PCI config space access" bool "Support mmconfig PCI config space access"
depends on PCI && ACPI depends on PCI && ACPI
select ACPI_BOOT
config UNORDERED_IO config UNORDERED_IO
bool "Unordered IO mapping access" bool "Unordered IO mapping access"
......
...@@ -135,8 +135,6 @@ CONFIG_PM_STD_PARTITION="" ...@@ -135,8 +135,6 @@ CONFIG_PM_STD_PARTITION=""
# ACPI (Advanced Configuration and Power Interface) Support # ACPI (Advanced Configuration and Power Interface) Support
# #
CONFIG_ACPI=y CONFIG_ACPI=y
CONFIG_ACPI_BOOT=y
CONFIG_ACPI_INTERPRETER=y
CONFIG_ACPI_AC=y CONFIG_ACPI_AC=y
CONFIG_ACPI_BATTERY=y CONFIG_ACPI_BATTERY=y
CONFIG_ACPI_BUTTON=y CONFIG_ACPI_BUTTON=y
...@@ -151,10 +149,8 @@ CONFIG_ACPI_NUMA=y ...@@ -151,10 +149,8 @@ CONFIG_ACPI_NUMA=y
CONFIG_ACPI_TOSHIBA=y CONFIG_ACPI_TOSHIBA=y
CONFIG_ACPI_BLACKLIST_YEAR=2001 CONFIG_ACPI_BLACKLIST_YEAR=2001
# CONFIG_ACPI_DEBUG is not set # CONFIG_ACPI_DEBUG is not set
CONFIG_ACPI_BUS=y
CONFIG_ACPI_EC=y CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y CONFIG_ACPI_POWER=y
CONFIG_ACPI_PCI=y
CONFIG_ACPI_SYSTEM=y CONFIG_ACPI_SYSTEM=y
# CONFIG_ACPI_CONTAINER is not set # CONFIG_ACPI_CONTAINER is not set
......
...@@ -12,7 +12,7 @@ obj-y := process.o signal.o entry.o traps.o irq.o \ ...@@ -12,7 +12,7 @@ obj-y := process.o signal.o entry.o traps.o irq.o \
obj-$(CONFIG_X86_MCE) += mce.o obj-$(CONFIG_X86_MCE) += mce.o
obj-$(CONFIG_X86_MCE_INTEL) += mce_intel.o obj-$(CONFIG_X86_MCE_INTEL) += mce_intel.o
obj-$(CONFIG_MTRR) += ../../i386/kernel/cpu/mtrr/ obj-$(CONFIG_MTRR) += ../../i386/kernel/cpu/mtrr/
obj-$(CONFIG_ACPI_BOOT) += acpi/ obj-$(CONFIG_ACPI) += acpi/
obj-$(CONFIG_X86_MSR) += msr.o obj-$(CONFIG_X86_MSR) += msr.o
obj-$(CONFIG_MICROCODE) += microcode.o obj-$(CONFIG_MICROCODE) += microcode.o
obj-$(CONFIG_X86_CPUID) += cpuid.o obj-$(CONFIG_X86_CPUID) += cpuid.o
......
obj-$(CONFIG_ACPI_BOOT) := boot.o obj-y := boot.o
boot-$(CONFIG_ACPI_BOOT) := ../../../i386/kernel/acpi/boot.o boot-y := ../../../i386/kernel/acpi/boot.o
obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o
...@@ -47,7 +47,6 @@ ...@@ -47,7 +47,6 @@
#include <asm/proto.h> #include <asm/proto.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
/* -------------------------------------------------------------------------- /* --------------------------------------------------------------------------
Low-Level Sleep Support Low-Level Sleep Support
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
...@@ -77,11 +76,12 @@ static void init_low_mapping(void) ...@@ -77,11 +76,12 @@ static void init_low_mapping(void)
* Create an identity mapped page table and copy the wakeup routine to * Create an identity mapped page table and copy the wakeup routine to
* low memory. * low memory.
*/ */
int acpi_save_state_mem (void) int acpi_save_state_mem(void)
{ {
init_low_mapping(); init_low_mapping();
memcpy((void *) acpi_wakeup_address, &wakeup_start, &wakeup_end - &wakeup_start); memcpy((void *)acpi_wakeup_address, &wakeup_start,
&wakeup_end - &wakeup_start);
acpi_copy_wakeup_routine(acpi_wakeup_address); acpi_copy_wakeup_routine(acpi_wakeup_address);
return 0; return 0;
...@@ -90,7 +90,7 @@ int acpi_save_state_mem (void) ...@@ -90,7 +90,7 @@ int acpi_save_state_mem (void)
/* /*
* acpi_restore_state * acpi_restore_state
*/ */
void acpi_restore_state_mem (void) void acpi_restore_state_mem(void)
{ {
set_pgd(pgd_offset(current->mm, 0UL), low_ptr); set_pgd(pgd_offset(current->mm, 0UL), low_ptr);
flush_tlb_all(); flush_tlb_all();
...@@ -108,7 +108,8 @@ void __init acpi_reserve_bootmem(void) ...@@ -108,7 +108,8 @@ void __init acpi_reserve_bootmem(void)
{ {
acpi_wakeup_address = (unsigned long)alloc_bootmem_low(PAGE_SIZE); acpi_wakeup_address = (unsigned long)alloc_bootmem_low(PAGE_SIZE);
if ((&wakeup_end - &wakeup_start) > PAGE_SIZE) if ((&wakeup_end - &wakeup_start) > PAGE_SIZE)
printk(KERN_CRIT "ACPI: Wakeup code way too big, will crash on attempt to suspend\n"); printk(KERN_CRIT
"ACPI: Wakeup code way too big, will crash on attempt to suspend\n");
} }
static int __init acpi_sleep_setup(char *str) static int __init acpi_sleep_setup(char *str)
...@@ -127,6 +128,8 @@ static int __init acpi_sleep_setup(char *str) ...@@ -127,6 +128,8 @@ static int __init acpi_sleep_setup(char *str)
__setup("acpi_sleep=", acpi_sleep_setup); __setup("acpi_sleep=", acpi_sleep_setup);
#endif /*CONFIG_ACPI_SLEEP*/ #endif /*CONFIG_ACPI_SLEEP */
void acpi_pci_link_exit(void) {} void acpi_pci_link_exit(void)
{
}
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include <asm/smp.h> #include <asm/smp.h>
#include <asm/ipi.h> #include <asm/ipi.h>
#if defined(CONFIG_ACPI_BUS) #if defined(CONFIG_ACPI)
#include <acpi/acpi_bus.h> #include <acpi/acpi_bus.h>
#endif #endif
...@@ -47,7 +47,7 @@ void __init clustered_apic_check(void) ...@@ -47,7 +47,7 @@ void __init clustered_apic_check(void)
u8 cluster_cnt[NUM_APIC_CLUSTERS]; u8 cluster_cnt[NUM_APIC_CLUSTERS];
int num_cpus = 0; int num_cpus = 0;
#if defined(CONFIG_ACPI_BUS) #if defined(CONFIG_ACPI)
/* /*
* Some x86_64 machines use physical APIC mode regardless of how many * Some x86_64 machines use physical APIC mode regardless of how many
* procs/clusters are present (x86_64 ES7000 is an example). * procs/clusters are present (x86_64 ES7000 is an example).
......
...@@ -1864,7 +1864,7 @@ device_initcall(ioapic_init_sysfs); ...@@ -1864,7 +1864,7 @@ device_initcall(ioapic_init_sysfs);
ACPI-based IOAPIC Configuration ACPI-based IOAPIC Configuration
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
#ifdef CONFIG_ACPI_BOOT #ifdef CONFIG_ACPI
#define IO_APIC_MAX_ID 0xFE #define IO_APIC_MAX_ID 0xFE
...@@ -1947,7 +1947,7 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int a ...@@ -1947,7 +1947,7 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int a
return 0; return 0;
} }
#endif /*CONFIG_ACPI_BOOT*/ #endif /* CONFIG_ACPI */
/* /*
......
...@@ -74,7 +74,7 @@ static unsigned int num_processors = 0; ...@@ -74,7 +74,7 @@ static unsigned int num_processors = 0;
physid_mask_t phys_cpu_present_map = PHYSID_MASK_NONE; physid_mask_t phys_cpu_present_map = PHYSID_MASK_NONE;
/* ACPI MADT entry parsing functions */ /* ACPI MADT entry parsing functions */
#ifdef CONFIG_ACPI_BOOT #ifdef CONFIG_ACPI
extern struct acpi_boot_flags acpi_boot; extern struct acpi_boot_flags acpi_boot;
#ifdef CONFIG_X86_LOCAL_APIC #ifdef CONFIG_X86_LOCAL_APIC
extern int acpi_parse_lapic (acpi_table_entry_header *header); extern int acpi_parse_lapic (acpi_table_entry_header *header);
...@@ -84,7 +84,7 @@ extern int acpi_parse_lapic_nmi (acpi_table_entry_header *header); ...@@ -84,7 +84,7 @@ extern int acpi_parse_lapic_nmi (acpi_table_entry_header *header);
#ifdef CONFIG_X86_IO_APIC #ifdef CONFIG_X86_IO_APIC
extern int acpi_parse_ioapic (acpi_table_entry_header *header); extern int acpi_parse_ioapic (acpi_table_entry_header *header);
#endif /*CONFIG_X86_IO_APIC*/ #endif /*CONFIG_X86_IO_APIC*/
#endif /*CONFIG_ACPI_BOOT*/ #endif /*CONFIG_ACPI*/
u8 bios_cpu_apicid[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID }; u8 bios_cpu_apicid[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID };
...@@ -519,8 +519,6 @@ void __init get_smp_config (void) ...@@ -519,8 +519,6 @@ void __init get_smp_config (void)
struct intel_mp_floating *mpf = mpf_found; struct intel_mp_floating *mpf = mpf_found;
/* /*
* ACPI may be used to obtain the entire SMP configuration or just to
* enumerate/configure processors (CONFIG_ACPI_BOOT). Note that
* ACPI supports both logical (e.g. Hyper-Threading) and physical * ACPI supports both logical (e.g. Hyper-Threading) and physical
* processors, where MPS only supports physical. * processors, where MPS only supports physical.
*/ */
...@@ -673,7 +671,7 @@ void __init find_smp_config (void) ...@@ -673,7 +671,7 @@ void __init find_smp_config (void)
ACPI-based MP Configuration ACPI-based MP Configuration
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
#ifdef CONFIG_ACPI_BOOT #ifdef CONFIG_ACPI
void __init mp_register_lapic_address ( void __init mp_register_lapic_address (
u64 address) u64 address)
...@@ -929,11 +927,9 @@ int mp_register_gsi(u32 gsi, int edge_level, int active_high_low) ...@@ -929,11 +927,9 @@ int mp_register_gsi(u32 gsi, int edge_level, int active_high_low)
if (acpi_irq_model != ACPI_IRQ_MODEL_IOAPIC) if (acpi_irq_model != ACPI_IRQ_MODEL_IOAPIC)
return gsi; return gsi;
#ifdef CONFIG_ACPI_BUS
/* Don't set up the ACPI SCI because it's already set up */ /* Don't set up the ACPI SCI because it's already set up */
if (acpi_fadt.sci_int == gsi) if (acpi_fadt.sci_int == gsi)
return gsi; return gsi;
#endif
ioapic = mp_find_ioapic(gsi); ioapic = mp_find_ioapic(gsi);
if (ioapic < 0) { if (ioapic < 0) {
...@@ -973,13 +969,11 @@ int mp_register_gsi(u32 gsi, int edge_level, int active_high_low) ...@@ -973,13 +969,11 @@ int mp_register_gsi(u32 gsi, int edge_level, int active_high_low)
if (gsi < MAX_GSI_NUM) { if (gsi < MAX_GSI_NUM) {
if (gsi > 15) if (gsi > 15)
gsi = pci_irq++; gsi = pci_irq++;
#ifdef CONFIG_ACPI_BUS
/* /*
* Don't assign IRQ used by ACPI SCI * Don't assign IRQ used by ACPI SCI
*/ */
if (gsi == acpi_fadt.sci_int) if (gsi == acpi_fadt.sci_int)
gsi = pci_irq++; gsi = pci_irq++;
#endif
gsi_to_irq[irq] = gsi; gsi_to_irq[irq] = gsi;
} else { } else {
printk(KERN_ERR "GSI %u is too high\n", gsi); printk(KERN_ERR "GSI %u is too high\n", gsi);
...@@ -994,4 +988,4 @@ int mp_register_gsi(u32 gsi, int edge_level, int active_high_low) ...@@ -994,4 +988,4 @@ int mp_register_gsi(u32 gsi, int edge_level, int active_high_low)
} }
#endif /*CONFIG_X86_IO_APIC*/ #endif /*CONFIG_X86_IO_APIC*/
#endif /*CONFIG_ACPI_BOOT*/ #endif /*CONFIG_ACPI*/
...@@ -71,7 +71,7 @@ unsigned long mmu_cr4_features; ...@@ -71,7 +71,7 @@ unsigned long mmu_cr4_features;
int acpi_disabled; int acpi_disabled;
EXPORT_SYMBOL(acpi_disabled); EXPORT_SYMBOL(acpi_disabled);
#ifdef CONFIG_ACPI_BOOT #ifdef CONFIG_ACPI
extern int __initdata acpi_ht; extern int __initdata acpi_ht;
extern acpi_interrupt_flags acpi_sci_flags; extern acpi_interrupt_flags acpi_sci_flags;
int __initdata acpi_force = 0; int __initdata acpi_force = 0;
...@@ -294,7 +294,7 @@ static __init void parse_cmdline_early (char ** cmdline_p) ...@@ -294,7 +294,7 @@ static __init void parse_cmdline_early (char ** cmdline_p)
maxcpus = simple_strtoul(from + 8, NULL, 0); maxcpus = simple_strtoul(from + 8, NULL, 0);
} }
#endif #endif
#ifdef CONFIG_ACPI_BOOT #ifdef CONFIG_ACPI
/* "acpi=off" disables both ACPI table parsing and interpreter init */ /* "acpi=off" disables both ACPI table parsing and interpreter init */
if (!memcmp(from, "acpi=off", 8)) if (!memcmp(from, "acpi=off", 8))
disable_acpi(); disable_acpi();
...@@ -566,7 +566,7 @@ void __init setup_arch(char **cmdline_p) ...@@ -566,7 +566,7 @@ void __init setup_arch(char **cmdline_p)
init_memory_mapping(0, (end_pfn_map << PAGE_SHIFT)); init_memory_mapping(0, (end_pfn_map << PAGE_SHIFT));
#ifdef CONFIG_ACPI_BOOT #ifdef CONFIG_ACPI
/* /*
* Initialize the ACPI boot-time table parser (gets the RSDP and SDT). * Initialize the ACPI boot-time table parser (gets the RSDP and SDT).
* Call this early for SRAT node setup. * Call this early for SRAT node setup.
...@@ -658,7 +658,7 @@ void __init setup_arch(char **cmdline_p) ...@@ -658,7 +658,7 @@ void __init setup_arch(char **cmdline_p)
check_ioapic(); check_ioapic();
#ifdef CONFIG_ACPI_BOOT #ifdef CONFIG_ACPI
/* /*
* Read APIC and some other early information from ACPI tables. * Read APIC and some other early information from ACPI tables.
*/ */
......
...@@ -8,7 +8,7 @@ CFLAGS += -Iarch/i386/pci ...@@ -8,7 +8,7 @@ CFLAGS += -Iarch/i386/pci
obj-y := i386.o obj-y := i386.o
obj-$(CONFIG_PCI_DIRECT)+= direct.o obj-$(CONFIG_PCI_DIRECT)+= direct.o
obj-y += fixup.o obj-y += fixup.o
obj-$(CONFIG_ACPI_PCI) += acpi.o obj-$(CONFIG_ACPI) += acpi.o
obj-y += legacy.o irq.o common.o obj-y += legacy.o irq.o common.o
# mmconfig has a 64bit special # mmconfig has a 64bit special
obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o
......
...@@ -8,7 +8,7 @@ CFLAGS += -I arch/i386/pci ...@@ -8,7 +8,7 @@ CFLAGS += -I arch/i386/pci
obj-y := i386.o obj-y := i386.o
obj-$(CONFIG_PCI_DIRECT)+= direct.o obj-$(CONFIG_PCI_DIRECT)+= direct.o
obj-y += fixup.o obj-y += fixup.o
obj-$(CONFIG_ACPI_PCI) += acpi.o obj-$(CONFIG_ACPI) += acpi.o
obj-y += legacy.o irq.o common.o obj-y += legacy.o irq.o common.o
# mmconfig has a 64bit special # mmconfig has a 64bit special
obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
obj-$(CONFIG_PCI) += pci/ obj-$(CONFIG_PCI) += pci/
obj-$(CONFIG_PARISC) += parisc/ obj-$(CONFIG_PARISC) += parisc/
obj-y += video/ obj-y += video/
obj-$(CONFIG_ACPI_BOOT) += acpi/ obj-$(CONFIG_ACPI) += acpi/
# PnP must come after ACPI since it will eventually need to check if acpi # PnP must come after ACPI since it will eventually need to check if acpi
# was used and do nothing if so # was used and do nothing if so
obj-$(CONFIG_PNP) += pnp/ obj-$(CONFIG_PNP) += pnp/
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
# #
menu "ACPI (Advanced Configuration and Power Interface) Support" menu "ACPI (Advanced Configuration and Power Interface) Support"
depends on PM
depends on !X86_VISWS depends on !X86_VISWS
depends on !IA64_HP_SIM depends on !IA64_HP_SIM
depends on IA64 || X86 depends on IA64 || X86
...@@ -11,6 +10,8 @@ menu "ACPI (Advanced Configuration and Power Interface) Support" ...@@ -11,6 +10,8 @@ menu "ACPI (Advanced Configuration and Power Interface) Support"
config ACPI config ACPI
bool "ACPI Support" bool "ACPI Support"
depends on IA64 || X86 depends on IA64 || X86
select PM
select PCI
default y default y
---help--- ---help---
...@@ -43,20 +44,10 @@ config ACPI ...@@ -43,20 +44,10 @@ config ACPI
if ACPI if ACPI
config ACPI_BOOT
bool
default y
config ACPI_INTERPRETER
bool
default y
if ACPI_INTERPRETER
config ACPI_SLEEP config ACPI_SLEEP
bool "Sleep States (EXPERIMENTAL)" bool "Sleep States"
depends on X86 && (!SMP || SUSPEND_SMP) depends on X86 && (!SMP || SUSPEND_SMP)
depends on EXPERIMENTAL && PM depends on PM
default y default y
---help--- ---help---
This option adds support for ACPI suspend states. This option adds support for ACPI suspend states.
...@@ -90,16 +81,16 @@ config ACPI_SLEEP_PROC_SLEEP ...@@ -90,16 +81,16 @@ config ACPI_SLEEP_PROC_SLEEP
config ACPI_AC config ACPI_AC
tristate "AC Adapter" tristate "AC Adapter"
depends on X86 depends on X86
default m default y
help help
This driver adds support for the AC Adapter object, which indicates This driver adds support for the AC Adapter object, which indicates
whether a system is on AC, or not. Typically, only mobile systems whether a system is on AC, or not. If you have a system that can
have this object, since desktops are always on AC. switch between A/C and battery, say Y.
config ACPI_BATTERY config ACPI_BATTERY
tristate "Battery" tristate "Battery"
depends on X86 depends on X86
default m default y
help help
This driver adds support for battery information through This driver adds support for battery information through
/proc/acpi/battery. If you have a mobile system with a battery, /proc/acpi/battery. If you have a mobile system with a battery,
...@@ -107,18 +98,17 @@ config ACPI_BATTERY ...@@ -107,18 +98,17 @@ config ACPI_BATTERY
config ACPI_BUTTON config ACPI_BUTTON
tristate "Button" tristate "Button"
default m default y
help help
This driver registers for events based on buttons, such as the This driver handles events on the power, sleep and lid buttons.
power, sleep, and lid switch. In the future, a daemon will read A daemon reads /proc/acpi/event and perform user-defined actions
/proc/acpi/event and perform user-defined actions such as shutting such as shutting down the system. This is necessary for
down the system. Until then, you can cat it, and see output when software controlled poweroff.
a button is pressed.
config ACPI_VIDEO config ACPI_VIDEO
tristate "Video" tristate "Video"
depends on EXPERIMENTAL depends on X86
default m default y
help help
This driver implement the ACPI Extensions For Display Adapters This driver implement the ACPI Extensions For Display Adapters
for integrated graphics devices on motherboard, as specified in for integrated graphics devices on motherboard, as specified in
...@@ -129,10 +119,9 @@ config ACPI_VIDEO ...@@ -129,10 +119,9 @@ config ACPI_VIDEO
for your integrated video device. for your integrated video device.
config ACPI_HOTKEY config ACPI_HOTKEY
tristate "Generic Hotkey" tristate "Generic Hotkey (EXPERIMENTAL)"
depends on ACPI_INTERPRETER
depends on EXPERIMENTAL depends on EXPERIMENTAL
depends on !IA64_SGI_SN depends on X86
default n default n
help help
Experimental consolidated hotkey driver. Experimental consolidated hotkey driver.
...@@ -140,31 +129,30 @@ config ACPI_HOTKEY ...@@ -140,31 +129,30 @@ config ACPI_HOTKEY
config ACPI_FAN config ACPI_FAN
tristate "Fan" tristate "Fan"
default m default y
help help
This driver adds support for ACPI fan devices, allowing user-mode This driver adds support for ACPI fan devices, allowing user-mode
applications to perform basic fan control (on, off, status). applications to perform basic fan control (on, off, status).
config ACPI_PROCESSOR config ACPI_PROCESSOR
tristate "Processor" tristate "Processor"
default m default y
help help
This driver installs ACPI as the idle handler for Linux, and uses This driver installs ACPI as the idle handler for Linux, and uses
ACPI C2 and C3 processor states to save power, on systems that ACPI C2 and C3 processor states to save power, on systems that
support it. support it. It is required by several flavors of cpufreq
Performance-state drivers.
config ACPI_HOTPLUG_CPU config ACPI_HOTPLUG_CPU
bool "Processor Hotplug (EXPERIMENTAL)" bool
depends on ACPI_PROCESSOR && HOTPLUG_CPU && EXPERIMENTAL depends on ACPI_PROCESSOR && HOTPLUG_CPU
select ACPI_CONTAINER select ACPI_CONTAINER
default n default y
---help---
Select this option if your platform support physical CPU hotplug.
config ACPI_THERMAL config ACPI_THERMAL
tristate "Thermal Zone" tristate "Thermal Zone"
depends on ACPI_PROCESSOR depends on ACPI_PROCESSOR
default m default y
help help
This driver adds support for ACPI thermal zones. Most mobile and This driver adds support for ACPI thermal zones. Most mobile and
some desktop systems support ACPI thermal zones. It is HIGHLY some desktop systems support ACPI thermal zones. It is HIGHLY
...@@ -180,7 +168,7 @@ config ACPI_NUMA ...@@ -180,7 +168,7 @@ config ACPI_NUMA
config ACPI_ASUS config ACPI_ASUS
tristate "ASUS/Medion Laptop Extras" tristate "ASUS/Medion Laptop Extras"
depends on X86 depends on X86
default m default y
---help--- ---help---
This driver provides support for extra features of ACPI-compatible This driver provides support for extra features of ACPI-compatible
ASUS laptops. As some of Medion laptops are made by ASUS, it may also ASUS laptops. As some of Medion laptops are made by ASUS, it may also
...@@ -209,7 +197,7 @@ config ACPI_ASUS ...@@ -209,7 +197,7 @@ config ACPI_ASUS
config ACPI_IBM config ACPI_IBM
tristate "IBM ThinkPad Laptop Extras" tristate "IBM ThinkPad Laptop Extras"
depends on X86 depends on X86
default m default y
---help--- ---help---
This is a Linux ACPI driver for the IBM ThinkPad laptops. It adds This is a Linux ACPI driver for the IBM ThinkPad laptops. It adds
support for Fn-Fx key combinations, Bluetooth control, video support for Fn-Fx key combinations, Bluetooth control, video
...@@ -222,7 +210,7 @@ config ACPI_IBM ...@@ -222,7 +210,7 @@ config ACPI_IBM
config ACPI_TOSHIBA config ACPI_TOSHIBA
tristate "Toshiba Laptop Extras" tristate "Toshiba Laptop Extras"
depends on X86 depends on X86
default m default y
---help--- ---help---
This driver adds support for access to certain system settings This driver adds support for access to certain system settings
on "legacy free" Toshiba laptops. These laptops can be recognized by on "legacy free" Toshiba laptops. These laptops can be recognized by
...@@ -263,7 +251,7 @@ config ACPI_CUSTOM_DSDT_FILE ...@@ -263,7 +251,7 @@ config ACPI_CUSTOM_DSDT_FILE
config ACPI_BLACKLIST_YEAR config ACPI_BLACKLIST_YEAR
int "Disable ACPI for systems before Jan 1st this year" int "Disable ACPI for systems before Jan 1st this year"
depends on ACPI_INTERPRETER depends on X86
default 0 default 0
help help
enter a 4-digit year, eg. 2001 to disable ACPI by default enter a 4-digit year, eg. 2001 to disable ACPI by default
...@@ -281,10 +269,6 @@ config ACPI_DEBUG ...@@ -281,10 +269,6 @@ config ACPI_DEBUG
of verbosity. Saying Y enables these statements. This will increase of verbosity. Saying Y enables these statements. This will increase
your kernel size by around 50K. your kernel size by around 50K.
config ACPI_BUS
bool
default y
config ACPI_EC config ACPI_EC
bool bool
depends on X86 depends on X86
...@@ -298,10 +282,6 @@ config ACPI_POWER ...@@ -298,10 +282,6 @@ config ACPI_POWER
bool bool
default y default y
config ACPI_PCI
bool
default PCI
config ACPI_SYSTEM config ACPI_SYSTEM
bool bool
default y default y
...@@ -309,14 +289,11 @@ config ACPI_SYSTEM ...@@ -309,14 +289,11 @@ config ACPI_SYSTEM
This driver will enable your system to shut down using ACPI, and This driver will enable your system to shut down using ACPI, and
dump your ACPI DSDT table using /proc/acpi/dsdt. dump your ACPI DSDT table using /proc/acpi/dsdt.
endif # ACPI_INTERPRETER
config X86_PM_TIMER config X86_PM_TIMER
bool "Power Management Timer Support" bool "Power Management Timer Support"
depends on X86 depends on X86
depends on ACPI_BOOT && EXPERIMENTAL
depends on !X86_64 depends on !X86_64
default n default y
help help
The Power Management Timer is available on all ACPI-capable, The Power Management Timer is available on all ACPI-capable,
in most cases even if ACPI is unusable or blacklisted. in most cases even if ACPI is unusable or blacklisted.
......
...@@ -15,13 +15,13 @@ EXTRA_CFLAGS += $(ACPI_CFLAGS) ...@@ -15,13 +15,13 @@ EXTRA_CFLAGS += $(ACPI_CFLAGS)
# #
# ACPI Boot-Time Table Parsing # ACPI Boot-Time Table Parsing
# #
obj-$(CONFIG_ACPI_BOOT) += tables.o obj-y += tables.o
obj-$(CONFIG_ACPI_INTERPRETER) += blacklist.o obj-y += blacklist.o
# #
# ACPI Core Subsystem (Interpreter) # ACPI Core Subsystem (Interpreter)
# #
obj-$(CONFIG_ACPI_INTERPRETER) += osl.o utils.o \ obj-y += osl.o utils.o \
dispatcher/ events/ executer/ hardware/ \ dispatcher/ events/ executer/ hardware/ \
namespace/ parser/ resources/ tables/ \ namespace/ parser/ resources/ tables/ \
utilities/ utilities/
...@@ -35,8 +35,8 @@ ifdef CONFIG_CPU_FREQ ...@@ -35,8 +35,8 @@ ifdef CONFIG_CPU_FREQ
processor-objs += processor_perflib.o processor-objs += processor_perflib.o
endif endif
obj-$(CONFIG_ACPI_BUS) += sleep/ obj-y += sleep/
obj-$(CONFIG_ACPI_BUS) += bus.o glue.o obj-y += bus.o glue.o
obj-$(CONFIG_ACPI_AC) += ac.o obj-$(CONFIG_ACPI_AC) += ac.o
obj-$(CONFIG_ACPI_BATTERY) += battery.o obj-$(CONFIG_ACPI_BATTERY) += battery.o
obj-$(CONFIG_ACPI_BUTTON) += button.o obj-$(CONFIG_ACPI_BUTTON) += button.o
...@@ -44,7 +44,7 @@ obj-$(CONFIG_ACPI_EC) += ec.o ...@@ -44,7 +44,7 @@ obj-$(CONFIG_ACPI_EC) += ec.o
obj-$(CONFIG_ACPI_FAN) += fan.o obj-$(CONFIG_ACPI_FAN) += fan.o
obj-$(CONFIG_ACPI_VIDEO) += video.o obj-$(CONFIG_ACPI_VIDEO) += video.o
obj-$(CONFIG_ACPI_HOTKEY) += hotkey.o obj-$(CONFIG_ACPI_HOTKEY) += hotkey.o
obj-$(CONFIG_ACPI_PCI) += pci_root.o pci_link.o pci_irq.o pci_bind.o obj-y += pci_root.o pci_link.o pci_irq.o pci_bind.o
obj-$(CONFIG_ACPI_POWER) += power.o obj-$(CONFIG_ACPI_POWER) += power.o
obj-$(CONFIG_ACPI_PROCESSOR) += processor.o obj-$(CONFIG_ACPI_PROCESSOR) += processor.o
obj-$(CONFIG_ACPI_CONTAINER) += container.o obj-$(CONFIG_ACPI_CONTAINER) += container.o
...@@ -55,5 +55,5 @@ obj-$(CONFIG_ACPI_NUMA) += numa.o ...@@ -55,5 +55,5 @@ obj-$(CONFIG_ACPI_NUMA) += numa.o
obj-$(CONFIG_ACPI_ASUS) += asus_acpi.o obj-$(CONFIG_ACPI_ASUS) += asus_acpi.o
obj-$(CONFIG_ACPI_IBM) += ibm_acpi.o obj-$(CONFIG_ACPI_IBM) += ibm_acpi.o
obj-$(CONFIG_ACPI_TOSHIBA) += toshiba_acpi.o obj-$(CONFIG_ACPI_TOSHIBA) += toshiba_acpi.o
obj-$(CONFIG_ACPI_BUS) += scan.o motherboard.o obj-y += scan.o motherboard.o
obj-$(CONFIG_ACPI_HOTPLUG_MEMORY) += acpi_memhotplug.o obj-$(CONFIG_ACPI_HOTPLUG_MEMORY) += acpi_memhotplug.o
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include <acpi/acpi_bus.h> #include <acpi/acpi_bus.h>
#include <acpi/acpi_drivers.h> #include <acpi/acpi_drivers.h>
#define ACPI_AC_COMPONENT 0x00020000 #define ACPI_AC_COMPONENT 0x00020000
#define ACPI_AC_CLASS "ac_adapter" #define ACPI_AC_CLASS "ac_adapter"
#define ACPI_AC_HID "ACPI0003" #define ACPI_AC_HID "ACPI0003"
...@@ -45,47 +44,45 @@ ...@@ -45,47 +44,45 @@
#define ACPI_AC_STATUS_UNKNOWN 0xFF #define ACPI_AC_STATUS_UNKNOWN 0xFF
#define _COMPONENT ACPI_AC_COMPONENT #define _COMPONENT ACPI_AC_COMPONENT
ACPI_MODULE_NAME ("acpi_ac") ACPI_MODULE_NAME("acpi_ac")
MODULE_AUTHOR("Paul Diefenbaugh"); MODULE_AUTHOR("Paul Diefenbaugh");
MODULE_DESCRIPTION(ACPI_AC_DRIVER_NAME); MODULE_DESCRIPTION(ACPI_AC_DRIVER_NAME);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
static int acpi_ac_add (struct acpi_device *device); static int acpi_ac_add(struct acpi_device *device);
static int acpi_ac_remove (struct acpi_device *device, int type); static int acpi_ac_remove(struct acpi_device *device, int type);
static int acpi_ac_open_fs(struct inode *inode, struct file *file); static int acpi_ac_open_fs(struct inode *inode, struct file *file);
static struct acpi_driver acpi_ac_driver = { static struct acpi_driver acpi_ac_driver = {
.name = ACPI_AC_DRIVER_NAME, .name = ACPI_AC_DRIVER_NAME,
.class = ACPI_AC_CLASS, .class = ACPI_AC_CLASS,
.ids = ACPI_AC_HID, .ids = ACPI_AC_HID,
.ops = { .ops = {
.add = acpi_ac_add, .add = acpi_ac_add,
.remove = acpi_ac_remove, .remove = acpi_ac_remove,
}, },
}; };
struct acpi_ac { struct acpi_ac {
acpi_handle handle; acpi_handle handle;
unsigned long state; unsigned long state;
}; };
static struct file_operations acpi_ac_fops = { static struct file_operations acpi_ac_fops = {
.open = acpi_ac_open_fs, .open = acpi_ac_open_fs,
.read = seq_read, .read = seq_read,
.llseek = seq_lseek, .llseek = seq_lseek,
.release = single_release, .release = single_release,
}; };
/* -------------------------------------------------------------------------- /* --------------------------------------------------------------------------
AC Adapter Management AC Adapter Management
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
static int static int acpi_ac_get_state(struct acpi_ac *ac)
acpi_ac_get_state (
struct acpi_ac *ac)
{ {
acpi_status status = AE_OK; acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE("acpi_ac_get_state"); ACPI_FUNCTION_TRACE("acpi_ac_get_state");
...@@ -95,24 +92,23 @@ acpi_ac_get_state ( ...@@ -95,24 +92,23 @@ acpi_ac_get_state (
status = acpi_evaluate_integer(ac->handle, "_PSR", NULL, &ac->state); status = acpi_evaluate_integer(ac->handle, "_PSR", NULL, &ac->state);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Error reading AC Adapter state\n")); "Error reading AC Adapter state\n"));
ac->state = ACPI_AC_STATUS_UNKNOWN; ac->state = ACPI_AC_STATUS_UNKNOWN;
return_VALUE(-ENODEV); return_VALUE(-ENODEV);
} }
return_VALUE(0); return_VALUE(0);
} }
/* -------------------------------------------------------------------------- /* --------------------------------------------------------------------------
FS Interface (/proc) FS Interface (/proc)
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
static struct proc_dir_entry *acpi_ac_dir; static struct proc_dir_entry *acpi_ac_dir;
static int acpi_ac_seq_show(struct seq_file *seq, void *offset) static int acpi_ac_seq_show(struct seq_file *seq, void *offset)
{ {
struct acpi_ac *ac = (struct acpi_ac *) seq->private; struct acpi_ac *ac = (struct acpi_ac *)seq->private;
ACPI_FUNCTION_TRACE("acpi_ac_seq_show"); ACPI_FUNCTION_TRACE("acpi_ac_seq_show");
...@@ -139,23 +135,21 @@ static int acpi_ac_seq_show(struct seq_file *seq, void *offset) ...@@ -139,23 +135,21 @@ static int acpi_ac_seq_show(struct seq_file *seq, void *offset)
return_VALUE(0); return_VALUE(0);
} }
static int acpi_ac_open_fs(struct inode *inode, struct file *file) static int acpi_ac_open_fs(struct inode *inode, struct file *file)
{ {
return single_open(file, acpi_ac_seq_show, PDE(inode)->data); return single_open(file, acpi_ac_seq_show, PDE(inode)->data);
} }
static int static int acpi_ac_add_fs(struct acpi_device *device)
acpi_ac_add_fs (
struct acpi_device *device)
{ {
struct proc_dir_entry *entry = NULL; struct proc_dir_entry *entry = NULL;
ACPI_FUNCTION_TRACE("acpi_ac_add_fs"); ACPI_FUNCTION_TRACE("acpi_ac_add_fs");
if (!acpi_device_dir(device)) { if (!acpi_device_dir(device)) {
acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device),
acpi_ac_dir); acpi_ac_dir);
if (!acpi_device_dir(device)) if (!acpi_device_dir(device))
return_VALUE(-ENODEV); return_VALUE(-ENODEV);
acpi_device_dir(device)->owner = THIS_MODULE; acpi_device_dir(device)->owner = THIS_MODULE;
...@@ -163,11 +157,11 @@ acpi_ac_add_fs ( ...@@ -163,11 +157,11 @@ acpi_ac_add_fs (
/* 'state' [R] */ /* 'state' [R] */
entry = create_proc_entry(ACPI_AC_FILE_STATE, entry = create_proc_entry(ACPI_AC_FILE_STATE,
S_IRUGO, acpi_device_dir(device)); S_IRUGO, acpi_device_dir(device));
if (!entry) if (!entry)
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Unable to create '%s' fs entry\n", "Unable to create '%s' fs entry\n",
ACPI_AC_FILE_STATE)); ACPI_AC_FILE_STATE));
else { else {
entry->proc_fops = &acpi_ac_fops; entry->proc_fops = &acpi_ac_fops;
entry->data = acpi_driver_data(device); entry->data = acpi_driver_data(device);
...@@ -177,16 +171,12 @@ acpi_ac_add_fs ( ...@@ -177,16 +171,12 @@ acpi_ac_add_fs (
return_VALUE(0); return_VALUE(0);
} }
static int acpi_ac_remove_fs(struct acpi_device *device)
static int
acpi_ac_remove_fs (
struct acpi_device *device)
{ {
ACPI_FUNCTION_TRACE("acpi_ac_remove_fs"); ACPI_FUNCTION_TRACE("acpi_ac_remove_fs");
if (acpi_device_dir(device)) { if (acpi_device_dir(device)) {
remove_proc_entry(ACPI_AC_FILE_STATE, remove_proc_entry(ACPI_AC_FILE_STATE, acpi_device_dir(device));
acpi_device_dir(device));
remove_proc_entry(acpi_device_bid(device), acpi_ac_dir); remove_proc_entry(acpi_device_bid(device), acpi_ac_dir);
acpi_device_dir(device) = NULL; acpi_device_dir(device) = NULL;
...@@ -195,19 +185,14 @@ acpi_ac_remove_fs ( ...@@ -195,19 +185,14 @@ acpi_ac_remove_fs (
return_VALUE(0); return_VALUE(0);
} }
/* -------------------------------------------------------------------------- /* --------------------------------------------------------------------------
Driver Model Driver Model
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
static void static void acpi_ac_notify(acpi_handle handle, u32 event, void *data)
acpi_ac_notify (
acpi_handle handle,
u32 event,
void *data)
{ {
struct acpi_ac *ac = (struct acpi_ac *) data; struct acpi_ac *ac = (struct acpi_ac *)data;
struct acpi_device *device = NULL; struct acpi_device *device = NULL;
ACPI_FUNCTION_TRACE("acpi_ac_notify"); ACPI_FUNCTION_TRACE("acpi_ac_notify");
...@@ -224,21 +209,18 @@ acpi_ac_notify ( ...@@ -224,21 +209,18 @@ acpi_ac_notify (
break; break;
default: default:
ACPI_DEBUG_PRINT((ACPI_DB_INFO, ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"Unsupported event [0x%x]\n", event)); "Unsupported event [0x%x]\n", event));
break; break;
} }
return_VOID; return_VOID;
} }
static int acpi_ac_add(struct acpi_device *device)
static int
acpi_ac_add (
struct acpi_device *device)
{ {
int result = 0; int result = 0;
acpi_status status = AE_OK; acpi_status status = AE_OK;
struct acpi_ac *ac = NULL; struct acpi_ac *ac = NULL;
ACPI_FUNCTION_TRACE("acpi_ac_add"); ACPI_FUNCTION_TRACE("acpi_ac_add");
...@@ -264,19 +246,20 @@ acpi_ac_add ( ...@@ -264,19 +246,20 @@ acpi_ac_add (
goto end; goto end;
status = acpi_install_notify_handler(ac->handle, status = acpi_install_notify_handler(ac->handle,
ACPI_DEVICE_NOTIFY, acpi_ac_notify, ac); ACPI_DEVICE_NOTIFY, acpi_ac_notify,
ac);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Error installing notify handler\n")); "Error installing notify handler\n"));
result = -ENODEV; result = -ENODEV;
goto end; goto end;
} }
printk(KERN_INFO PREFIX "%s [%s] (%s)\n", printk(KERN_INFO PREFIX "%s [%s] (%s)\n",
acpi_device_name(device), acpi_device_bid(device), acpi_device_name(device), acpi_device_bid(device),
ac->state?"on-line":"off-line"); ac->state ? "on-line" : "off-line");
end: end:
if (result) { if (result) {
acpi_ac_remove_fs(device); acpi_ac_remove_fs(device);
kfree(ac); kfree(ac);
...@@ -285,27 +268,23 @@ acpi_ac_add ( ...@@ -285,27 +268,23 @@ acpi_ac_add (
return_VALUE(result); return_VALUE(result);
} }
static int acpi_ac_remove(struct acpi_device *device, int type)
static int
acpi_ac_remove (
struct acpi_device *device,
int type)
{ {
acpi_status status = AE_OK; acpi_status status = AE_OK;
struct acpi_ac *ac = NULL; struct acpi_ac *ac = NULL;
ACPI_FUNCTION_TRACE("acpi_ac_remove"); ACPI_FUNCTION_TRACE("acpi_ac_remove");
if (!device || !acpi_driver_data(device)) if (!device || !acpi_driver_data(device))
return_VALUE(-EINVAL); return_VALUE(-EINVAL);
ac = (struct acpi_ac *) acpi_driver_data(device); ac = (struct acpi_ac *)acpi_driver_data(device);
status = acpi_remove_notify_handler(ac->handle, status = acpi_remove_notify_handler(ac->handle,
ACPI_DEVICE_NOTIFY, acpi_ac_notify); ACPI_DEVICE_NOTIFY, acpi_ac_notify);
if (ACPI_FAILURE(status)) if (ACPI_FAILURE(status))
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Error removing notify handler\n")); "Error removing notify handler\n"));
acpi_ac_remove_fs(device); acpi_ac_remove_fs(device);
...@@ -314,11 +293,9 @@ acpi_ac_remove ( ...@@ -314,11 +293,9 @@ acpi_ac_remove (
return_VALUE(0); return_VALUE(0);
} }
static int __init acpi_ac_init(void)
static int __init
acpi_ac_init (void)
{ {
int result = 0; int result = 0;
ACPI_FUNCTION_TRACE("acpi_ac_init"); ACPI_FUNCTION_TRACE("acpi_ac_init");
...@@ -336,9 +313,7 @@ acpi_ac_init (void) ...@@ -336,9 +313,7 @@ acpi_ac_init (void)
return_VALUE(0); return_VALUE(0);
} }
static void __exit acpi_ac_exit(void)
static void __exit
acpi_ac_exit (void)
{ {
ACPI_FUNCTION_TRACE("acpi_ac_exit"); ACPI_FUNCTION_TRACE("acpi_ac_exit");
...@@ -349,6 +324,5 @@ acpi_ac_exit (void) ...@@ -349,6 +324,5 @@ acpi_ac_exit (void)
return_VOID; return_VOID;
} }
module_init(acpi_ac_init); module_init(acpi_ac_init);
module_exit(acpi_ac_exit); module_exit(acpi_ac_exit);
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -34,49 +33,49 @@ ...@@ -34,49 +33,49 @@
#include <acpi/acpi_bus.h> #include <acpi/acpi_bus.h>
#include <linux/dmi.h> #include <linux/dmi.h>
enum acpi_blacklist_predicates enum acpi_blacklist_predicates {
{ all_versions,
all_versions, less_than_or_equal,
less_than_or_equal, equal,
equal, greater_than_or_equal,
greater_than_or_equal,
}; };
struct acpi_blacklist_item struct acpi_blacklist_item {
{ char oem_id[7];
char oem_id[7]; char oem_table_id[9];
char oem_table_id[9]; u32 oem_revision;
u32 oem_revision; acpi_table_type table;
acpi_table_type table; enum acpi_blacklist_predicates oem_revision_predicate;
enum acpi_blacklist_predicates oem_revision_predicate; char *reason;
char *reason; u32 is_critical_error;
u32 is_critical_error;
}; };
/* /*
* POLICY: If *anything* doesn't work, put it on the blacklist. * POLICY: If *anything* doesn't work, put it on the blacklist.
* If they are critical errors, mark it critical, and abort driver load. * If they are critical errors, mark it critical, and abort driver load.
*/ */
static struct acpi_blacklist_item acpi_blacklist[] __initdata = static struct acpi_blacklist_item acpi_blacklist[] __initdata = {
{
/* Compaq Presario 1700 */ /* Compaq Presario 1700 */
{"PTLTD ", " DSDT ", 0x06040000, ACPI_DSDT, less_than_or_equal, "Multiple problems", 1}, {"PTLTD ", " DSDT ", 0x06040000, ACPI_DSDT, less_than_or_equal,
"Multiple problems", 1},
/* Sony FX120, FX140, FX150? */ /* Sony FX120, FX140, FX150? */
{"SONY ", "U0 ", 0x20010313, ACPI_DSDT, less_than_or_equal, "ACPI driver problem", 1}, {"SONY ", "U0 ", 0x20010313, ACPI_DSDT, less_than_or_equal,
"ACPI driver problem", 1},
/* Compaq Presario 800, Insyde BIOS */ /* Compaq Presario 800, Insyde BIOS */
{"INT440", "SYSFexxx", 0x00001001, ACPI_DSDT, less_than_or_equal, "Does not use _REG to protect EC OpRegions", 1}, {"INT440", "SYSFexxx", 0x00001001, ACPI_DSDT, less_than_or_equal,
"Does not use _REG to protect EC OpRegions", 1},
/* IBM 600E - _ADR should return 7, but it returns 1 */ /* IBM 600E - _ADR should return 7, but it returns 1 */
{"IBM ", "TP600E ", 0x00000105, ACPI_DSDT, less_than_or_equal, "Incorrect _ADR", 1}, {"IBM ", "TP600E ", 0x00000105, ACPI_DSDT, less_than_or_equal,
{"ASUS\0\0", "P2B-S ", 0, ACPI_DSDT, all_versions, "Bogus PCI routing", 1}, "Incorrect _ADR", 1},
{"ASUS\0\0", "P2B-S ", 0, ACPI_DSDT, all_versions,
"Bogus PCI routing", 1},
{""} {""}
}; };
#if CONFIG_ACPI_BLACKLIST_YEAR #if CONFIG_ACPI_BLACKLIST_YEAR
static int __init static int __init blacklist_by_year(void)
blacklist_by_year(void)
{ {
int year; int year;
char *s = dmi_get_system_info(DMI_BIOS_DATE); char *s = dmi_get_system_info(DMI_BIOS_DATE);
...@@ -92,36 +91,38 @@ blacklist_by_year(void) ...@@ -92,36 +91,38 @@ blacklist_by_year(void)
s += 1; s += 1;
year = simple_strtoul(s,NULL,0); year = simple_strtoul(s, NULL, 0);
if (year < 100) { /* 2-digit year */ if (year < 100) { /* 2-digit year */
year += 1900; year += 1900;
if (year < 1996) /* no dates < spec 1.0 */ if (year < 1996) /* no dates < spec 1.0 */
year += 100; year += 100;
} }
if (year < CONFIG_ACPI_BLACKLIST_YEAR) { if (year < CONFIG_ACPI_BLACKLIST_YEAR) {
printk(KERN_ERR PREFIX "BIOS age (%d) fails cutoff (%d), " printk(KERN_ERR PREFIX "BIOS age (%d) fails cutoff (%d), "
"acpi=force is required to enable ACPI\n", "acpi=force is required to enable ACPI\n",
year, CONFIG_ACPI_BLACKLIST_YEAR); year, CONFIG_ACPI_BLACKLIST_YEAR);
return 1; return 1;
} }
return 0; return 0;
} }
#else #else
static inline int blacklist_by_year(void) { return 0; } static inline int blacklist_by_year(void)
{
return 0;
}
#endif #endif
int __init int __init acpi_blacklisted(void)
acpi_blacklisted(void)
{ {
int i = 0; int i = 0;
int blacklisted = 0; int blacklisted = 0;
struct acpi_table_header *table_header; struct acpi_table_header *table_header;
while (acpi_blacklist[i].oem_id[0] != '\0') while (acpi_blacklist[i].oem_id[0] != '\0') {
{ if (acpi_get_table_header_early
if (acpi_get_table_header_early(acpi_blacklist[i].table, &table_header)) { (acpi_blacklist[i].table, &table_header)) {
i++; i++;
continue; continue;
} }
...@@ -131,33 +132,43 @@ acpi_blacklisted(void) ...@@ -131,33 +132,43 @@ acpi_blacklisted(void)
continue; continue;
} }
if (strncmp(acpi_blacklist[i].oem_table_id, table_header->oem_table_id, 8)) { if (strncmp
(acpi_blacklist[i].oem_table_id, table_header->oem_table_id,
8)) {
i++; i++;
continue; continue;
} }
if ((acpi_blacklist[i].oem_revision_predicate == all_versions) if ((acpi_blacklist[i].oem_revision_predicate == all_versions)
|| (acpi_blacklist[i].oem_revision_predicate == less_than_or_equal || (acpi_blacklist[i].oem_revision_predicate ==
&& table_header->oem_revision <= acpi_blacklist[i].oem_revision) less_than_or_equal
|| (acpi_blacklist[i].oem_revision_predicate == greater_than_or_equal && table_header->oem_revision <=
&& table_header->oem_revision >= acpi_blacklist[i].oem_revision) acpi_blacklist[i].oem_revision)
|| (acpi_blacklist[i].oem_revision_predicate ==
greater_than_or_equal
&& table_header->oem_revision >=
acpi_blacklist[i].oem_revision)
|| (acpi_blacklist[i].oem_revision_predicate == equal || (acpi_blacklist[i].oem_revision_predicate == equal
&& table_header->oem_revision == acpi_blacklist[i].oem_revision)) { && table_header->oem_revision ==
acpi_blacklist[i].oem_revision)) {
printk(KERN_ERR PREFIX "Vendor \"%6.6s\" System \"%8.8s\" "
"Revision 0x%x has a known ACPI BIOS problem.\n", printk(KERN_ERR PREFIX
acpi_blacklist[i].oem_id, "Vendor \"%6.6s\" System \"%8.8s\" "
acpi_blacklist[i].oem_table_id, "Revision 0x%x has a known ACPI BIOS problem.\n",
acpi_blacklist[i].oem_revision); acpi_blacklist[i].oem_id,
acpi_blacklist[i].oem_table_id,
printk(KERN_ERR PREFIX "Reason: %s. This is a %s error\n", acpi_blacklist[i].oem_revision);
acpi_blacklist[i].reason,
(acpi_blacklist[i].is_critical_error ? "non-recoverable" : "recoverable")); printk(KERN_ERR PREFIX
"Reason: %s. This is a %s error\n",
acpi_blacklist[i].reason,
(acpi_blacklist[i].
is_critical_error ? "non-recoverable" :
"recoverable"));
blacklisted = acpi_blacklist[i].is_critical_error; blacklisted = acpi_blacklist[i].is_critical_error;
break; break;
} } else {
else {
i++; i++;
} }
} }
...@@ -166,4 +177,3 @@ acpi_blacklisted(void) ...@@ -166,4 +177,3 @@ acpi_blacklisted(void)
return blacklisted; return blacklisted;
} }
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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