]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ACPI: Kconfig: remove CONFIG_ACPI_SLEEP from source
authorLen Brown <len.brown@intel.com>
Wed, 25 Jul 2007 02:26:33 +0000 (22:26 -0400)
committerLen Brown <len.brown@intel.com>
Wed, 25 Jul 2007 05:29:39 +0000 (01:29 -0400)
As it was a synonym for (CONFIG_ACPI && CONFIG_X86),
the ifdefs for it were more clutter than they were worth.

For ia64, just add a few stubs in anticipation of future
S3 or S4 support.

Signed-off-by: Len Brown <len.brown@intel.com>
20 files changed:
arch/i386/kernel/acpi/Makefile
arch/i386/kernel/setup.c
arch/i386/mm/init.c
arch/ia64/kernel/acpi.c
arch/x86_64/kernel/acpi/Makefile
arch/x86_64/kernel/acpi/sleep.c
arch/x86_64/kernel/head.S
arch/x86_64/kernel/setup.c
drivers/acpi/Kconfig
drivers/acpi/sleep/Makefile
drivers/acpi/sleep/main.c
drivers/acpi/sleep/poweroff.c
drivers/acpi/sleep/wakeup.c
include/acpi/acpi_drivers.h
include/asm-i386/acpi.h
include/asm-i386/suspend.h
include/asm-ia64/acpi.h
include/asm-x86_64/acpi.h
include/asm-x86_64/suspend.h
kernel/sysctl.c

index 7f7be01f44e66cd27257870d540ed38d3f1e1661..223f58fc9f46f32cff0d6e51bfe2438fb4072a34 100644 (file)
@@ -2,7 +2,7 @@ obj-$(CONFIG_ACPI)              += boot.o
 ifneq ($(CONFIG_PCI),)
 obj-$(CONFIG_X86_IO_APIC)      += earlyquirk.o
 endif
-obj-$(CONFIG_ACPI_SLEEP)       += sleep.o wakeup.o
+obj-$(CONFIG_ACPI)             += sleep.o wakeup.o
 
 ifneq ($(CONFIG_ACPI_PROCESSOR),)
 obj-y                          += cstate.o processor.o
index d474cd639bcb8ece22f706d285950926a50541ac..7fe5da3c932e270f742290af4c35536a0ef29291 100644 (file)
@@ -422,7 +422,7 @@ void __init setup_bootmem_allocator(void)
         */
        reserve_bootmem(PAGE_SIZE, PAGE_SIZE);
 #endif
-#ifdef CONFIG_ACPI_SLEEP
+#ifdef CONFIG_ACPI
        /*
         * Reserve low memory region for sleep support.
         */
index c3b9905af2d5024b71451e796c052a2ad1813718..1b1a1e66d099b7c5df78d91d7c4244eb51f06d4b 100644 (file)
@@ -432,7 +432,7 @@ static void __init pagetable_init (void)
        paravirt_pagetable_setup_done(pgd_base);
 }
 
-#if defined(CONFIG_SOFTWARE_SUSPEND) || defined(CONFIG_ACPI_SLEEP)
+#if defined(CONFIG_SOFTWARE_SUSPEND) || defined(CONFIG_ACPI)
 /*
  * Swap suspend & friends need this for resume because things like the intel-agp
  * driver might have split up a kernel 4MB mapping.
index 103dd8edda71bc161762b810b8d792a2079570bf..c6ede8780dedc0afdf2489a55b7f9d262ca653d1 100644 (file)
@@ -67,6 +67,8 @@ EXPORT_SYMBOL(pm_power_off);
 unsigned int acpi_cpei_override;
 unsigned int acpi_cpei_phys_cpuid;
 
+unsigned long acpi_wakeup_address = 0;
+
 const char __init *
 acpi_get_sysname(void)
 {
@@ -986,4 +988,21 @@ int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base)
 
 EXPORT_SYMBOL(acpi_unregister_ioapic);
 
+/*
+ * acpi_save_state_mem() - save kernel state
+ *
+ * TBD when when IA64 starts to support suspend...
+ */
+int acpi_save_state_mem(void) { return 0; } 
+
+/*
+ * acpi_restore_state()
+ */
+void acpi_restore_state_mem(void) {}
+
+/*
+ * do_suspend_lowlevel()
+ */
+void do_suspend_lowlevel(void) {}
+
 #endif                         /* CONFIG_ACPI */
