From d9c54c1d58d836c545e03cad78331b0168762003 Mon Sep 17 00:00:00 2001 From: Len Brown Date: Sun, 14 Sep 2003 16:34:00 -0400 Subject: [PATCH] sync 2.4.22 changes into 2.6 Note that this restores CONFIG_ACPI_HT_ONLY as a sub-set of CONFIG_ACPI rather than a dependency. --- arch/i386/Kconfig | 4 -- arch/i386/kernel/acpi/boot.c | 30 +++------- arch/i386/kernel/dmi_scan.c | 23 -------- arch/i386/kernel/mpparse.c | 8 +-- arch/i386/kernel/setup.c | 12 ++-- drivers/acpi/Kconfig | 107 +++++++++++++++++++---------------- drivers/acpi/Makefile | 2 +- include/asm-i386/acpi.h | 38 +++++++++---- include/linux/acpi.h | 16 +++++- init/do_mounts.c | 2 - init/do_mounts.h | 11 ---- 11 files changed, 116 insertions(+), 137 deletions(-) diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index 73a107d2209bb..b9f33bf91cae4 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig @@ -1204,10 +1204,6 @@ source "drivers/pnp/Kconfig" source "drivers/block/Kconfig" -config MOUNT_ROOT_FAILED_MSG - bool - default y - source "drivers/ide/Kconfig" source "drivers/scsi/Kconfig" diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c index 336b2088b8081..98b355c0bacfd 100644 --- a/arch/i386/kernel/acpi/boot.c +++ b/arch/i386/kernel/acpi/boot.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -41,6 +42,9 @@ extern int acpi_disabled; extern int acpi_ht; +int acpi_lapic = 0; +int acpi_ioapic = 0; + /* -------------------------------------------------------------------------- Boot-time Configuration -------------------------------------------------------------------------- */ @@ -90,8 +94,6 @@ char *__acpi_map_table(unsigned long phys, unsigned long size) #ifdef CONFIG_X86_LOCAL_APIC -int acpi_lapic; - static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE; @@ -158,8 +160,6 @@ acpi_parse_lapic_addr_ovr ( return 0; } -#ifdef CONFIG_ACPI - static int __init acpi_parse_lapic_nmi ( acpi_table_entry_header *header) @@ -178,15 +178,10 @@ acpi_parse_lapic_nmi ( return 0; } -#endif /*CONFIG_ACPI*/ #endif /*CONFIG_X86_LOCAL_APIC*/ -#ifdef CONFIG_X86_IO_APIC - -int acpi_ioapic; - -#ifdef CONFIG_ACPI +#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI_INTERPRETER) static int __init acpi_parse_ioapic ( @@ -248,7 +243,6 @@ acpi_parse_nmi_src ( return 0; } -#endif /*CONFIG_ACPI*/ #endif /*CONFIG_X86_IO_APIC*/ @@ -331,14 +325,12 @@ acpi_boot_init (void) if (result) return result; -#ifdef CONFIG_ACPI result = acpi_blacklisted(); if (result) { printk(KERN_WARNING PREFIX "BIOS listed in blacklist, disabling ACPI support\n"); acpi_disabled = 1; return result; } -#endif #ifdef CONFIG_X86_LOCAL_APIC @@ -352,7 +344,6 @@ acpi_boot_init (void) result = acpi_table_parse(ACPI_APIC, acpi_parse_madt); if (!result) { - printk(KERN_WARNING PREFIX "MADT not present\n"); return 0; } else if (result < 0) { @@ -389,21 +380,18 @@ acpi_boot_init (void) return result; } -#ifdef CONFIG_ACPI result = acpi_table_parse_madt(ACPI_MADT_LAPIC_NMI, acpi_parse_lapic_nmi); if (result < 0) { printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n"); /* TBD: Cleanup to allow fallback to MPS */ return result; } -#endif /*CONFIG_ACPI*/ acpi_lapic = 1; #endif /*CONFIG_X86_LOCAL_APIC*/ -#ifdef CONFIG_X86_IO_APIC -#ifdef CONFIG_ACPI +#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI_INTERPRETER) /* * I/O APIC @@ -423,7 +411,7 @@ acpi_boot_init (void) /* * if "noapic" boot option, don't look for IO-APICs */ - if (skip_ioapic_setup) { + if (ioapic_setup_disabled()) { printk(KERN_INFO PREFIX "Skipping IOAPIC probe " "due to 'noapic' option.\n"); return 1; @@ -460,15 +448,13 @@ acpi_boot_init (void) acpi_ioapic = 1; -#endif /*CONFIG_ACPI*/ -#endif /*CONFIG_X86_IO_APIC*/ - #ifdef CONFIG_X86_LOCAL_APIC if (acpi_lapic && acpi_ioapic) { smp_found_config = 1; clustered_apic_check(); } #endif +#endif /*CONFIG_X86_IO_APIC && CONFIG_ACPI_INTERPRETER*/ return 0; } diff --git a/arch/i386/kernel/dmi_scan.c b/arch/i386/kernel/dmi_scan.c index 8c4d7d5782a2b..e1217eae886e1 100644 --- a/arch/i386/kernel/dmi_scan.c +++ b/arch/i386/kernel/dmi_scan.c @@ -1111,26 +1111,3 @@ void __init dmi_scan_machine(void) EXPORT_SYMBOL(is_unsafe_smbus); -#ifdef CONFIG_MOUNT_ROOT_FAILED_MSG -/* - * mount_root_failed_msg() - * - * Called from mount_block_root() upon failure to mount root. - * architecture dependent to give different platforms - * the opportunity to print different handy messages - * On x86 this lives here b/c it dumps out some DMI info. - */ - -void -mount_root_failed_msg(void) -{ -#ifdef CONFIG_ACPI_BOOT - printk ("Try booting with pci=noacpi, acpi=ht, " - "or acpi=off on the command line.\n"); - printk ("If one helps, please report the following lines:\n"); - - dmi_dump_system(); -#endif -} -#endif /* CONFIG_MOUNT_ROOT_FAILED_MSG */ - diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c index 79666579a424c..8c955bd50e323 100644 --- a/arch/i386/kernel/mpparse.c +++ b/arch/i386/kernel/mpparse.c @@ -823,7 +823,7 @@ void __init mp_register_lapic ( MP_processor_info(&processor); } -#ifdef CONFIG_X86_IO_APIC +#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI_INTERPRETER) #define MP_ISA_BUS 0 #define MP_MAX_IOAPIC_PIN 127 @@ -1011,9 +1011,6 @@ void __init mp_config_acpi_legacy_irqs (void) panic("Max # of irq sources exceeded!\n"); } } -#endif /* CONFIG_X86_IO_APIC */ - -#ifdef CONFIG_ACPI /* Ensure the ACPI SCI interrupt level is active low, edge-triggered */ @@ -1068,7 +1065,6 @@ void __init mp_config_ioapic_for_sci(int irq) io_apic_set_pci_routing(ioapic, ioapic_pin, irq, 1, 1); // Active low, level triggered } -#endif /* CONFIG_ACPI */ #ifdef CONFIG_ACPI_PCI @@ -1148,5 +1144,5 @@ void __init mp_parse_prt (void) } #endif /*CONFIG_ACPI_PCI*/ - +#endif /*CONFIG_X86_IO_APIC && CONFIG_ACPI_INTERPRETER*/ #endif /*CONFIG_ACPI_BOOT*/ diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index 14ae8ca8887cd..66f7801fe51c6 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c @@ -62,7 +62,7 @@ struct cpuinfo_x86 boot_cpu_data = { 0, 0, 0, 0, -1, 1, 0, 0, -1 }; unsigned long mmu_cr4_features; EXPORT_SYMBOL_GPL(mmu_cr4_features); -#ifdef CONFIG_ACPI +#ifdef CONFIG_ACPI_INTERPRETER int acpi_disabled __initdata = 0; #else int acpi_disabled __initdata = 1; @@ -544,9 +544,8 @@ static void __init parse_cmdline_early (char ** cmdline_p) } /* disable IO-APIC */ - else if (!memcmp(from, "noapic", 6)) { - skip_ioapic_setup = 1; - } + else if (!memcmp(from, "noapic", 6)) + disable_ioapic_setup(); #endif /* @@ -1003,12 +1002,11 @@ void __init setup_arch(char **cmdline_p) generic_apic_probe(*cmdline_p); #endif -#ifdef CONFIG_ACPI_BOOT /* * Parse the ACPI tables for possible boot-time SMP configuration. */ - (void) acpi_boot_init(); -#endif + acpi_boot_init(); + #ifdef CONFIG_X86_LOCAL_APIC if (smp_found_config) get_smp_config(); diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index dda59f1d82f4c..6b9820dd31505 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -3,34 +3,13 @@ # menu "ACPI (Advanced Configuration and Power Interface) Support" - -config ACPI_HT - bool "ACPI Processor Enumeration for HT" - depends on X86 - default y - ---help--- - ACPI enumerates both logical (a.k.a. Hyper-Threaded -- HT) - and physical processors. It is designed to obsolete several older - specifications, including the MultiProcessor Specification (MPS), - which supported only physical processors. - - CONFIG_ACPI_HT includes the minimal ACPI boot-time code - necessary to enumerate logical processors and enable HT. - - CONFIG_ACPI includes CONFIG_ACPI_HT, plus IO APIC enumeration, - and the hooks to run the ACPI AML interpreter for run-time events. - - When CONFIG_ACPI is selected, the command-line option "acpi=ht" - is available to run just the ACPI boot-time code -- just as if - only CONFIG_ACPI_HT were selected. - - Note that "acpi=off" can be used to disable all ACPI code in the kernel. - -config ACPI - bool "Full ACPI Support" depends on !X86_VISWS depends on !IA64_HP_SIM - depends on IA64 || (X86 && ACPI_HT) + depends on IA64 || X86 + +config ACPI + bool "ACPI Support" + depends on IA64 || X86 default y ---help--- Advanced Configuration and Power Interface (ACPI) support for @@ -60,15 +39,48 @@ config ACPI available at: +config ACPI_HT_ONLY + bool "Restrict ACPI to minimum boot code to enable HT" + depends on X86 + depends on ACPI + depends on SMP + default n + ---help--- + ACPI enumerates both logical (a.k.a. Hyper-Threaded -- HT) + and physical processors. It is designed to obsolete several older + specifications, including the MultiProcessor Specification (MPS), + which supported only physical processors. + + CONFIG_ACPI_HT_ONLY includes just the minimal ACPI boot-time code + necessary to enumerate logical processors and enable HT. + + CONFIG_ACPI includes this, plus IO APIC enumeration, + and the hooks to run the ACPI AML interpreter for run-time events. + + When CONFIG_ACPI is selected, the command-line option "acpi=ht" + is available to run just the ACPI boot-time code -- just as if + only CONFIG_ACPI_HT_ONLY were selected. + + Note that "acpi=off" can be used to disable all ACPI code in the kernel. + + config ACPI_BOOT bool - depends on ACPI || ACPI_HT + depends on ACPI + default y + +config ACPI_INTERPRETER + bool + depends on ACPI + depends on !IA64_SGI_SN + depends on !ACPI_HT_ONLY default y config ACPI_SLEEP bool "Sleep States (EXPERIMENTAL)" depends on X86 && ACPI depends on EXPERIMENTAL + depends on ACPI_INTERPRETER default y ---help--- This option adds support for ACPI suspend states. @@ -93,7 +105,8 @@ config ACPI_SLEEP_PROC_FS config ACPI_AC tristate "AC Adapter" - depends on X86 && ACPI + depends on X86 + depends on ACPI_INTERPRETER default m help This driver adds support for the AC Adapter object, which indicates @@ -102,7 +115,8 @@ config ACPI_AC config ACPI_BATTERY tristate "Battery" - depends on X86 && ACPI + depends on X86 + depends on ACPI_INTERPRETER default m help This driver adds support for battery information through @@ -111,7 +125,7 @@ config ACPI_BATTERY config ACPI_BUTTON tristate "Button" - depends on ACPI + depends on ACPI_INTERPRETER depends on !IA64_SGI_SN default m help @@ -123,7 +137,7 @@ config ACPI_BUTTON config ACPI_FAN tristate "Fan" - depends on ACPI + depends on ACPI_INTERPRETER depends on !IA64_SGI_SN default m help @@ -132,7 +146,7 @@ config ACPI_FAN config ACPI_PROCESSOR tristate "Processor" - depends on ACPI + depends on ACPI_INTERPRETER depends on !IA64_SGI_SN default m help @@ -152,14 +166,15 @@ config ACPI_THERMAL config ACPI_NUMA bool "NUMA support" - depends on ACPI + depends on ACPI_INTERPRETER depends on NUMA depends on !X86_64 default y if IA64_GENERIC || IA64_SGI_SN2 config ACPI_ASUS tristate "ASUS/Medion Laptop Extras" - depends on X86 && ACPI + depends on X86 + depends on ACPI_INTERPRETER default m ---help--- This driver provides support for extra features of ACPI-compatible @@ -185,7 +200,8 @@ config ACPI_ASUS config ACPI_TOSHIBA tristate "Toshiba Laptop Extras" - depends on X86 && ACPI + depends on X86 + depends on ACPI_INTERPRETER default m ---help--- This driver adds support for access to certain system settings @@ -212,7 +228,7 @@ config ACPI_TOSHIBA config ACPI_DEBUG bool "Debug Statements" - depends on ACPI + depends on ACPI_INTERPRETER depends on !IA64_SGI_SN default n help @@ -222,19 +238,14 @@ config ACPI_DEBUG config ACPI_BUS bool - depends on ACPI - depends on !IA64_SGI_SN - default y - -config ACPI_INTERPRETER - bool - depends on ACPI + depends on ACPI_INTERPRETER depends on !IA64_SGI_SN default y config ACPI_EC bool - depends on X86 && ACPI + depends on X86 + depends on ACPI_INTERPRETER default y help This driver is required on some systems for the proper operation of @@ -243,19 +254,19 @@ config ACPI_EC config ACPI_POWER bool - depends on ACPI + depends on ACPI_INTERPRETER depends on !IA64_SGI_SN default y config ACPI_PCI bool - depends on ACPI + depends on ACPI_INTERPRETER depends on !IA64_SGI_SN default PCI config ACPI_SYSTEM bool - depends on ACPI + depends on ACPI_INTERPRETER depends on !IA64_SGI_SN default y help @@ -264,7 +275,7 @@ config ACPI_SYSTEM config ACPI_EFI bool - depends on ACPI + depends on ACPI_INTERPRETER depends on IA64 default y diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile index d16d4b876ad60..beb93c60d9f32 100644 --- a/drivers/acpi/Makefile +++ b/drivers/acpi/Makefile @@ -18,7 +18,7 @@ obj-$(CONFIG_ACPI) := acpi_ksyms.o # ACPI Boot-Time Table Parsing # obj-$(CONFIG_ACPI_BOOT) += tables.o -obj-$(CONFIG_ACPI) += blacklist.o +obj-$(CONFIG_ACPI_INTERPRETER) += blacklist.o # # ACPI Core Subsystem (Interpreter) diff --git a/include/asm-i386/acpi.h b/include/asm-i386/acpi.h index 350048b1f39ee..6b56aa3eaa39e 100644 --- a/include/asm-i386/acpi.h +++ b/include/asm-i386/acpi.h @@ -106,21 +106,37 @@ :"0"(n_hi), "1"(n_lo)) -#if defined(CONFIG_ACPI_BOOT) && defined(CONFIG_X86_LOCAL_APIC) - extern int acpi_lapic; -#else - #define acpi_lapic 0 -#endif +#ifdef CONFIG_ACPI_BOOT +extern int acpi_lapic; +extern int acpi_ioapic; -#if defined(CONFIG_ACPI_BOOT) && defined(CONFIG_X86_IO_APIC) - extern int acpi_ioapic; -#else - #define acpi_ioapic 0 -#endif -#ifdef CONFIG_ACPI_BOOT /* Fixmap pages to reserve for ACPI boot-time tables (see fixmap.h) */ #define FIX_ACPI_PAGES 4 + +#ifdef CONFIG_X86_IO_APIC +extern int skip_ioapic_setup; + +static inline void disable_ioapic_setup(void) +{ + skip_ioapic_setup = 1; +} + +static inline int ioapic_setup_disabled(void) +{ + return skip_ioapic_setup; +} + +#else +static inline void disable_ioapic_setup(void) +{ } + +#endif + +#else /* CONFIG_ACPI_BOOT */ +# define acpi_lapic 0 +# define acpi_ioapic 0 + #endif #ifdef CONFIG_ACPI_SLEEP diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 3fd526160f1a7..8e4eba21e7ea7 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -373,6 +373,11 @@ extern int acpi_mp_config; #define acpi_mp_config 0 +static inline int acpi_boot_init(void) +{ + return 0; +} + #endif /*!CONFIG_ACPI_BOOT*/ @@ -419,10 +424,17 @@ int ec_write(u8 addr, u8 val); #endif /*CONFIG_ACPI_EC*/ -#ifdef CONFIG_ACPI +#ifdef CONFIG_ACPI_INTERPRETER int acpi_blacklisted(void); -#endif /*CONFIG_ACPI*/ +#else /*!CONFIG_ACPI_INTERPRETER*/ + +static inline int acpi_blacklisted(void) +{ + return 0; +} + +#endif /*!CONFIG_ACPI_INTERPRETER*/ #endif /*_LINUX_ACPI_H*/ diff --git a/init/do_mounts.c b/init/do_mounts.c index 9d7e30252c465..d9f9d10d68c89 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -274,8 +274,6 @@ retry: root_device_name, b); printk("Please append a correct \"root=\" boot option\n"); - mount_root_failed_msg(); /* architecture dependent */ - panic("VFS: Unable to mount root fs on %s", b); } panic("VFS: Unable to mount root fs on %s", __bdevname(ROOT_DEV, b)); diff --git a/init/do_mounts.h b/init/do_mounts.h index 7780dd759d9e5..259de67dd0fa3 100644 --- a/init/do_mounts.h +++ b/init/do_mounts.h @@ -79,14 +79,3 @@ void md_run_setup(void); static inline void md_run_setup(void) {} #endif - -#ifdef CONFIG_MOUNT_ROOT_FAILED_MSG - -void mount_root_failed_msg(void); - -#else - -static inline void mount_root_failed_msg(void) {} - -#endif - -- 2.53.0