http://linux-acpi.bkbits.net/linux-acpi-test-mm len.brown@intel.com|ChangeSet|20040827052527|08441 len.brown # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/28 22:50:11-07:00 akpm@bix.(none) # Merge http://linux-acpi.bkbits.net/linux-acpi-test-mm # into bix.(none):/usr/src/bk-acpi # # sound/drivers/mpu401/mpu401.c # 2004/08/28 22:50:07-07:00 akpm@bix.(none) +0 -0 # Auto merged # # arch/i386/kernel/setup.c # 2004/08/28 22:50:07-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/08/27 01:25:27-04:00 len.brown@intel.com # Merge intel.com:/home/lenb/bk/26-latest-test # into intel.com:/home/lenb/bk/linux-acpi-test-mm # # include/asm-i386/acpi.h # 2004/08/27 01:25:23-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/acpi/boot.c # 2004/08/27 01:25:23-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/Makefile # 2004/08/27 01:25:23-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/08/26 14:50:55-04:00 len.brown@intel.com # [ACPI] Export acpi_strict for use in modular drivers. # This will enable drivers to work around BIOS deficiencies, # while still allowing the drivers to be more picky with "acpi=strict" # # Signed-off-by: Bjorn Helgaas # # arch/i386/kernel/acpi/boot.c # 2004/08/26 14:50:48-04:00 len.brown@intel.com +1 -0 # export acpi_strict # # ChangeSet # 2004/08/26 01:04:55-04:00 len.brown@intel.com # merge # # arch/x86_64/Kconfig # 2004/08/26 01:04:50-04:00 len.brown@intel.com +0 -1 # merge # # include/asm-x86_64/mpspec.h # 2004/08/26 01:01:12-04:00 len.brown@intel.com +0 -0 # Auto merged # # include/asm-x86_64/acpi.h # 2004/08/26 01:01:12-04:00 len.brown@intel.com +0 -0 # Auto merged # # include/asm-i386/fixmap.h # 2004/08/26 01:01:12-04:00 len.brown@intel.com +0 -0 # Auto merged # # include/asm-i386/acpi.h # 2004/08/26 01:01:12-04:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/char/ipmi/ipmi_si_intf.c # 2004/08/26 01:01:12-04:00 len.brown@intel.com +0 -3 # Auto merged # # drivers/Makefile # 2004/08/26 01:01:12-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/x86_64/kernel/setup.c # 2004/08/26 01:01:12-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/x86_64/kernel/Makefile # 2004/08/26 01:01:12-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/io_apic.c # 2004/08/26 01:01:12-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/Makefile # 2004/08/26 01:01:12-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/Kconfig # 2004/08/26 01:01:12-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/08/26 01:00:01-04:00 len.brown@intel.com # [ACPI] Kconfig cleanup # # !CONFIG_ACPI can now remove (most) all ACPI code, # including that required to configure HT. # # X86_HT is now selectable rather than a # hard-coded synonym for CONFIG_SMP. # # This allows an SMP build w/o HT and w/o ACPI # http://bugzilla.kernel.org/show_bug.cgi?id=2495 # # SCHED_SMP now depends on 86_HT # # CONFIG_ACPI_BOOT, CONFIG_ACPI_INTERPRETER, CONFIG_ACPI_BUS, # CONFIG_ACPI_POWER, CONFIG_ACPI_SYSTEM are now CONFIG_ACPI. # # Deleted stale dependencies on CONFIG_SGI_SN # # HPET_TIMER, PCI_MMCONFIG, X86_HT select ACPI # # sound/drivers/mpu401/mpu401.c # 2004/08/26 00:59:55-04:00 len.brown@intel.com +3 -3 # ACPI Kconfig cleanup # # include/linux/acpi.h # 2004/08/26 00:59:55-04:00 len.brown@intel.com +6 -6 # ACPI Kconfig cleanup # # include/asm-x86_64/mpspec.h # 2004/08/26 00:59:55-04:00 len.brown@intel.com +1 -1 # ACPI Kconfig cleanup # # include/asm-x86_64/io_apic.h # 2004/08/26 00:59:55-04:00 len.brown@intel.com +1 -1 # ACPI Kconfig cleanup # # include/asm-x86_64/acpi.h # 2004/08/26 00:59:55-04:00 len.brown@intel.com +3 -3 # ACPI Kconfig cleanup # # include/asm-i386/mpspec.h # 2004/08/26 00:59:55-04:00 len.brown@intel.com +2 -2 # ACPI Kconfig cleanup # # include/asm-i386/io_apic.h # 2004/08/26 00:59:55-04:00 len.brown@intel.com +2 -2 # ACPI Kconfig cleanup # # include/asm-i386/fixmap.h # 2004/08/26 00:59:55-04:00 len.brown@intel.com +1 -1 # ACPI Kconfig cleanup # # include/asm-i386/acpi.h # 2004/08/26 00:59:55-04:00 len.brown@intel.com +2 -2 # ACPI Kconfig cleanup # # include/acpi/acpi_drivers.h # 2004/08/26 00:59:55-04:00 len.brown@intel.com +1 -3 # ACPI Kconfig cleanup # # include/acpi/acpi_bus.h # 2004/08/26 00:59:55-04:00 len.brown@intel.com +2 -2 # ACPI Kconfig cleanup # # drivers/char/ipmi/ipmi_si_intf.c # 2004/08/26 00:59:55-04:00 len.brown@intel.com +7 -5 # ACPI Kconfig cleanup # # drivers/acpi/acpi_ksyms.c # 2004/08/26 00:59:55-04:00 len.brown@intel.com +0 -8 # ACPI Kconfig cleanup # # drivers/acpi/Makefile # 2004/08/26 00:59:55-04:00 len.brown@intel.com +10 -9 # ACPI Kconfig cleanup # # drivers/acpi/Kconfig # 2004/08/26 00:59:55-04:00 len.brown@intel.com +31 -85 # ACPI Kconfig cleanup # # drivers/Makefile # 2004/08/26 00:59:54-04:00 len.brown@intel.com +1 -1 # ACPI Kconfig cleanup # # arch/x86_64/kernel/setup.c # 2004/08/26 00:59:54-04:00 len.brown@intel.com +3 -3 # ACPI Kconfig cleanup # # arch/x86_64/kernel/mpparse.c # 2004/08/26 00:59:54-04:00 len.brown@intel.com +7 -11 # ACPI Kconfig cleanup # # arch/x86_64/kernel/io_apic.c # 2004/08/26 00:59:54-04:00 len.brown@intel.com +2 -2 # ACPI Kconfig cleanup # # arch/x86_64/kernel/acpi/Makefile # 2004/08/26 00:59:54-04:00 len.brown@intel.com +2 -2 # ACPI Kconfig cleanup # # arch/x86_64/kernel/Makefile # 2004/08/26 00:59:54-04:00 len.brown@intel.com +1 -1 # ACPI Kconfig cleanup # # arch/x86_64/Kconfig # 2004/08/26 00:59:54-04:00 len.brown@intel.com +26 -13 # ACPI Kconfig cleanup # # arch/ia64/kernel/setup.c # 2004/08/26 00:59:54-04:00 len.brown@intel.com +3 -3 # ACPI Kconfig cleanup # # arch/ia64/kernel/acpi.c # 2004/08/26 00:59:54-04:00 len.brown@intel.com +2 -2 # ACPI Kconfig cleanup # # arch/i386/kernel/setup.c # 2004/08/26 00:59:54-04:00 len.brown@intel.com +4 -4 # ACPI Kconfig cleanup # # arch/i386/kernel/mpparse.c # 2004/08/26 00:59:54-04:00 len.brown@intel.com +4 -8 # ACPI Kconfig cleanup # # arch/i386/kernel/io_apic.c # 2004/08/26 00:59:54-04:00 len.brown@intel.com +2 -2 # ACPI Kconfig cleanup # # arch/i386/kernel/dmi_scan.c # 2004/08/26 00:59:54-04:00 len.brown@intel.com +3 -3 # ACPI Kconfig cleanup # # arch/i386/kernel/acpi/boot.c # 2004/08/26 00:59:54-04:00 len.brown@intel.com +3 -9 # ACPI Kconfig cleanup # # arch/i386/kernel/acpi/Makefile # 2004/08/26 00:59:54-04:00 len.brown@intel.com +1 -1 # ACPI Kconfig cleanup # # arch/i386/kernel/Makefile # 2004/08/26 00:59:54-04:00 len.brown@intel.com +1 -1 # ACPI Kconfig cleanup # # arch/i386/Kconfig # 2004/08/26 00:59:54-04:00 len.brown@intel.com +25 -11 # ACPI Kconfig cleanup # # ChangeSet # 2004/08/26 00:19:36-04:00 len.brown@intel.com # [ACPI] fix numa build warnings (Keith Owens) # # Signed-off-by: Takayoshi Kochi # # drivers/acpi/numa.c # 2004/07/28 09:07:45-04:00 len.brown@intel.com +10 -2 # fix numa build warnings # # ChangeSet # 2004/08/24 22:18:39-04:00 len.brown@intel.com # [ACPI] quiet ACPI NUMA boot messages # Signed-off-by: Jesse Barnes # # drivers/acpi/tables.c # 2004/08/24 18:12:20-04:00 len.brown@intel.com +2 -2 # quiet boot messages # # drivers/acpi/numa.c # 2004/08/24 18:16:12-04:00 len.brown@intel.com +0 -4 # quiet boot messages # # ChangeSet # 2004/08/21 23:12:45-04:00 len.brown@intel.com # [ACPI] Enable ACPICA workarounds for 'RELAXED_AML' and 'implicit return' # These workarounds are disabled if "acpi=strict" # # include/acpi/acglobal.h # 2004/08/21 23:12:39-04:00 len.brown@intel.com +1 -1 # acpi_gbl_enable_interpreter_slack typo fix # # drivers/acpi/executer/exfldio.c # 2004/08/21 23:12:39-04:00 len.brown@intel.com +2 -35 # acpi_gbl_enable_interpreter_slack typo fix # delete the previous RELAXED_AML workaround it replaces # # drivers/acpi/dispatcher/dsutils.c # 2004/08/21 23:12:39-04:00 len.brown@intel.com +1 -1 # acpi_gbl_enable_interpreter_slack typo fix # # drivers/acpi/bus.c # 2004/08/21 23:12:39-04:00 len.brown@intel.com +4 -0 # if (!acpi_strict) enable_acpi_gbl_interpreter_slack = TRUE # # ChangeSet # 2004/08/20 18:18:05-04:00 len.brown@intel.com # [ACPI] ACPICA 20040816 update from Bob Moore # # Designed and implemented support within the AML interpreter # for the so-called implicit return. This support returns # the result of the last ASL operation within a control # method, in the absence of an explicit Return() operator. # A few machines depend on this behavior, even though it # is not explicitly supported by the ASL language. It is # optional support that can be enabled at runtime via the # acpi_gbl_enable_interpreter_slack flag. # # Removed support for the PCI_Config address space from the # internal low level hardware interfaces (acpi_hw_low_level_read # and acpi_hw_low_level_write). This support was not used # internally, and would not work correctly anyway because # the PCI bus number and segment number were not supported. # There are separate interfaces for PCI configuration space # access because of the unique interface. # acpica-unix-20040816.patch # # AE_CODE_AML_MAX fix from Bjorn Helgaas # # include/acpi/acmacros.h # 2004/08/20 14:05:51-04:00 len.brown@intel.com +0 -18 # ACPICA 20040816 # # include/acpi/acexcep.h # 2004/08/20 14:05:51-04:00 len.brown@intel.com +1 -1 # ACPICA 20040816 # # include/acpi/acconfig.h # 2004/08/20 14:05:51-04:00 len.brown@intel.com +1 -1 # ACPICA 20040816 # # drivers/acpi/hardware/hwtimer.c # 2004/08/20 14:05:55-04:00 len.brown@intel.com +12 -16 # ACPICA 20040816 # # drivers/acpi/hardware/hwregs.c # 2004/08/20 14:05:55-04:00 len.brown@intel.com +22 -48 # ACPICA 20040816 # # drivers/acpi/hardware/hwgpe.c # 2004/08/20 14:05:55-04:00 len.brown@intel.com +1 -1 # ACPICA 20040816 # # drivers/acpi/events/evxface.c # 2004/08/20 14:05:55-04:00 len.brown@intel.com +5 -6 # ACPICA 20040816 # # drivers/acpi/events/evrgnini.c # 2004/08/20 14:05:55-04:00 len.brown@intel.com +6 -6 # ACPICA 20040816 # # drivers/acpi/events/evregion.c # 2004/08/20 14:05:55-04:00 len.brown@intel.com +8 -9 # ACPICA 20040816 # # drivers/acpi/events/evmisc.c # 2004/08/20 14:05:55-04:00 len.brown@intel.com +23 -9 # ACPICA 20040816 # # drivers/acpi/events/evgpe.c # 2004/08/20 14:05:55-04:00 len.brown@intel.com +5 -1 # ACPICA 20040816 # # drivers/acpi/dispatcher/dsutils.c # 2004/08/20 14:05:55-04:00 len.brown@intel.com +37 -16 # ACPICA 20040816 # # drivers/acpi/dispatcher/dsmethod.c # 2004/08/20 14:05:55-04:00 len.brown@intel.com +31 -21 # ACPICA 20040816 # # ChangeSet # 2004/08/19 02:43:31-04:00 len.brown@intel.com # [ACPI] fix __initdata bug in acpi_irq_penalty[] # # Signed-off-by: Bjorn Helgaas # # drivers/acpi/pci_link.c # 2004/08/18 19:26:48-04:00 len.brown@intel.com +2 -2 # fix __initdata bug in acpi_irq_penalty[] # # ChangeSet # 2004/08/17 18:08:51-04:00 len.brown@intel.com # [ACPI] delete ACPI_BLACKLIST_CUTOFF_YEAR # # arch/i386/kernel/dmi_scan.c # 2004/08/17 17:55:32-04:00 len.brown@intel.com +0 -21 # delete ACPI_BLACKLIST_CUTOFF_YEAR # diff -Nru a/arch/i386/Kconfig b/arch/i386/Kconfig --- a/arch/i386/Kconfig 2004-08-30 17:15:41 -07:00 +++ b/arch/i386/Kconfig 2004-08-30 17:15:41 -07:00 @@ -425,6 +425,7 @@ config HPET_TIMER bool "HPET Timer Support" + select ACPI help This enables the use of the HPET for the kernel's internal timer. HPET is the next generation timer replacing legacy 8254s. @@ -481,15 +482,33 @@ This is purely to save memory - each supported CPU adds approximately eight kilobytes to the kernel image. +config X86_HT + bool "Hyper-Threading (HT)" + depends on SMP && !(X86_VISWS || X86_VOYAGER) + select ACPI + default y + help + Hyper-Threading supports multiple virtual processors inside + each physical processor package. ACPI is required to discover + the virtual processors. So Y here will also select ACPI. + + X86_HT enables the kernel to discover physical package information + to allow the SMT scheduler to optimize for HT. The virtual + sibling info is also displayed in boot messages and /proc/cpuinfo. + + Say N allows you to build an SMP kernel that doesn't depend + on ACPI. + + config SCHED_SMT - bool "SMT (Hyperthreading) scheduler support" - depends on SMP + bool "SMT (Hyper-Threading) scheduler support" + depends on X86_HT default off help SMT scheduler support improves the CPU scheduler's decision making - when dealing with Intel Pentium 4 chips with HyperThreading at a - cost of slightly increased overhead in some places. If unsure say - N here. + when dealing with Intel Pentium 4 chips with Hyper-Threading at a + cost of slightly increased overhead in some places. It also applies + to NUMA configurations. If unsure say N here. config PREEMPT bool "Preemptible Kernel" @@ -1104,7 +1123,7 @@ config PCI_MMCONFIG bool depends on PCI && (PCI_GOMMCONFIG || (PCI_GOANY && ACPI)) - select ACPI_BOOT + select ACPI default y source "drivers/pci/Kconfig" @@ -1193,11 +1212,6 @@ config X86_SMP bool depends on SMP && !X86_VOYAGER - default y - -config X86_HT - bool - depends on SMP && !(X86_VISWS || X86_VOYAGER) default y config X86_BIOS_REBOOT diff -Nru a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile --- a/arch/i386/kernel/Makefile 2004-08-30 17:15:41 -07:00 +++ b/arch/i386/kernel/Makefile 2004-08-30 17:15:41 -07:00 @@ -11,7 +11,7 @@ obj-y += cpu/ obj-y += timers/ -obj-$(CONFIG_ACPI_BOOT) += acpi/ +obj-$(CONFIG_ACPI) += acpi/ obj-$(CONFIG_X86_BIOS_REBOOT) += reboot.o obj-$(CONFIG_MCA) += mca.o obj-$(CONFIG_X86_MSR) += msr.o diff -Nru a/arch/i386/kernel/acpi/Makefile b/arch/i386/kernel/acpi/Makefile --- a/arch/i386/kernel/acpi/Makefile 2004-08-30 17:15:41 -07:00 +++ b/arch/i386/kernel/acpi/Makefile 2004-08-30 17:15:41 -07:00 @@ -1,3 +1,3 @@ -obj-$(CONFIG_ACPI_BOOT) := boot.o +obj-y := boot.o obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o diff -Nru a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c --- a/arch/i386/kernel/acpi/boot.c 2004-08-30 17:15:41 -07:00 +++ b/arch/i386/kernel/acpi/boot.c 2004-08-30 17:15:41 -07:00 @@ -71,6 +71,7 @@ int acpi_lapic; int acpi_ioapic; int acpi_strict; +EXPORT_SYMBOL(acpi_strict); acpi_interrupt_flags acpi_sci_flags __initdata; int acpi_sci_override_gsi __initdata; @@ -277,7 +278,7 @@ #endif /*CONFIG_X86_LOCAL_APIC*/ -#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI_INTERPRETER) +#if defined(CONFIG_X86_IO_APIC) static int __init acpi_parse_ioapic ( @@ -389,8 +390,6 @@ #endif /* CONFIG_X86_IO_APIC */ -#ifdef CONFIG_ACPI_BUS - /* * acpi_pic_sci_set_trigger() * @@ -433,8 +432,6 @@ } -#endif /* CONFIG_ACPI_BUS */ - int acpi_gsi_to_irq(u32 gsi, unsigned int *irq) { #ifdef CONFIG_X86_IO_APIC @@ -575,10 +572,8 @@ return 0; } -#ifdef CONFIG_ACPI_INTERPRETER /* initialize sci_int early for INT_SRC_OVR MADT parsing */ acpi_fadt.sci_int = fadt->sci_int; -#endif #ifdef CONFIG_X86_PM_TIMER /* detect the location of the ACPI PM Timer */ @@ -667,7 +662,7 @@ } #endif /* CONFIG_X86_LOCAL_APIC */ -#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI_INTERPRETER) +#if defined(CONFIG_X86_IO_APIC) /* * Parse IOAPIC related entries in MADT * returns 0 on success, < 0 on error @@ -737,7 +732,7 @@ { return -1; } -#endif /* !(CONFIG_X86_IO_APIC && CONFIG_ACPI_INTERPRETER) */ +#endif /* !CONFIG_X86_IO_APIC */ static void __init diff -Nru a/arch/i386/kernel/dmi_scan.c b/arch/i386/kernel/dmi_scan.c --- a/arch/i386/kernel/dmi_scan.c 2004-08-30 17:15:41 -07:00 +++ b/arch/i386/kernel/dmi_scan.c 2004-08-30 17:15:41 -07:00 @@ -184,7 +184,7 @@ #endif -#ifdef CONFIG_ACPI_BOOT +#ifdef CONFIG_ACPI extern int acpi_force; static __init __attribute__((unused)) int dmi_disable_acpi(struct dmi_blacklist *d) @@ -274,7 +274,7 @@ } }, #endif -#ifdef CONFIG_ACPI_BOOT +#ifdef CONFIG_ACPI /* * If your system is blacklisted here, but you find that acpi=force * works for you, please contact acpi-devel@sourceforge.net @@ -410,7 +410,7 @@ MATCH(DMI_BOARD_NAME, "AN35"), MATCH(DMI_BIOS_VERSION, "6.00 PG"), MATCH(DMI_BIOS_DATE, "12/05/2003") }}, -#endif // CONFIG_ACPI_BOOT +#endif // CONFIG_ACPI #ifdef CONFIG_ACPI_PCI /* @@ -453,27 +453,6 @@ static __init void dmi_check_blacklist(void) { -#ifdef CONFIG_ACPI_BOOT -#define ACPI_BLACKLIST_CUTOFF_YEAR 2001 - - if (dmi_ident[DMI_BIOS_DATE]) { - char *s = strrchr(dmi_ident[DMI_BIOS_DATE], '/'); - if (s) { - int year, disable = 0; - s++; - 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 && !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"); - disable_acpi(); - } - } - } -#endif dmi_check_system(dmi_blacklist); } diff -Nru a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c --- a/arch/i386/kernel/io_apic.c 2004-08-30 17:15:41 -07:00 +++ b/arch/i386/kernel/io_apic.c 2004-08-30 17:15:41 -07:00 @@ -2384,7 +2384,7 @@ ACPI-based IOAPIC Configuration -------------------------------------------------------------------------- */ -#ifdef CONFIG_ACPI_BOOT +#ifdef CONFIG_ACPI int __init io_apic_get_unique_id (int ioapic, int apic_id) { @@ -2545,4 +2545,4 @@ return 0; } -#endif /*CONFIG_ACPI_BOOT*/ +#endif /* CONFIG_ACPI */ diff -Nru a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c --- a/arch/i386/kernel/mpparse.c 2004-08-30 17:15:41 -07:00 +++ b/arch/i386/kernel/mpparse.c 2004-08-30 17:15:41 -07:00 @@ -655,8 +655,6 @@ 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 * processors, where MPS only supports physical. */ @@ -813,7 +811,7 @@ ACPI-based MP Configuration -------------------------------------------------------------------------- */ -#ifdef CONFIG_ACPI_BOOT +#ifdef CONFIG_ACPI void __init mp_register_lapic_address ( u64 address) @@ -859,7 +857,7 @@ 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_MAX_IOAPIC_PIN 127 @@ -1057,11 +1055,9 @@ int ioapic_pin = 0; int idx, bit = 0; -#ifdef CONFIG_ACPI_BUS /* Don't set up the ACPI SCI because it's already set up */ if (acpi_fadt.sci_int == gsi) return; -#endif ioapic = mp_find_ioapic(gsi); if (ioapic < 0) { @@ -1100,5 +1096,5 @@ active_high_low == ACPI_ACTIVE_HIGH ? 0 : 1); } -#endif /*CONFIG_X86_IO_APIC && (CONFIG_ACPI_INTERPRETER || CONFIG_ACPI_BOOT)*/ -#endif /*CONFIG_ACPI_BOOT*/ +#endif /* CONFIG_X86_IO_APIC */ +#endif /* CONFIG_ACPI */ diff -Nru a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c --- a/arch/i386/kernel/setup.c 2004-08-30 17:15:41 -07:00 +++ b/arch/i386/kernel/setup.c 2004-08-30 17:15:41 -07:00 @@ -75,14 +75,14 @@ unsigned long mmu_cr4_features; EXPORT_SYMBOL_GPL(mmu_cr4_features); -#ifdef CONFIG_ACPI_INTERPRETER +#ifdef CONFIG_ACPI int acpi_disabled = 0; #else int acpi_disabled = 1; #endif EXPORT_SYMBOL(acpi_disabled); -#ifdef CONFIG_ACPI_BOOT +#ifdef CONFIG_ACPI int __initdata acpi_force = 0; extern acpi_interrupt_flags acpi_sci_flags; #endif @@ -749,7 +749,7 @@ } #endif -#ifdef CONFIG_ACPI_BOOT +#ifdef CONFIG_ACPI /* "acpi=off" disables both ACPI table parsing and interpreter */ else if (!memcmp(from, "acpi=off", 8)) { disable_acpi(); @@ -805,7 +805,7 @@ else if (!memcmp(from, "noapic", 6)) disable_ioapic_setup(); #endif /* CONFIG_X86_LOCAL_APIC */ -#endif /* CONFIG_ACPI_BOOT */ +#endif /* CONFIG_ACPI */ /* * highmem=size forces highmem to be exactly 'size' bytes. diff -Nru a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c --- a/arch/ia64/kernel/acpi.c 2004-08-30 17:15:41 -07:00 +++ b/arch/ia64/kernel/acpi.c 2004-08-30 17:15:41 -07:00 @@ -121,7 +121,7 @@ #endif } -#ifdef CONFIG_ACPI_BOOT +#ifdef CONFIG_ACPI #define ACPI_MAX_PLATFORM_INTERRUPTS 256 @@ -649,4 +649,4 @@ return 0; } -#endif /* CONFIG_ACPI_BOOT */ +#endif /* CONFIG_ACPI */ diff -Nru a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c --- a/arch/ia64/kernel/setup.c 2004-08-30 17:15:40 -07:00 +++ b/arch/ia64/kernel/setup.c 2004-08-30 17:15:40 -07:00 @@ -323,7 +323,7 @@ cpu_set(smp_processor_id(), cpu_online_map); #endif -#ifdef CONFIG_ACPI_BOOT +#ifdef CONFIG_ACPI /* Initialize the ACPI boot-time table parser */ acpi_table_init(); # ifdef CONFIG_ACPI_NUMA @@ -333,7 +333,7 @@ # ifdef CONFIG_SMP smp_build_cpu_map(); /* happens, e.g., with the Ski simulator */ # endif -#endif /* CONFIG_APCI_BOOT */ +#endif /* CONFIG_ACPI */ find_memory(); @@ -346,7 +346,7 @@ cpu_init(); /* initialize the bootstrap CPU */ -#ifdef CONFIG_ACPI_BOOT +#ifdef CONFIG_ACPI acpi_boot_init(); #endif #ifdef CONFIG_EFI_PCDP diff -Nru a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig --- a/arch/x86_64/Kconfig 2004-08-30 17:15:41 -07:00 +++ b/arch/x86_64/Kconfig 2004-08-30 17:15:41 -07:00 @@ -59,7 +59,8 @@ unless you want to debug such a crash. config HPET_TIMER - bool + bool "HPET Timer Support" + select ACPI default y help Use the IA-PC HPET (High Precision Event Timer) to manage @@ -160,12 +161,6 @@ with major 203 and minors 0 to 31 for /dev/cpu/0/cpuid to /dev/cpu/31/cpuid. -# disable it for opteron optimized builds because it pulls in ACPI_BOOT -config X86_HT - bool - depends on SMP && !MK8 - default y - config MATH_EMULATION bool @@ -240,14 +235,14 @@ desktop, embedded or real-time system. Say N if you are unsure. config SCHED_SMT - bool "SMT (Hyperthreading) scheduler support" - depends on SMP + bool "SMT (Hyper-Threading) scheduler support" + depends on X86_HT default off help SMT scheduler support improves the CPU scheduler's decision making - when dealing with Intel Pentium 4 chips with HyperThreading at a - cost of slightly increased overhead in some places. If unsure say - N here. + when dealing with Intel Pentium 4 chips with Hyper-Threading at a + cost of slightly increased overhead in some places. It also applies + to NUMA configurations. If unsure say N here. config K8_NUMA bool "K8 NUMA support" @@ -290,6 +285,24 @@ This is purely to save memory - each supported CPU requires memory in the static kernel configuration. +config X86_HT + bool "Hyper-Threading (HT)" + depends on SMP && !MK8 + select ACPI + default y + help + Hyper-Threading supports multiple virtual processors inside + each physical processor package. ACPI is required to discover + the virtual processors. So Y here will also select ACPI. + + X86_HT enables the kernel to discover physical package information + to allow the SMT scheduler to optimize for HT. The virtual + sibling info is also displayed in boot messages and /proc/cpuinfo. + + Say N allows you to build an SMP kernel that doesn't depend + on ACPI. + + config GART_IOMMU bool "IOMMU support" help @@ -345,7 +358,7 @@ config PCI_MMCONFIG bool "Support mmconfig PCI config space access" depends on PCI - select ACPI_BOOT + select ACPI config UNORDERED_IO bool "Unordered IO mapping access" diff -Nru a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile --- a/arch/x86_64/kernel/Makefile 2004-08-30 17:15:41 -07:00 +++ b/arch/x86_64/kernel/Makefile 2004-08-30 17:15:41 -07:00 @@ -11,7 +11,7 @@ obj-y += mce.o obj-$(CONFIG_MTRR) += ../../i386/kernel/cpu/mtrr/ -obj-$(CONFIG_ACPI_BOOT) += acpi/ +obj-$(CONFIG_ACPI) += acpi/ obj-$(CONFIG_X86_MSR) += msr.o obj-$(CONFIG_MICROCODE) += microcode.o obj-$(CONFIG_X86_CPUID) += cpuid.o diff -Nru a/arch/x86_64/kernel/acpi/Makefile b/arch/x86_64/kernel/acpi/Makefile --- a/arch/x86_64/kernel/acpi/Makefile 2004-08-30 17:15:41 -07:00 +++ b/arch/x86_64/kernel/acpi/Makefile 2004-08-30 17:15:41 -07:00 @@ -1,3 +1,3 @@ -obj-$(CONFIG_ACPI_BOOT) := boot.o -boot-$(CONFIG_ACPI_BOOT) := ../../../i386/kernel/acpi/boot.o +obj-y := boot.o +boot-y := ../../../i386/kernel/acpi/boot.o obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o diff -Nru a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c --- a/arch/x86_64/kernel/io_apic.c 2004-08-30 17:15:41 -07:00 +++ b/arch/x86_64/kernel/io_apic.c 2004-08-30 17:15:41 -07:00 @@ -1787,7 +1787,7 @@ ACPI-based IOAPIC Configuration -------------------------------------------------------------------------- */ -#ifdef CONFIG_ACPI_BOOT +#ifdef CONFIG_ACPI #define IO_APIC_MAX_ID 15 @@ -1947,7 +1947,7 @@ return 0; } -#endif /*CONFIG_ACPI_BOOT*/ +#endif /* CONFIG_ACPI */ #ifndef CONFIG_SMP void send_IPI_self(int vector) diff -Nru a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c --- a/arch/x86_64/kernel/mpparse.c 2004-08-30 17:15:41 -07:00 +++ b/arch/x86_64/kernel/mpparse.c 2004-08-30 17:15:41 -07:00 @@ -71,17 +71,17 @@ physid_mask_t phys_cpu_present_map = PHYSID_MASK_NONE; /* ACPI MADT entry parsing functions */ -#ifdef CONFIG_ACPI_BOOT +#ifdef CONFIG_ACPI extern struct acpi_boot_flags acpi_boot; #ifdef CONFIG_X86_LOCAL_APIC extern int acpi_parse_lapic (acpi_table_entry_header *header); extern int acpi_parse_lapic_addr_ovr (acpi_table_entry_header *header); extern int acpi_parse_lapic_nmi (acpi_table_entry_header *header); -#endif /*CONFIG_X86_LOCAL_APIC*/ +#endif /* CONFIG_X86_LOCAL_APIC */ #ifdef CONFIG_X86_IO_APIC extern int acpi_parse_ioapic (acpi_table_entry_header *header); -#endif /*CONFIG_X86_IO_APIC*/ -#endif /*CONFIG_ACPI_BOOT*/ +#endif /* CONFIG_X86_IO_APIC */ +#endif /* CONFIG_ACPI */ u8 bios_cpu_apicid[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID }; @@ -502,8 +502,6 @@ 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 * processors, where MPS only supports physical. */ @@ -657,7 +655,7 @@ ACPI-based MP Configuration -------------------------------------------------------------------------- */ -#ifdef CONFIG_ACPI_BOOT +#ifdef CONFIG_ACPI void __init mp_register_lapic_address ( u64 address) @@ -904,11 +902,9 @@ if (acpi_irq_model != ACPI_IRQ_MODEL_IOAPIC) return; -#ifdef CONFIG_ACPI_BUS /* Don't set up the ACPI SCI because it's already set up */ if (acpi_fadt.sci_int == gsi) return; -#endif ioapic = mp_find_ioapic(gsi); if (ioapic < 0) { @@ -944,5 +940,5 @@ active_high_low == ACPI_ACTIVE_HIGH ? 0 : 1); } -#endif /*CONFIG_X86_IO_APIC*/ -#endif /*CONFIG_ACPI_BOOT*/ +#endif /* CONFIG_X86_IO_APIC */ +#endif /* CONFIG_ACPI */ diff -Nru a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c --- a/arch/x86_64/kernel/setup.c 2004-08-30 17:15:40 -07:00 +++ b/arch/x86_64/kernel/setup.c 2004-08-30 17:15:40 -07:00 @@ -68,7 +68,7 @@ int acpi_disabled; EXPORT_SYMBOL(acpi_disabled); -#ifdef CONFIG_ACPI_BOOT +#ifdef CONFIG_ACPI extern int __initdata acpi_ht; extern acpi_interrupt_flags acpi_sci_flags; /* int __initdata acpi_force = 0; */ @@ -243,7 +243,7 @@ maxcpus = simple_strtoul(from + 8, NULL, 0); } #endif -#ifdef CONFIG_ACPI_BOOT +#ifdef CONFIG_ACPI /* "acpi=off" disables both ACPI table parsing and interpreter init */ if (!memcmp(from, "acpi=off", 8)) disable_acpi(); @@ -550,7 +550,7 @@ paging_init(); check_ioapic(); -#ifdef CONFIG_ACPI_BOOT +#ifdef CONFIG_ACPI /* * Initialize the ACPI boot-time table parser (gets the RSDP and SDT). * Must do this after paging_init (due to reliance on fixmap, and thus diff -Nru a/drivers/Makefile b/drivers/Makefile --- a/drivers/Makefile 2004-08-30 17:15:41 -07:00 +++ b/drivers/Makefile 2004-08-30 17:15:41 -07:00 @@ -7,7 +7,7 @@ obj-$(CONFIG_PCI) += pci/ obj-$(CONFIG_PARISC) += parisc/ -obj-$(CONFIG_ACPI_BOOT) += acpi/ +obj-$(CONFIG_ACPI) += acpi/ # PnP must come after ACPI since it will eventually need to check if acpi # was used and do nothing if so obj-$(CONFIG_PNP) += pnp/ diff -Nru a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig --- a/drivers/acpi/Kconfig 2004-08-30 17:15:41 -07:00 +++ b/drivers/acpi/Kconfig 2004-08-30 17:15:41 -07:00 @@ -13,65 +13,35 @@ default y ---help--- - Advanced Configuration and Power Interface (ACPI) support for - Linux requires an ACPI compliant platform (hardware/firmware), - and assumes the presence of OS-directed configuration and power - management (OSPM) software. This option will enlarge your - kernel by about 70K. - - Linux ACPI provides a robust functional replacement for several - legacy configuration and power management intefaces, including - the Plug-and-Play BIOS specification (PnP BIOS), the - MultiProcessor Specification (MPS), and the Advanced Power - Management (APM) specification. If both ACPI and APM support - are configured, whichever is loaded first shall be used. - - The ACPI SourceForge project contains the latest source code, - documentation, tools, mailing list subscription, and other - information. This project is available at: - - - Linux support for ACPI is based on Intel Corporation's ACPI - Component Architecture (ACPI CA). For more information see: - - - ACPI is an open industry specification co-developed by Compaq, - Intel, Microsoft, Phoenix, and Toshiba. The specification is - available at: - + ACPI (Advanced Configuration and Power Interface) is an open + industry specification co-developed by Hewlett-Packard, Intel, + Microsoft, Phoenix, and Toshiba. + + ACPI replaces PNPBIOS, Multiprocessor Specification (MPS) tables, + PIRQ tables, and Advanced Power Management (APM). + + Multiple system features depend on ACPI configuration tables. + CONFIG_ACPI is automatically selected by CONFIG_PCI_MMCONFIG, + CONFIG_X86_HT, CONFIG_HPET_TIMER, and many NUMA configurations. -config ACPI_BOOT - bool - depends on ACPI || X86_HT - default y - -config ACPI_INTERPRETER - bool - depends on ACPI - depends on !IA64_SGI_SN - default y + Linux/ACPI project home page: config ACPI_SLEEP - bool "Sleep States (EXPERIMENTAL)" + bool "Sleep States" depends on X86 && ACPI - depends on ACPI_INTERPRETER - depends on EXPERIMENTAL && PM + depends on PM default y ---help--- - This option adds support for ACPI suspend states. + This option adds support for ACPI sleep states. - With this option, you will be able to put the system "to sleep". + With this option, you will be able to suspend and resume the system. Sleep states are low power states for the system and devices. All of the system operating state is saved to either memory or disk (depending on the state), to allow the system to resume operation quickly at your request. - Although this option sounds really nifty, barely any of the device - drivers have been converted to the new driver model and hence few - have proper power management support. - - This option is not recommended for anyone except those doing driver - power management development. + The ability to successfully suspend/resume depends largely on + the device drivers that are in use. config ACPI_SLEEP_PROC_FS bool @@ -81,7 +51,7 @@ config ACPI_AC tristate "AC Adapter" depends on X86 - depends on ACPI_INTERPRETER + depends on ACPI default m help This driver adds support for the AC Adapter object, which indicates @@ -91,7 +61,7 @@ config ACPI_BATTERY tristate "Battery" depends on X86 - depends on ACPI_INTERPRETER + depends on ACPI default m help This driver adds support for battery information through @@ -100,8 +70,7 @@ config ACPI_BUTTON tristate "Button" - depends on ACPI_INTERPRETER - depends on !IA64_SGI_SN + depends on ACPI default m help This driver registers for events based on buttons, such as the @@ -112,8 +81,7 @@ config ACPI_FAN tristate "Fan" - depends on ACPI_INTERPRETER - depends on !IA64_SGI_SN + depends on ACPI default m help This driver adds support for ACPI fan devices, allowing user-mode @@ -121,8 +89,7 @@ config ACPI_PROCESSOR tristate "Processor" - depends on ACPI_INTERPRETER - depends on !IA64_SGI_SN + depends on ACPI default m help This driver installs ACPI as the idle handler for Linux, and uses @@ -141,7 +108,7 @@ config ACPI_NUMA bool "NUMA support" - depends on ACPI_INTERPRETER + depends on ACPI depends on NUMA depends on IA64 default y if IA64_GENERIC || IA64_SGI_SN2 @@ -149,7 +116,8 @@ config ACPI_ASUS tristate "ASUS/Medion Laptop Extras" depends on X86 - depends on ACPI_INTERPRETER + depends on !X86_64 + depends on ACPI default m ---help--- This driver provides support for extra features of ACPI-compatible @@ -179,7 +147,8 @@ config ACPI_TOSHIBA tristate "Toshiba Laptop Extras" depends on X86 - depends on ACPI_INTERPRETER + depends on !X86_64 + depends on ACPI default m ---help--- This driver adds support for access to certain system settings @@ -206,55 +175,32 @@ config ACPI_DEBUG bool "Debug Statements" - depends on ACPI_INTERPRETER - depends on !IA64_SGI_SN + depends on ACPI default n help The ACPI driver can optionally report errors with a great deal of verbosity. Saying Y enables these statements. This will increase your kernel size by around 50K. -config ACPI_BUS - bool - depends on ACPI_INTERPRETER - depends on !IA64_SGI_SN - default y - config ACPI_EC bool depends on X86 - depends on ACPI_INTERPRETER + depends on ACPI default y help This driver is required on some systems for the proper operation of the battery and thermal drivers. If you are compiling for a mobile system, say Y. -config ACPI_POWER - bool - depends on ACPI_INTERPRETER - depends on !IA64_SGI_SN - default y - config ACPI_PCI bool - depends on ACPI_INTERPRETER - depends on !IA64_SGI_SN + depends on ACPI default PCI -config ACPI_SYSTEM - bool - depends on ACPI_INTERPRETER - depends on !IA64_SGI_SN - default y - help - This driver will enable your system to shut down using ACPI, and - dump your ACPI DSDT table using /proc/acpi/dsdt. - config X86_PM_TIMER bool "Power Management Timer Support" depends on X86 && ACPI - depends on ACPI_BOOT && EXPERIMENTAL + depends on EXPERIMENTAL depends on !X86_64 default n help diff -Nru a/drivers/acpi/Makefile b/drivers/acpi/Makefile --- a/drivers/acpi/Makefile 2004-08-30 17:15:41 -07:00 +++ b/drivers/acpi/Makefile 2004-08-30 17:15:41 -07:00 @@ -12,18 +12,18 @@ EXTRA_CFLAGS += $(ACPI_CFLAGS) -obj-$(CONFIG_ACPI) := acpi_ksyms.o +obj-y := acpi_ksyms.o # # ACPI Boot-Time Table Parsing # -obj-$(CONFIG_ACPI_BOOT) += tables.o -obj-$(CONFIG_ACPI_INTERPRETER) += blacklist.o +obj-y += tables.o +obj-y += blacklist.o # # ACPI Core Subsystem (Interpreter) # -obj-$(CONFIG_ACPI_INTERPRETER) += osl.o utils.o \ +obj-y += osl.o utils.o \ dispatcher/ events/ executer/ hardware/ \ namespace/ parser/ resources/ tables/ \ utilities/ @@ -31,20 +31,21 @@ # # ACPI Bus and Device Drivers # -obj-$(CONFIG_ACPI_BUS) += sleep/ -obj-$(CONFIG_ACPI_BUS) += bus.o +obj-y += sleep/ +obj-y += bus.o obj-$(CONFIG_ACPI_AC) += ac.o obj-$(CONFIG_ACPI_BATTERY) += battery.o obj-$(CONFIG_ACPI_BUTTON) += button.o obj-$(CONFIG_ACPI_EC) += ec.o obj-$(CONFIG_ACPI_FAN) += fan.o obj-$(CONFIG_ACPI_PCI) += pci_root.o pci_link.o pci_irq.o pci_bind.o -obj-$(CONFIG_ACPI_POWER) += power.o +obj-y += power.o obj-$(CONFIG_ACPI_PROCESSOR) += processor.o obj-$(CONFIG_ACPI_THERMAL) += thermal.o -obj-$(CONFIG_ACPI_SYSTEM) += system.o event.o +obj-$(CONFIG_ACPI_DEBUG) += system.o +obj-y += event.o obj-$(CONFIG_ACPI_DEBUG) += debug.o obj-$(CONFIG_ACPI_NUMA) += numa.o obj-$(CONFIG_ACPI_ASUS) += asus_acpi.o obj-$(CONFIG_ACPI_TOSHIBA) += toshiba_acpi.o -obj-$(CONFIG_ACPI_BUS) += scan.o motherboard.o +obj-y += scan.o motherboard.o diff -Nru a/drivers/acpi/acpi_ksyms.c b/drivers/acpi/acpi_ksyms.c --- a/drivers/acpi/acpi_ksyms.c 2004-08-30 17:15:41 -07:00 +++ b/drivers/acpi/acpi_ksyms.c 2004-08-30 17:15:41 -07:00 @@ -29,8 +29,6 @@ #include -#ifdef CONFIG_ACPI_INTERPRETER - /* ACPI Debugger */ #ifdef ENABLE_DEBUGGER @@ -117,13 +115,9 @@ EXPORT_SYMBOL(acpi_evaluate_integer); EXPORT_SYMBOL(acpi_evaluate_reference); -#endif /*CONFIG_ACPI_INTERPRETER*/ - /* ACPI Bus Driver (acpi_bus.c) */ -#ifdef CONFIG_ACPI_BUS - EXPORT_SYMBOL(acpi_fadt); EXPORT_SYMBOL(acpi_walk_namespace); EXPORT_SYMBOL(acpi_root_dir); @@ -135,8 +129,6 @@ EXPORT_SYMBOL(acpi_bus_receive_event); EXPORT_SYMBOL(acpi_bus_register_driver); EXPORT_SYMBOL(acpi_bus_unregister_driver); - -#endif /*CONFIG_ACPI_BUS*/ /* ACPI PCI Driver (pci_irq.c) */ diff -Nru a/drivers/acpi/bus.c b/drivers/acpi/bus.c --- a/drivers/acpi/bus.c 2004-08-30 17:15:41 -07:00 +++ b/drivers/acpi/bus.c 2004-08-30 17:15:41 -07:00 @@ -598,6 +598,10 @@ ACPI_FUNCTION_TRACE("acpi_bus_init"); + /* enable workarounds, unless strict ACPI spec. compliance */ + if (!acpi_strict) + acpi_gbl_enable_interpreter_slack = TRUE; + status = acpi_initialize_subsystem(); if (ACPI_FAILURE(status)) { printk(KERN_ERR PREFIX "Unable to initialize the ACPI Interpreter\n"); diff -Nru a/drivers/acpi/dispatcher/dsmethod.c b/drivers/acpi/dispatcher/dsmethod.c --- a/drivers/acpi/dispatcher/dsmethod.c 2004-08-30 17:15:41 -07:00 +++ b/drivers/acpi/dispatcher/dsmethod.c 2004-08-30 17:15:41 -07:00 @@ -58,15 +58,12 @@ * * FUNCTION: acpi_ds_parse_method * - * PARAMETERS: obj_handle - Node of the method - * Level - Current nesting level - * Context - Points to a method counter - * return_value - Not used + * PARAMETERS: obj_handle - Method node * * RETURN: Status * - * DESCRIPTION: Call the parser and parse the AML that is - * associated with the method. + * DESCRIPTION: Call the parser and parse the AML that is associated with the + * method. * * MUTEX: Assumes parser is locked * @@ -191,8 +188,6 @@ * increments the thread count, and waits at the method semaphore * for clearance to execute. * - * MUTEX: Locks/unlocks parser. - * ******************************************************************************/ acpi_status @@ -251,7 +246,8 @@ * * FUNCTION: acpi_ds_call_control_method * - * PARAMETERS: walk_state - Current state of the walk + * PARAMETERS: Thread - Info for this thread + * this_walk_state - Current walk state * Op - Current Op to be walked * * RETURN: Status @@ -401,12 +397,13 @@ * * FUNCTION: acpi_ds_restart_control_method * - * PARAMETERS: walk_state - State of the method when it was preempted - * Op - Pointer to new current op + * PARAMETERS: walk_state - State for preempted method (caller) + * return_desc - Return value from the called method * * RETURN: Status * - * DESCRIPTION: Restart a method that was preempted + * DESCRIPTION: Restart a method that was preempted by another (nested) method + * invocation. Handle the return value (if any) from the callee. * ******************************************************************************/ @@ -421,17 +418,35 @@ ACPI_FUNCTION_TRACE_PTR ("ds_restart_control_method", walk_state); + ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, + "****Restart [%4.4s] Op %p return_value_from_callee %p\n", + (char *) &walk_state->method_node->name, walk_state->method_call_op, + return_desc)); + + ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, + " return_from_this_method_used?=%X res_stack %p Walk %p\n", + walk_state->return_used, + walk_state->results, walk_state)); + + /* Did the called method return a value? */ + if (return_desc) { + /* Are we actually going to use the return value? */ + if (walk_state->return_used) { - /* - * Get the return value (if any) from the previous method. - * NULL if no return value - */ + /* Save the return value from the previous method */ + status = acpi_ds_result_push (return_desc, walk_state); if (ACPI_FAILURE (status)) { acpi_ut_remove_reference (return_desc); return_ACPI_STATUS (status); } + + /* + * Save as THIS method's return value in case it is returned + * immediately to yet another method + */ + walk_state->return_desc = return_desc; } else { /* @@ -441,11 +456,6 @@ acpi_ut_remove_reference (return_desc); } } - - ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, - "Method=%p Return=%p return_used?=%X res_stack=%p State=%p\n", - walk_state->method_call_op, return_desc, walk_state->return_used, - walk_state->results, walk_state)); return_ACPI_STATUS (AE_OK); } diff -Nru a/drivers/acpi/dispatcher/dsutils.c b/drivers/acpi/dispatcher/dsutils.c --- a/drivers/acpi/dispatcher/dsutils.c 2004-08-30 17:15:41 -07:00 +++ b/drivers/acpi/dispatcher/dsutils.c 2004-08-30 17:15:41 -07:00 @@ -60,11 +60,10 @@ * * FUNCTION: acpi_ds_is_result_used * - * PARAMETERS: Op - * result_obj - * walk_state + * PARAMETERS: Op - Current Op + * walk_state - Current State * - * RETURN: Status + * RETURN: TRUE if result is used, FALSE otherwise * * DESCRIPTION: Check if a result object will be used by the parent * @@ -89,18 +88,39 @@ } /* - * If there is no parent, the result can't possibly be used! - * (An executing method typically has no parent, since each - * method is parsed separately) However, a method that is - * invoked from another method has a parent. + * If there is no parent, we are executing at the method level. + * An executing method typically has no parent, since each method + * is parsed separately. */ if (!op->common.parent) { + /* + * If this is the last statement in the method, we know it is not a + * Return() operator (would not come here.) The following code is the + * optional support for a so-called "implicit return". Some AML code + * assumes that the last value of the method is "implicitly" returned + * to the caller. Just save the last result as the return value. + * NOTE: this is optional because the ASL language does not actually + * support this behavior. + */ + if ((acpi_gbl_enable_interpreter_slack) && + (walk_state->parser_state.aml >= walk_state->parser_state.aml_end)) { + ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, + "Result of [%s] will be implicitly returned\n", + acpi_ps_get_opcode_name (op->common.aml_opcode))); + + /* Use the top of the result stack as the implicit return value */ + + walk_state->return_desc = walk_state->results->results.obj_desc[0]; + return_VALUE (TRUE); + } + + /* No parent, the return value cannot possibly be used */ + return_VALUE (FALSE); } - /* - * Get info on the parent. The root Op is AML_SCOPE - */ + /* Get info on the parent. The root_op is AML_SCOPE */ + parent_info = acpi_ps_get_opcode_info (op->common.parent->common.aml_opcode); if (parent_info->class == AML_CLASS_UNKNOWN) { ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unknown parent opcode. Op=%p\n", op)); @@ -204,9 +224,9 @@ * * FUNCTION: acpi_ds_delete_result_if_not_used * - * PARAMETERS: Op - * result_obj - * walk_state + * PARAMETERS: Op - Current parse Op + * result_obj - Result of the operation + * walk_state - Current state * * RETURN: Status * @@ -338,8 +358,9 @@ * * FUNCTION: acpi_ds_create_operand * - * PARAMETERS: walk_state - * Arg + * PARAMETERS: walk_state - Current walk state + * Arg - Parse object for the argument + * arg_index - Which argument (zero based) * * RETURN: Status * diff -Nru a/drivers/acpi/events/evgpe.c b/drivers/acpi/events/evgpe.c --- a/drivers/acpi/events/evgpe.c 2004-08-30 17:15:41 -07:00 +++ b/drivers/acpi/events/evgpe.c 2004-08-30 17:15:41 -07:00 @@ -102,6 +102,8 @@ * FUNCTION: acpi_ev_update_gpe_enable_masks * * PARAMETERS: gpe_event_info - GPE to update + * Type - What to do: ACPI_GPE_DISABLE or + * ACPI_GPE_ENABLE * * RETURN: Status * @@ -166,6 +168,8 @@ * FUNCTION: acpi_ev_enable_gpe * * PARAMETERS: gpe_event_info - GPE to enable + * write_to_hardware - Enable now, or just mark data structs + * (WAKE GPEs should be deferred) * * RETURN: Status * @@ -707,7 +711,7 @@ #ifdef ACPI_GPE_NOTIFY_CHECK /******************************************************************************* - * NOT USED, PROTOTYPE ONLY AND WILL PROBABLY BE REMOVED + * TBD: NOT USED, PROTOTYPE ONLY AND WILL PROBABLY BE REMOVED * * FUNCTION: acpi_ev_check_for_wake_only_gpe * diff -Nru a/drivers/acpi/events/evmisc.c b/drivers/acpi/events/evmisc.c --- a/drivers/acpi/events/evmisc.c 2004-08-30 17:15:41 -07:00 +++ b/drivers/acpi/events/evmisc.c 2004-08-30 17:15:41 -07:00 @@ -88,9 +88,10 @@ * * FUNCTION: acpi_ev_queue_notify_request * - * PARAMETERS: + * PARAMETERS: Node - NS node for the notified object + * notify_value - Value from the Notify() request * - * RETURN: None. + * RETURN: Status * * DESCRIPTION: Dispatch a device notification event to a previously * installed handler. @@ -143,9 +144,8 @@ notify_value)); } - /* - * Get the notify object attached to the NS Node - */ + /* Get the notify object attached to the NS Node */ + obj_desc = acpi_ns_get_attached_object (node); if (obj_desc) { /* We have the notify object, Get the right handler */ @@ -193,8 +193,10 @@ } if (!handler_obj) { - /* There is no per-device notify handler for this device */ - + /* + * There is no per-device notify handler for this device. + * This may or may not be a problem. + */ ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "No notify handler for Notify(%4.4s, %X) node %p\n", acpi_ut_get_node_name (node), notify_value, node)); @@ -208,7 +210,7 @@ * * FUNCTION: acpi_ev_notify_dispatch * - * PARAMETERS: + * PARAMETERS: Context - To be passsed to the notify handler * * RETURN: None. * @@ -275,6 +277,8 @@ * * FUNCTION: acpi_ev_global_lock_thread * + * PARAMETERS: Context - From thread interface, not used + * * RETURN: None * * DESCRIPTION: Invoked by SCI interrupt handler upon acquisition of the @@ -308,7 +312,9 @@ * * FUNCTION: acpi_ev_global_lock_handler * - * RETURN: Status + * PARAMETERS: Context - From thread interface, not used + * + * RETURN: ACPI_INTERRUPT_HANDLED or ACPI_INTERRUPT_NOT_HANDLED * * DESCRIPTION: Invoked directly from the SCI handler when a global lock * release interrupt occurs. Grab the global lock and queue @@ -355,6 +361,8 @@ * * FUNCTION: acpi_ev_init_global_lock_handler * + * PARAMETERS: None + * * RETURN: Status * * DESCRIPTION: Install a handler for the global lock release event @@ -394,6 +402,8 @@ * * FUNCTION: acpi_ev_acquire_global_lock * + * PARAMETERS: Timeout - Max time to wait for the lock, in millisec. + * * RETURN: Status * * DESCRIPTION: Attempt to gain ownership of the Global Lock. @@ -460,6 +470,10 @@ /******************************************************************************* * * FUNCTION: acpi_ev_release_global_lock + * + * PARAMETERS: None + * + * RETURN: Status * * DESCRIPTION: Releases ownership of the Global Lock. * diff -Nru a/drivers/acpi/events/evregion.c b/drivers/acpi/events/evregion.c --- a/drivers/acpi/events/evregion.c 2004-08-30 17:15:41 -07:00 +++ b/drivers/acpi/events/evregion.c 2004-08-30 17:15:41 -07:00 @@ -180,7 +180,7 @@ * FUNCTION: acpi_ev_execute_reg_method * * PARAMETERS: region_obj - Object structure - * Function - On (1) or Off (0) + * Function - Passed to _REG: On (1) or Off (0) * * RETURN: Status * @@ -232,7 +232,7 @@ goto cleanup; } - /* Set up the parameter objects */ + /* Setup the parameter objects */ params[0]->integer.value = region_obj->region.space_id; params[1]->integer.value = function; @@ -262,7 +262,6 @@ * FUNCTION: acpi_ev_address_space_dispatch * * PARAMETERS: region_obj - Internal region object - * space_id - ID of the address space (0-255) * Function - Read or Write operation * Address - Where in the space to read or write * bit_width - Field width in bits (8, 16, 32, or 64) @@ -425,8 +424,8 @@ * * FUNCTION: acpi_ev_detach_region * - * PARAMETERS: region_obj - Region Object - * acpi_ns_is_locked - Namespace Region Already Locked? + * PARAMETERS: region_obj - Region Object + * acpi_ns_is_locked - Namespace Region Already Locked? * * RETURN: None * @@ -560,9 +559,9 @@ * * FUNCTION: acpi_ev_attach_region * - * PARAMETERS: handler_obj - Handler Object - * region_obj - Region Object - * acpi_ns_is_locked - Namespace Region Already Locked? + * PARAMETERS: handler_obj - Handler Object + * region_obj - Region Object + * acpi_ns_is_locked - Namespace Region Already Locked? * * RETURN: None * @@ -971,7 +970,7 @@ * * RETURN: Status * - * DESCRIPTION: Run _REG methods for the Space ID; + * DESCRIPTION: Run all _REG methods for the input Space ID; * Note: assumes namespace is locked, or system init time. * ******************************************************************************/ diff -Nru a/drivers/acpi/events/evrgnini.c b/drivers/acpi/events/evrgnini.c --- a/drivers/acpi/events/evrgnini.c 2004-08-30 17:15:40 -07:00 +++ b/drivers/acpi/events/evrgnini.c 2004-08-30 17:15:40 -07:00 @@ -54,7 +54,7 @@ * * FUNCTION: acpi_ev_system_memory_region_setup * - * PARAMETERS: region_obj - Region we are interested in + * PARAMETERS: Handle - Region we are interested in * Function - Start or stop * handler_context - Address space handler context * region_context - Region specific context @@ -108,7 +108,7 @@ * * FUNCTION: acpi_ev_io_space_region_setup * - * PARAMETERS: region_obj - Region we are interested in + * PARAMETERS: Handle - Region we are interested in * Function - Start or stop * handler_context - Address space handler context * region_context - Region specific context @@ -144,7 +144,7 @@ * * FUNCTION: acpi_ev_pci_config_region_setup * - * PARAMETERS: region_obj - Region we are interested in + * PARAMETERS: Handle - Region we are interested in * Function - Start or stop * handler_context - Address space handler context * region_context - Region specific context @@ -317,7 +317,7 @@ * * FUNCTION: acpi_ev_pci_bar_region_setup * - * PARAMETERS: region_obj - Region we are interested in + * PARAMETERS: Handle - Region we are interested in * Function - Start or stop * handler_context - Address space handler context * region_context - Region specific context @@ -348,7 +348,7 @@ * * FUNCTION: acpi_ev_cmos_region_setup * - * PARAMETERS: region_obj - Region we are interested in + * PARAMETERS: Handle - Region we are interested in * Function - Start or stop * handler_context - Address space handler context * region_context - Region specific context @@ -379,7 +379,7 @@ * * FUNCTION: acpi_ev_default_region_setup * - * PARAMETERS: region_obj - Region we are interested in + * PARAMETERS: Handle - Region we are interested in * Function - Start or stop * handler_context - Address space handler context * region_context - Region specific context diff -Nru a/drivers/acpi/events/evxface.c b/drivers/acpi/events/evxface.c --- a/drivers/acpi/events/evxface.c 2004-08-30 17:15:41 -07:00 +++ b/drivers/acpi/events/evxface.c 2004-08-30 17:15:41 -07:00 @@ -359,6 +359,7 @@ * ACPI_DEVICE_NOTIFY: driver_handler (80-ff) * ACPI_ALL_NOTIFY: both system and device * Handler - Address of the handler + * * RETURN: Status * * DESCRIPTION: Remove a handler for notifies on an ACPI device @@ -401,9 +402,8 @@ goto unlock_and_exit; } - /* - * Root Object - */ + /* Root Object */ + if (device == ACPI_ROOT_OBJECT) { ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Removing notify handler for ROOT object.\n")); @@ -437,9 +437,8 @@ } } - /* - * All Other Objects - */ + /* All Other Objects */ + else { /* Notifies allowed on this object? */ diff -Nru a/drivers/acpi/executer/exfldio.c b/drivers/acpi/executer/exfldio.c --- a/drivers/acpi/executer/exfldio.c 2004-08-30 17:15:41 -07:00 +++ b/drivers/acpi/executer/exfldio.c 2004-08-30 17:15:41 -07:00 @@ -130,7 +130,7 @@ if (rgn_desc->region.length < (obj_desc->common_field.base_byte_offset + field_datum_byte_offset + obj_desc->common_field.access_byte_width)) { - if (acpi_gbl_enable_interpeter_slack) { + if (acpi_gbl_enable_interpreter_slack) { /* * Slack mode only: We will go ahead and allow access to this * field if it is within the region length rounded up to the next @@ -169,40 +169,7 @@ field_datum_byte_offset, obj_desc->common_field.access_byte_width, acpi_ut_get_node_name (rgn_desc->region.node), rgn_desc->region.length)); - if (!acpi_strict) { - /* - * Allow access to the field if it is within the region size - * rounded up to a multiple of the access byte width. This - * overcomes "off-by-one" programming errors in the AML often - * found in Toshiba laptops. These errors were allowed by - * the Microsoft ASL compiler. - */ - u32 rounded_length = ACPI_ROUND_UP(rgn_desc->region.length, - obj_desc->common_field.access_byte_width); - - if (rounded_length < (obj_desc->common_field.base_byte_offset - + field_datum_byte_offset - + obj_desc->common_field.access_byte_width)) { - return_ACPI_STATUS (AE_AML_REGION_LIMIT); - } else { - static int warn_once = 1; - if (warn_once) { - // Could also associate a flag with each field, and - // warn once for each field. - ACPI_REPORT_WARNING(( - "The ACPI AML in your computer contains errors, " - "please nag the manufacturer to correct it.\n")); - ACPI_REPORT_WARNING(( - "Allowing relaxed access to fields; " - "turn on CONFIG_ACPI_DEBUG for details.\n")); - warn_once = 0; - } - return_ACPI_STATUS (AE_OK); - } - } - else { - return_ACPI_STATUS (AE_AML_REGION_LIMIT); - } + return_ACPI_STATUS (AE_AML_REGION_LIMIT); } return_ACPI_STATUS (AE_OK); diff -Nru a/drivers/acpi/hardware/hwgpe.c b/drivers/acpi/hardware/hwgpe.c --- a/drivers/acpi/hardware/hwgpe.c 2004-08-30 17:15:40 -07:00 +++ b/drivers/acpi/hardware/hwgpe.c 2004-08-30 17:15:40 -07:00 @@ -96,7 +96,7 @@ * * PARAMETERS: gpe_event_info - Info block for the GPE to be cleared * - * RETURN: status_status + * RETURN: Status * * DESCRIPTION: Clear the status bit for a single GPE. * diff -Nru a/drivers/acpi/hardware/hwregs.c b/drivers/acpi/hardware/hwregs.c --- a/drivers/acpi/hardware/hwregs.c 2004-08-30 17:15:41 -07:00 +++ b/drivers/acpi/hardware/hwregs.c 2004-08-30 17:15:41 -07:00 @@ -249,8 +249,8 @@ * return_value - Value that was read from the register * Flags - Lock the hardware or not * - * RETURN: Value is read from specified Register. Value returned is - * normalized to bit0 (is shifted all the way right) + * RETURN: Status and the value read from specified Register. Value + * returned is normalized to bit0 (is shifted all the way right) * * DESCRIPTION: ACPI bit_register read function. * @@ -284,6 +284,8 @@ } } + /* Read from the register */ + status = acpi_hw_register_read (ACPI_MTX_DO_NOT_LOCK, bit_reg_info->parent_register, ®ister_value); @@ -313,10 +315,10 @@ * * PARAMETERS: register_id - ID of ACPI bit_register to access * Value - (only used on write) value to write to the - * Register, NOT pre-normalized to the bit pos. + * Register, NOT pre-normalized to the bit pos * Flags - Lock the hardware or not * - * RETURN: None + * RETURN: Status * * DESCRIPTION: ACPI Bit Register write function. * @@ -461,10 +463,11 @@ * * FUNCTION: acpi_hw_register_read * - * PARAMETERS: use_lock - Mutex hw access. - * register_id - register_iD + Offset. + * PARAMETERS: use_lock - Mutex hw access + * register_id - register_iD + Offset + * return_value - Value that was read from the register * - * RETURN: Value read or written. + * RETURN: Status and the value read. * * DESCRIPTION: Acpi register read function. Registers are read at the * given offset. @@ -572,10 +575,11 @@ * * FUNCTION: acpi_hw_register_write * - * PARAMETERS: use_lock - Mutex hw access. - * register_id - register_iD + Offset. + * PARAMETERS: use_lock - Mutex hw access + * register_id - register_iD + Offset + * Value - The value to write * - * RETURN: Value read or written. + * RETURN: Status * * DESCRIPTION: Acpi register Write function. Registers are written at the * given offset. @@ -691,11 +695,11 @@ * * PARAMETERS: Width - 8, 16, or 32 * Value - Where the value is returned - * Register - GAS register structure + * Reg - GAS register structure * * RETURN: Status * - * DESCRIPTION: Read from either memory, IO, or PCI config space. + * DESCRIPTION: Read from either memory or IO space. * ******************************************************************************/ @@ -705,8 +709,6 @@ u32 *value, struct acpi_generic_address *reg) { - struct acpi_pci_id pci_id; - u16 pci_register; acpi_status status; @@ -725,8 +727,8 @@ *value = 0; /* - * Three address spaces supported: - * Memory, IO, or PCI_Config. + * Two address spaces supported: Memory or IO. + * PCI_Config is not supported here because the GAS struct is insufficient */ switch (reg->address_space_id) { case ACPI_ADR_SPACE_SYSTEM_MEMORY: @@ -744,19 +746,6 @@ break; - case ACPI_ADR_SPACE_PCI_CONFIG: - - pci_id.segment = 0; - pci_id.bus = 0; - pci_id.device = ACPI_PCI_DEVICE (reg->address); - pci_id.function = ACPI_PCI_FUNCTION (reg->address); - pci_register = (u16) ACPI_PCI_REGISTER (reg->address); - - status = acpi_os_read_pci_configuration (&pci_id, pci_register, - value, width); - break; - - default: ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unsupported address space: %X\n", reg->address_space_id)); @@ -778,11 +767,11 @@ * * PARAMETERS: Width - 8, 16, or 32 * Value - To be written - * Register - GAS register structure + * Reg - GAS register structure * * RETURN: Status * - * DESCRIPTION: Write to either memory, IO, or PCI config space. + * DESCRIPTION: Write to either memory or IO space. * ******************************************************************************/ @@ -792,8 +781,6 @@ u32 value, struct acpi_generic_address *reg) { - struct acpi_pci_id pci_id; - u16 pci_register; acpi_status status; @@ -811,8 +798,8 @@ } /* - * Three address spaces supported: - * Memory, IO, or PCI_Config. + * Two address spaces supported: Memory or IO. + * PCI_Config is not supported here because the GAS struct is insufficient */ switch (reg->address_space_id) { case ACPI_ADR_SPACE_SYSTEM_MEMORY: @@ -827,19 +814,6 @@ status = acpi_os_write_port ((acpi_io_address) reg->address, value, width); - break; - - - case ACPI_ADR_SPACE_PCI_CONFIG: - - pci_id.segment = 0; - pci_id.bus = 0; - pci_id.device = ACPI_PCI_DEVICE (reg->address); - pci_id.function = ACPI_PCI_FUNCTION (reg->address); - pci_register = (u16) ACPI_PCI_REGISTER (reg->address); - - status = acpi_os_write_pci_configuration (&pci_id, pci_register, - (acpi_integer) value, width); break; diff -Nru a/drivers/acpi/hardware/hwtimer.c b/drivers/acpi/hardware/hwtimer.c --- a/drivers/acpi/hardware/hwtimer.c 2004-08-30 17:15:40 -07:00 +++ b/drivers/acpi/hardware/hwtimer.c 2004-08-30 17:15:40 -07:00 @@ -52,11 +52,11 @@ * * FUNCTION: acpi_get_timer_resolution * - * PARAMETERS: none + * PARAMETERS: Resolution - Where the resolution is returned * - * RETURN: Number of bits of resolution in the PM Timer (24 or 32). + * RETURN: Status and timer resolution * - * DESCRIPTION: Obtains resolution of the ACPI PM Timer. + * DESCRIPTION: Obtains resolution of the ACPI PM Timer (24 or 32 bits). * ******************************************************************************/ @@ -86,11 +86,11 @@ * * FUNCTION: acpi_get_timer * - * PARAMETERS: none + * PARAMETERS: Ticks - Where the timer value is returned * - * RETURN: Current value of the ACPI PM Timer (in ticks). + * RETURN: Status and current ticks * - * DESCRIPTION: Obtains current value of ACPI PM Timer. + * DESCRIPTION: Obtains current value of ACPI PM Timer (in ticks). * ******************************************************************************/ @@ -118,11 +118,11 @@ * * FUNCTION: acpi_get_timer_duration * - * PARAMETERS: start_ticks - * end_ticks - * time_elapsed + * PARAMETERS: start_ticks - Starting timestamp + * end_ticks - End timestamp + * time_elapsed - Where the elapsed time is returned * - * RETURN: time_elapsed + * RETURN: Status and time_elapsed * * DESCRIPTION: Computes the time elapsed (in microseconds) between two * PM Timer time stamps, taking into account the possibility of @@ -136,7 +136,7 @@ * Note that this function accommodates only a single timer * rollover. Thus for 24-bit timers, this function should only * be used for calculating durations less than ~4.6 seconds - * (~20 minutes for 32-bit timers) -- calculations below + * (~20 minutes for 32-bit timers) -- calculations below: * * 2**24 Ticks / 3,600,000 Ticks/Sec = 4.66 sec * 2**32 Ticks / 3,600,000 Ticks/Sec = 1193 sec or 19.88 minutes @@ -164,7 +164,6 @@ /* * Compute Tick Delta: - * ------------------- * Handle (max one) timer rollovers on 24- versus 32-bit timers. */ if (start_ticks < end_ticks) { @@ -188,10 +187,7 @@ } /* - * Compute Duration: - * ----------------- - * - * Requires a 64-bit divide: + * Compute Duration (Requires a 64-bit divide): * * time_elapsed = (delta_ticks * 1000000) / PM_TIMER_FREQUENCY; */ diff -Nru a/drivers/acpi/numa.c b/drivers/acpi/numa.c --- a/drivers/acpi/numa.c 2004-08-30 17:15:41 -07:00 +++ b/drivers/acpi/numa.c 2004-08-30 17:15:41 -07:00 @@ -51,6 +51,7 @@ switch (header->type) { case ACPI_SRAT_PROCESSOR_AFFINITY: +#ifdef ACPI_DEBUG_OUTPUT { struct acpi_table_processor_affinity *p = (struct acpi_table_processor_affinity*) header; @@ -58,9 +59,11 @@ p->apic_id, p->lsapic_eid, p->proximity_domain, p->flags.enabled?"enabled":"disabled")); } +#endif /* ACPI_DEBUG_OUTPUT */ break; case ACPI_SRAT_MEMORY_AFFINITY: +#ifdef ACPI_DEBUG_OUTPUT { struct acpi_table_memory_affinity *p = (struct acpi_table_memory_affinity*) header; @@ -70,6 +73,7 @@ p->flags.enabled ? "enabled" : "disabled", p->flags.hot_pluggable ? " hot-pluggable" : "")); } +#endif /* ACPI_DEBUG_OUTPUT */ break; default: @@ -94,8 +98,6 @@ /* downcast just for %llu vs %lu for i386/ia64 */ localities = (u32) slit->localities; - printk(KERN_INFO PREFIX "SLIT localities %ux%u\n", localities, localities); - acpi_numa_slit_init(slit); return 0; @@ -103,7 +105,9 @@ static int __init -acpi_parse_processor_affinity (acpi_table_entry_header *header) +acpi_parse_processor_affinity ( + acpi_table_entry_header *header, + const unsigned long end) { struct acpi_table_processor_affinity *processor_affinity; @@ -121,7 +125,9 @@ static int __init -acpi_parse_memory_affinity (acpi_table_entry_header *header) +acpi_parse_memory_affinity ( + acpi_table_entry_header *header, + const unsigned long end) { struct acpi_table_memory_affinity *memory_affinity; @@ -147,8 +153,6 @@ return -EINVAL; srat = (struct acpi_table_srat *) __va(phys_addr); - - printk(KERN_INFO PREFIX "SRAT revision %d\n", srat->table_revision); return 0; } diff -Nru a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c --- a/drivers/acpi/pci_link.c 2004-08-30 17:15:40 -07:00 +++ b/drivers/acpi/pci_link.c 2004-08-30 17:15:40 -07:00 @@ -448,7 +448,7 @@ #define PIRQ_PENALTY_ISA_USED (16*16*16*16*16) #define PIRQ_PENALTY_ISA_ALWAYS (16*16*16*16*16*16) -static int __initdata acpi_irq_penalty[ACPI_MAX_IRQS] = { +static int acpi_irq_penalty[ACPI_MAX_IRQS] = { PIRQ_PENALTY_ISA_ALWAYS, /* IRQ0 timer */ PIRQ_PENALTY_ISA_ALWAYS, /* IRQ1 keyboard */ PIRQ_PENALTY_ISA_ALWAYS, /* IRQ2 cascade */ @@ -468,7 +468,7 @@ /* >IRQ15 */ }; -int +int __init acpi_irq_penalty_init(void) { struct list_head *node = NULL; diff -Nru a/drivers/acpi/tables.c b/drivers/acpi/tables.c --- a/drivers/acpi/tables.c 2004-08-30 17:15:41 -07:00 +++ b/drivers/acpi/tables.c 2004-08-30 17:15:41 -07:00 @@ -101,7 +101,7 @@ else name = header->signature; - printk(KERN_INFO PREFIX "%.4s (v%3.3d %6.6s %8.8s 0x%08x %.4s 0x%08x) @ 0x%p\n", + printk(KERN_DEBUG PREFIX "%.4s (v%3.3d %6.6s %8.8s 0x%08x %.4s 0x%08x) @ 0x%p\n", name, header->revision, header->oem_id, header->oem_table_id, header->oem_revision, header->asl_compiler_id, header->asl_compiler_revision, @@ -587,7 +587,7 @@ return -ENODEV; } - printk(KERN_INFO PREFIX "RSDP (v%3.3d %6.6s ) @ 0x%p\n", + printk(KERN_DEBUG PREFIX "RSDP (v%3.3d %6.6s ) @ 0x%p\n", rsdp->revision, rsdp->oem_id, (void *) rsdp_phys); if (rsdp->revision < 2) diff -Nru a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c --- a/drivers/char/ipmi/ipmi_si_intf.c 2004-08-30 17:15:40 -07:00 +++ b/drivers/char/ipmi/ipmi_si_intf.c 2004-08-30 17:15:40 -07:00 @@ -1321,7 +1321,7 @@ } -#ifdef CONFIG_ACPI_INTERPRETER +#ifdef CONFIG_ACPI #include @@ -1370,7 +1370,7 @@ status = acpi_install_gpe_handler(NULL, info->irq, ACPI_GPE_LEVEL_TRIGGERED, - ipmi_acpi_gpe, + &ipmi_acpi_gpe, info); if (status != AE_OK) { printk(KERN_WARNING @@ -1390,7 +1390,7 @@ if (!info->irq) return; - acpi_remove_gpe_handler(NULL, info->irq, ipmi_acpi_gpe); + acpi_remove_gpe_handler(NULL, info->irq, &ipmi_acpi_gpe); } /* @@ -1985,7 +1985,7 @@ rv = try_init_mem(intf_num, &new_smi); if (rv) rv = try_init_port(intf_num, &new_smi); -#ifdef CONFIG_ACPI_INTERPRETER +#ifdef CONFIG_ACPI if ((rv) && (si_trydefaults)) { rv = try_init_acpi(intf_num, &new_smi); } diff -Nru a/include/acpi/acconfig.h b/include/acpi/acconfig.h --- a/include/acpi/acconfig.h 2004-08-30 17:15:41 -07:00 +++ b/include/acpi/acconfig.h 2004-08-30 17:15:41 -07:00 @@ -64,7 +64,7 @@ /* Version string */ -#define ACPI_CA_VERSION 0x20040715 +#define ACPI_CA_VERSION 0x20040816 /* * OS name, used for the _OS object. The _OS object is essentially obsolete, diff -Nru a/include/acpi/acexcep.h b/include/acpi/acexcep.h --- a/include/acpi/acexcep.h 2004-08-30 17:15:40 -07:00 +++ b/include/acpi/acexcep.h 2004-08-30 17:15:40 -07:00 @@ -166,7 +166,7 @@ #define AE_AML_CIRCULAR_REFERENCE (acpi_status) (0x0020 | AE_CODE_AML) #define AE_AML_BAD_RESOURCE_LENGTH (acpi_status) (0x0021 | AE_CODE_AML) -#define AE_CODE_AML_MAX 0x0020 +#define AE_CODE_AML_MAX 0x0021 /* * Internal exceptions used for control diff -Nru a/include/acpi/acglobal.h b/include/acpi/acglobal.h --- a/include/acpi/acglobal.h 2004-08-30 17:15:40 -07:00 +++ b/include/acpi/acglobal.h 2004-08-30 17:15:40 -07:00 @@ -94,7 +94,7 @@ * interpreter strictly follows the ACPI specification. Setting to TRUE * allows the interpreter to forgive certain bad AML constructs. */ -ACPI_EXTERN u8 ACPI_INIT_GLOBAL (acpi_gbl_enable_interpeter_slack, FALSE); +ACPI_EXTERN u8 ACPI_INIT_GLOBAL (acpi_gbl_enable_interpreter_slack, FALSE); /* * Automatically serialize ALL control methods? Default is FALSE, meaning diff -Nru a/include/acpi/acmacros.h b/include/acpi/acmacros.h --- a/include/acpi/acmacros.h 2004-08-30 17:15:41 -07:00 +++ b/include/acpi/acmacros.h 2004-08-30 17:15:41 -07:00 @@ -364,24 +364,6 @@ #define ACPI_IS_OCTAL_DIGIT(d) (((char)(d) >= '0') && ((char)(d) <= '7')) -/* Macros for GAS addressing */ - -#if ACPI_MACHINE_WIDTH != 16 - -#define ACPI_PCI_DEVICE(a) (u16) ((ACPI_HIDWORD ((a))) & 0x0000FFFF) -#define ACPI_PCI_FUNCTION(a) (u16) ((ACPI_LODWORD ((a))) >> 16) -#define ACPI_PCI_REGISTER(a) (u16) ((ACPI_LODWORD ((a))) & 0x0000FFFF) - -#else - -/* No support for GAS and PCI IDs in 16-bit mode */ - -#define ACPI_PCI_FUNCTION(a) (u16) ((a) & 0xFFFF0000) -#define ACPI_PCI_DEVICE(a) (u16) ((a) & 0x0000FFFF) -#define ACPI_PCI_REGISTER(a) (u16) ((a) & 0x0000FFFF) - -#endif - /* Bitfields within ACPI registers */ diff -Nru a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h --- a/include/acpi/acpi_bus.h 2004-08-30 17:15:41 -07:00 +++ b/include/acpi/acpi_bus.h 2004-08-30 17:15:41 -07:00 @@ -60,7 +60,7 @@ struct acpi_handle_list *list); -#ifdef CONFIG_ACPI_BUS +#ifdef CONFIG_ACPI #include @@ -325,6 +325,6 @@ int acpi_create_dir(struct acpi_device *); void acpi_remove_dir(struct acpi_device *); -#endif /*CONFIG_ACPI_BUS*/ +#endif /* CONFIG_ACPI */ #endif /*__ACPI_BUS_H__*/ diff -Nru a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h --- a/include/acpi/acpi_drivers.h 2004-08-30 17:15:41 -07:00 +++ b/include/acpi/acpi_drivers.h 2004-08-30 17:15:41 -07:00 @@ -79,14 +79,12 @@ /* -------------------------------------------------------------------------- Power Resource -------------------------------------------------------------------------- */ - -#ifdef CONFIG_ACPI_POWER +#ifdef CONFIG_ACPI int acpi_enable_wakeup_device_power (struct acpi_device *dev); int acpi_disable_wakeup_device_power (struct acpi_device *dev); int acpi_power_get_inferred_state (struct acpi_device *device); int acpi_power_transition (struct acpi_device *device, int state); #endif - /* -------------------------------------------------------------------------- Embedded Controller diff -Nru a/include/asm-i386/acpi.h b/include/asm-i386/acpi.h --- a/include/asm-i386/acpi.h 2004-08-30 17:15:41 -07:00 +++ b/include/asm-i386/acpi.h 2004-08-30 17:15:41 -07:00 @@ -113,7 +113,7 @@ #define ACPI_PDC_EST_CAPABILITY_SMP 0xa #define ACPI_PDC_EST_CAPABILITY_MSR 0x1 -#ifdef CONFIG_ACPI_BOOT +#ifdef CONFIG_ACPI extern int acpi_lapic; extern int acpi_ioapic; extern int acpi_noirq; @@ -155,7 +155,7 @@ #endif -#else /* CONFIG_ACPI_BOOT */ +#else /* CONFIG_ACPI */ # define acpi_lapic 0 # define acpi_ioapic 0 diff -Nru a/include/asm-i386/fixmap.h b/include/asm-i386/fixmap.h --- a/include/asm-i386/fixmap.h 2004-08-30 17:15:40 -07:00 +++ b/include/asm-i386/fixmap.h 2004-08-30 17:15:40 -07:00 @@ -76,7 +76,7 @@ FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */ FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1, #endif -#ifdef CONFIG_ACPI_BOOT +#ifdef CONFIG_ACPI FIX_ACPI_BEGIN, FIX_ACPI_END = FIX_ACPI_BEGIN + FIX_ACPI_PAGES - 1, #endif diff -Nru a/include/asm-i386/io_apic.h b/include/asm-i386/io_apic.h --- a/include/asm-i386/io_apic.h 2004-08-30 17:15:41 -07:00 +++ b/include/asm-i386/io_apic.h 2004-08-30 17:15:41 -07:00 @@ -197,12 +197,12 @@ */ #define io_apic_assign_pci_irqs (mp_irq_entries && !skip_ioapic_setup) -#ifdef CONFIG_ACPI_BOOT +#ifdef CONFIG_ACPI extern int io_apic_get_unique_id (int ioapic, int apic_id); extern int io_apic_get_version (int ioapic); extern int io_apic_get_redir_entries (int ioapic); extern int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int active_high_low); -#endif /*CONFIG_ACPI_BOOT*/ +#endif /*C ONFIG_ACPI */ #else /* !CONFIG_X86_IO_APIC */ #define io_apic_assign_pci_irqs 0 diff -Nru a/include/asm-i386/mpspec.h b/include/asm-i386/mpspec.h --- a/include/asm-i386/mpspec.h 2004-08-30 17:15:40 -07:00 +++ b/include/asm-i386/mpspec.h 2004-08-30 17:15:40 -07:00 @@ -27,14 +27,14 @@ extern int pic_mode; extern int using_apic_timer; -#ifdef CONFIG_ACPI_BOOT +#ifdef CONFIG_ACPI extern void mp_register_lapic (u8 id, u8 enabled); extern void mp_register_lapic_address (u64 address); extern void mp_register_ioapic (u8 id, u32 address, u32 gsi_base); extern void mp_override_legacy_irq (u8 bus_irq, u8 polarity, u8 trigger, u32 gsi); extern void mp_config_acpi_legacy_irqs (void); extern void mp_register_gsi (u32 gsi, int edge_level, int active_high_low); -#endif /*CONFIG_ACPI_BOOT*/ +#endif /* CONFIG_ACPI */ #define PHYSID_ARRAY_SIZE BITS_TO_LONGS(MAX_APICS) diff -Nru a/include/asm-x86_64/acpi.h b/include/asm-x86_64/acpi.h --- a/include/asm-x86_64/acpi.h 2004-08-30 17:15:41 -07:00 +++ b/include/asm-x86_64/acpi.h 2004-08-30 17:15:41 -07:00 @@ -105,7 +105,7 @@ #define ACPI_PDC_EST_CAPABILITY_SMP 0xa #define ACPI_PDC_EST_CAPABILITY_MSR 0x1 -#ifdef CONFIG_ACPI_BOOT +#ifdef CONFIG_ACPI extern int acpi_lapic; extern int acpi_ioapic; extern int acpi_noirq; @@ -126,10 +126,10 @@ extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq); -#else /* !CONFIG_ACPI_BOOT */ +#else /* !CONFIG_ACPI */ #define acpi_lapic 0 #define acpi_ioapic 0 -#endif /* !CONFIG_ACPI_BOOT */ +#endif /* !CONFIG_ACPI */ #ifdef CONFIG_ACPI_PCI static inline void acpi_noirq_set(void) { acpi_noirq = 1; } diff -Nru a/include/asm-x86_64/io_apic.h b/include/asm-x86_64/io_apic.h --- a/include/asm-x86_64/io_apic.h 2004-08-30 17:15:40 -07:00 +++ b/include/asm-x86_64/io_apic.h 2004-08-30 17:15:40 -07:00 @@ -201,7 +201,7 @@ */ #define io_apic_assign_pci_irqs (mp_irq_entries && !skip_ioapic_setup) -#ifdef CONFIG_ACPI_BOOT +#ifdef CONFIG_ACPI extern int io_apic_get_unique_id (int ioapic, int apic_id); extern int io_apic_get_version (int ioapic); extern int io_apic_get_redir_entries (int ioapic); diff -Nru a/include/asm-x86_64/mpspec.h b/include/asm-x86_64/mpspec.h --- a/include/asm-x86_64/mpspec.h 2004-08-30 17:15:41 -07:00 +++ b/include/asm-x86_64/mpspec.h 2004-08-30 17:15:41 -07:00 @@ -180,7 +180,7 @@ extern unsigned long mp_lapic_addr; extern int pic_mode; -#ifdef CONFIG_ACPI_BOOT +#ifdef CONFIG_ACPI extern void mp_register_lapic (u8 id, u8 enabled); extern void mp_register_lapic_address (u64 address); diff -Nru a/include/linux/acpi.h b/include/linux/acpi.h --- a/include/linux/acpi.h 2004-08-30 17:15:40 -07:00 +++ b/include/linux/acpi.h 2004-08-30 17:15:40 -07:00 @@ -37,7 +37,7 @@ #include -#ifdef CONFIG_ACPI_BOOT +#ifdef CONFIG_ACPI enum acpi_irq_model_id { ACPI_IRQ_MODEL_PIC = 0, @@ -402,7 +402,7 @@ extern int sbf_port ; -#else /*!CONFIG_ACPI_BOOT*/ +#else /*!CONFIG_ACPI*/ #define acpi_mp_config 0 @@ -411,7 +411,7 @@ return 0; } -#endif /*!CONFIG_ACPI_BOOT*/ +#endif /*!CONFIG_ACPI*/ unsigned int acpi_register_gsi (u32 gsi, int edge_level, int active_high_low); int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); @@ -458,17 +458,17 @@ #endif /*CONFIG_ACPI_EC*/ -#ifdef CONFIG_ACPI_INTERPRETER +#ifdef CONFIG_ACPI int acpi_blacklisted(void); -#else /*!CONFIG_ACPI_INTERPRETER*/ +#else /*!CONFIG_ACPI*/ static inline int acpi_blacklisted(void) { return 0; } -#endif /*!CONFIG_ACPI_INTERPRETER*/ +#endif /* !CONFIG_ACPI */ #endif /*_LINUX_ACPI_H*/ diff -Nru a/sound/drivers/mpu401/mpu401.c b/sound/drivers/mpu401/mpu401.c --- a/sound/drivers/mpu401/mpu401.c 2004-08-30 17:15:41 -07:00 +++ b/sound/drivers/mpu401/mpu401.c 2004-08-30 17:15:41 -07:00 @@ -27,7 +27,7 @@ #include #include -#ifdef CONFIG_ACPI_BUS +#ifdef CONFIG_ACPI #include #endif #include @@ -35,7 +35,7 @@ #include #include -#ifdef CONFIG_ACPI_BUS +#ifdef CONFIG_ACPI #define USE_ACPI_PNP #endif @@ -68,7 +68,7 @@ module_param_array(irq, int, boot_devs, 0444); MODULE_PARM_DESC(irq, "IRQ # for MPU-401 device."); -#ifndef CONFIG_ACPI_BUS +#ifndef CONFIG_ACPI struct acpi_device; #endif