index 080b9963f1bc1a6f0213a8a59b7ef8898f6d829c..17595d23fee7be9c3e873ce9095d71fe0efa9a04 100644 (file)
@@ -1,6 +1,6 @@
 obj-y                  := boot.o
 boot-y                 := ../../../i386/kernel/acpi/boot.o
-obj-$(CONFIG_ACPI_SLEEP)       += sleep.o wakeup.o
+obj-y                  += sleep.o wakeup.o
 
 ifneq ($(CONFIG_ACPI_PROCESSOR),)
 obj-y                  += processor.o
index 4277f2b27e6dc8b4fb007546fe7a63cf5ed77f92..79475d2370713a96cff45a1cc5aada1a4eedc093 100644 (file)
@@ -51,8 +51,6 @@
                               Low-Level Sleep Support
    -------------------------------------------------------------------------- */
 
-#ifdef CONFIG_ACPI_SLEEP
-
 /* address in low memory of the wakeup routine. */
 unsigned long acpi_wakeup_address = 0;
 unsigned long acpi_realmode_flags;
@@ -117,8 +115,6 @@ static int __init acpi_sleep_setup(char *str)
 
 __setup("acpi_sleep=", acpi_sleep_setup);
 
-#endif                         /*CONFIG_ACPI_SLEEP */
-
 void acpi_pci_link_exit(void)
 {
 }
index e89abcdbdde8172e25d6dff0ddb8323471495c66..3a16e417dd8dae1fc448043386041d9e211aca0c 100644 (file)
@@ -120,7 +120,7 @@ ident_complete:
        addq    %rbp, trampoline_level4_pgt + 0(%rip)
        addq    %rbp, trampoline_level4_pgt + (511*8)(%rip)
 #endif
-#ifdef CONFIG_ACPI_SLEEP
+#ifdef CONFIG_ACPI
        addq    %rbp, wakeup_level4_pgt + 0(%rip)
        addq    %rbp, wakeup_level4_pgt + (511*8)(%rip)
 #endif
index af838f6b0b7fc9b7e3ed4de0ab12992e48cf9f18..0f400f3c469494894b37d68f7d2badf44a246e97 100644 (file)
@@ -333,7 +333,7 @@ void __init setup_arch(char **cmdline_p)
        reserve_bootmem_generic(SMP_TRAMPOLINE_BASE, 2*PAGE_SIZE);
 #endif
 
-#ifdef CONFIG_ACPI_SLEEP
+#ifdef CONFIG_ACPI
        /*
         * Reserve low memory region for sleep support.
         */
index 524cbf151fc24219af3657e7da00d30bf6fe135b..251344cb29aea1f04f2e42935b52c68c09103ba3 100644 (file)
@@ -11,6 +11,9 @@ menuconfig ACPI
        depends on PCI
        depends on PM
        select PNP
+       # for sleep
+       select HOTPLUG_CPU if X86 && SMP
+       select SUSPEND_SMP if X86 && SMP
        default y
        ---help---
          Advanced Configuration and Power Interface (ACPI) support for 
@@ -42,13 +45,6 @@ menuconfig ACPI
 
 if ACPI
 
-config ACPI_SLEEP
-       bool
-       depends on X86
-       select HOTPLUG_CPU if SMP
-       select SUSPEND_SMP if SMP
-       default y
-
 config ACPI_PROCFS
        bool "Deprecated /proc/acpi files"
        depends on PROC_FS
index 195a4f69c0f773d4ba73119d3efd0512c9d10454..01a993a1d08612b4e0a4fa5a2384806c8733d432 100644 (file)
@@ -1,5 +1,5 @@
 obj-y                                  := poweroff.o wakeup.o
-obj-$(CONFIG_ACPI_SLEEP)               += main.o
-obj-$(CONFIG_ACPI_SLEEP)               += proc.o
+obj-y                                  += main.o
+obj-$(CONFIG_X86)                      += proc.o
 
 EXTRA_CFLAGS += $(ACPI_CFLAGS)
index 3279e72a94f81c0c532f72a9bd0284861a1ba345..54c2dfcf86511dec831693c86c0494f16e6a1028 100644 (file)
@@ -136,10 +136,12 @@ static int acpi_pm_finish(suspend_state_t pm_state)
        /* reset firmware waking vector */
        acpi_set_firmware_waking_vector((acpi_physical_address) 0);
 
+#ifdef CONFIG_X86
        if (init_8259A_after_S1) {
                printk("Broken toshiba laptop -> kicking interrupts\n");
                init_8259A(0);
        }
+#endif
        return 0;
 }
 
index 39e40d56b034ec9bd46e68c4a9e2d9467c3b9686..b3f68ef0669ed23ba6077e4c784a9b20eaab9564 100644 (file)
@@ -18,7 +18,6 @@
 
 int acpi_sleep_prepare(u32 acpi_state)
 {
-#ifdef CONFIG_ACPI_SLEEP
        /* do we have a wakeup address for S2 and S3? */
        if (acpi_state == ACPI_STATE_S3) {
                if (!acpi_wakeup_address) {
@@ -31,7 +30,6 @@ int acpi_sleep_prepare(u32 acpi_state)
        }
        ACPI_FLUSH_CPU_CACHE();
        acpi_enable_wakeup_device_prep(acpi_state);
-#endif
        acpi_gpe_sleep_prepare(acpi_state);
        acpi_enter_sleep_state_prep(acpi_state);
        return 0;
index fab8f2694f03284bf23f3dd256cd1a811ae6727f..97c27ddb144ddced0025b646825ab06bdac60287 100644 (file)
@@ -17,7 +17,6 @@ ACPI_MODULE_NAME("wakeup_devices")
 extern struct list_head acpi_wakeup_device_list;
 extern spinlock_t acpi_device_lock;
 
-#ifdef CONFIG_ACPI_SLEEP
 /**
  * acpi_enable_wakeup_device_prep - prepare wakeup devices
  *     @sleep_state:   ACPI state
@@ -180,7 +179,6 @@ static int __init acpi_wakeup_device_init(void)
 }
 
 late_initcall(acpi_wakeup_device_init);
-#endif
 
 /*
  * Disable all wakeup GPEs before entering requested sleep state.
index 553515912c0bf3356b8b2185b2dba76a380e1d49..07b5d76b92cc4348216c46357cc21365fa4c1a2a 100644 (file)
@@ -142,10 +142,6 @@ static inline void unregister_hotplug_dock_device(acpi_handle handle)
 /*--------------------------------------------------------------------------
                                   Suspend/Resume
   -------------------------------------------------------------------------- */
-#ifdef CONFIG_ACPI_SLEEP
 extern int acpi_sleep_init(void);
-#else
-#define acpi_sleep_init() do {} while (0)
-#endif
 
 #endif /*__ACPI_DRIVERS_H__*/
index 449f3f272e070753c25877e5b23445ffbd75ac4f..125179adf0440976fc4face93804ebff7800c79a 100644 (file)
@@ -121,19 +121,6 @@ static inline void acpi_disable_pci(void)
 }
 extern int acpi_irq_balance_set(char *str);
 
-#else  /* !CONFIG_ACPI */
-
-#define acpi_lapic 0
-#define acpi_ioapic 0
-static inline void acpi_noirq_set(void) { }
-static inline void acpi_disable_pci(void) { }
-static inline void disable_acpi(void) { }
-
-#endif /* !CONFIG_ACPI */
-
-
-#ifdef CONFIG_ACPI_SLEEP
-
 /* routines for saving/restoring kernel state */
 extern int acpi_save_state_mem(void);
 extern void acpi_restore_state_mem(void);
@@ -143,7 +130,15 @@ extern unsigned long acpi_wakeup_address;
 /* early initialization routine */
 extern void acpi_reserve_bootmem(void);
 
-#endif /*CONFIG_ACPI_SLEEP*/
+#else  /* !CONFIG_ACPI */
+
+#define acpi_lapic 0
+#define acpi_ioapic 0
+static inline void acpi_noirq_set(void) { }
+static inline void acpi_disable_pci(void) { }
+static inline void disable_acpi(void) { }
+
+#endif /* !CONFIG_ACPI */
 
 #define ARCH_HAS_POWER_INIT    1
 
index 8dbaafe611ffc744b426d944bb893c54445f2e32..a2520732ffd6a30b8f769f7a053c31c505944eaf 100644 (file)
@@ -21,7 +21,7 @@ struct saved_context {
        unsigned long return_address;
 } __attribute__((packed));
 
-#ifdef CONFIG_ACPI_SLEEP
+#ifdef CONFIG_ACPI
 extern unsigned long saved_eip;
 extern unsigned long saved_esp;
 extern unsigned long saved_ebp;
index 5b526357d178fa4b6e4d8f327cc839bd90e4080b..49730ffbbae41f25251aa4e44bb9090e48b41341 100644 (file)
@@ -100,6 +100,11 @@ const char *acpi_get_sysname (void);
 int acpi_request_vector (u32 int_type);
 int acpi_gsi_to_irq (u32 gsi, unsigned int *irq);
 
+/* routines for saving/restoring kernel state */
+extern int acpi_save_state_mem(void);
+extern void acpi_restore_state_mem(void);
+extern unsigned long acpi_wakeup_address;
+
 /*
  * Record the cpei override flag and current logical cpu. This is
  * useful for CPU removal.
index 1da8f49c0fe23cc7c87a12db6a891bfaaf27d1c1..98173357dd89c4d6291cd2d0400bace25022adbd 100644 (file)
@@ -108,6 +108,15 @@ static inline void acpi_disable_pci(void)
 }
 extern int acpi_irq_balance_set(char *str);
 
+/* routines for saving/restoring kernel state */
+extern int acpi_save_state_mem(void);
+extern void acpi_restore_state_mem(void);
+
+extern unsigned long acpi_wakeup_address;
+
+/* early initialization routine */
+extern void acpi_reserve_bootmem(void);
+
 #else  /* !CONFIG_ACPI */
 
 #define acpi_lapic 0
@@ -121,19 +130,6 @@ extern int acpi_numa;
 extern int acpi_scan_nodes(unsigned long start, unsigned long end);
 #define NR_NODE_MEMBLKS (MAX_NUMNODES*2)
 
-#ifdef CONFIG_ACPI_SLEEP
-
-/* routines for saving/restoring kernel state */
-extern int acpi_save_state_mem(void);
-extern void acpi_restore_state_mem(void);
-
-extern unsigned long acpi_wakeup_address;
-
-/* early initialization routine */
-extern void acpi_reserve_bootmem(void);
-
-#endif /*CONFIG_ACPI_SLEEP*/
-
 extern int acpi_disabled;
 extern int acpi_pci_disabled;
 
index 9c3f8de90d2da9c10de87d5ed3b52dfb1acc2862..b897e8cb55fbb7a73a43d4f1ac7a16a20f3d56d2 100644 (file)
@@ -44,7 +44,6 @@ extern unsigned long saved_context_eflags;
 
 extern void fix_processor_context(void);
 
-#ifdef CONFIG_ACPI_SLEEP
 extern unsigned long saved_rip;
 extern unsigned long saved_rsp;
 extern unsigned long saved_rbp;
@@ -54,4 +53,3 @@ extern unsigned long saved_rdi;
 
 /* routines for saving/restoring kernel state */
 extern int acpi_save_state_mem(void);
-#endif
index ddebf3f2affe937d8a9ccb694de85dc9d567f1fb..eb26f2ba51ed33eb30f3be4c359875faad721e9f 100644 (file)
@@ -689,7 +689,7 @@ static ctl_table kern_table[] = {
                .proc_handler   = &proc_dointvec,
        },
 #endif
-#ifdef CONFIG_ACPI_SLEEP
+#if defined(CONFIG_ACPI) && defined(CONFIG_X86)
        {
                .ctl_name       = KERN_ACPI_VIDEO_FLAGS,
                .procname       = "acpi_video_flags",