Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ACPI: restore CONFIG_ACPI_SLEEP

Restore the 2.6.22 CONFIG_ACPI_SLEEP build option, but now shadowing the
new CONFIG_PM_SLEEP option.

Signed-off-by: Len Brown <len.brown@intel.com>
[ Modified to work with the PM config setup changes. ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Len Brown and committed by
Linus Torvalds
673d5b43 296699de

+25 -10
+1 -1
arch/i386/kernel/acpi/Makefile
··· 2 2 ifneq ($(CONFIG_PCI),) 3 3 obj-$(CONFIG_X86_IO_APIC) += earlyquirk.o 4 4 endif 5 - obj-$(CONFIG_ACPI) += sleep.o wakeup.o 5 + obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o 6 6 7 7 ifneq ($(CONFIG_ACPI_PROCESSOR),) 8 8 obj-y += cstate.o processor.o
+1 -1
arch/i386/kernel/setup.c
··· 422 422 */ 423 423 reserve_bootmem(PAGE_SIZE, PAGE_SIZE); 424 424 #endif 425 - #ifdef CONFIG_ACPI 425 + #ifdef CONFIG_ACPI_SLEEP 426 426 /* 427 427 * Reserve low memory region for sleep support. 428 428 */
+1 -1
arch/x86_64/kernel/acpi/Makefile
··· 1 1 obj-y := boot.o 2 2 boot-y := ../../../i386/kernel/acpi/boot.o 3 - obj-y += sleep.o wakeup.o 3 + obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o 4 4 5 5 ifneq ($(CONFIG_ACPI_PROCESSOR),) 6 6 obj-y += processor.o
+1 -1
arch/x86_64/kernel/head.S
··· 120 120 addq %rbp, trampoline_level4_pgt + 0(%rip) 121 121 addq %rbp, trampoline_level4_pgt + (511*8)(%rip) 122 122 #endif 123 - #ifdef CONFIG_ACPI 123 + #ifdef CONFIG_ACPI_SLEEP 124 124 addq %rbp, wakeup_level4_pgt + 0(%rip) 125 125 addq %rbp, wakeup_level4_pgt + (511*8)(%rip) 126 126 #endif
+1 -1
arch/x86_64/kernel/setup.c
··· 333 333 reserve_bootmem_generic(SMP_TRAMPOLINE_BASE, 2*PAGE_SIZE); 334 334 #endif 335 335 336 - #ifdef CONFIG_ACPI 336 + #ifdef CONFIG_ACPI_SLEEP 337 337 /* 338 338 * Reserve low memory region for sleep support. 339 339 */
+5
drivers/acpi/Kconfig
··· 42 42 43 43 if ACPI 44 44 45 + config ACPI_SLEEP 46 + bool 47 + depends on PM_SLEEP 48 + default y 49 + 45 50 config ACPI_PROCFS 46 51 bool "Deprecated /proc/acpi files" 47 52 depends on PROC_FS
+2 -2
drivers/acpi/sleep/Makefile
··· 1 1 obj-y := poweroff.o wakeup.o 2 - obj-$(CONFIG_PM_SLEEP) += main.o 3 - obj-$(CONFIG_X86) += proc.o 2 + obj-$(CONFIG_ACPI_SLEEP) += main.o 3 + obj-$(CONFIG_ACPI_SLEEP) += proc.o 4 4 5 5 EXTRA_CFLAGS += $(ACPI_CFLAGS)
+2
drivers/acpi/sleep/poweroff.c
··· 18 18 19 19 int acpi_sleep_prepare(u32 acpi_state) 20 20 { 21 + #ifdef CONFIG_ACPI_SLEEP 21 22 /* do we have a wakeup address for S2 and S3? */ 22 23 if (acpi_state == ACPI_STATE_S3) { 23 24 if (!acpi_wakeup_address) { ··· 31 30 } 32 31 ACPI_FLUSH_CPU_CACHE(); 33 32 acpi_enable_wakeup_device_prep(acpi_state); 33 + #endif 34 34 acpi_gpe_sleep_prepare(acpi_state); 35 35 acpi_enter_sleep_state_prep(acpi_state); 36 36 return 0;
+1 -1
drivers/acpi/sleep/proc.c
··· 78 78 } 79 79 #endif /* CONFIG_ACPI_PROCFS_SLEEP */ 80 80 81 - #if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) 81 + #if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) || !defined(CONFIG_X86) 82 82 /* use /sys/class/rtc/rtcX/wakealarm instead; it's not ACPI-specific */ 83 83 #else 84 84 #define HAVE_ACPI_LEGACY_ALARM
+4
drivers/pci/pci-acpi.c
··· 220 220 } 221 221 EXPORT_SYMBOL(pci_osc_control_set); 222 222 223 + #ifdef CONFIG_ACPI_SLEEP 223 224 /* 224 225 * _SxD returns the D-state with the highest power 225 226 * (lowest D-state number) supported in the S-state "x". ··· 268 267 } 269 268 return PCI_POWER_ERROR; 270 269 } 270 + #endif 271 271 272 272 static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state) 273 273 { ··· 342 340 ret = register_acpi_bus_type(&acpi_pci_bus); 343 341 if (ret) 344 342 return 0; 343 + #ifdef CONFIG_ACPI_SLEEP 345 344 platform_pci_choose_state = acpi_pci_choose_state; 345 + #endif 346 346 platform_pci_set_power_state = acpi_pci_set_power_state; 347 347 return 0; 348 348 }
+4
drivers/pnp/pnpacpi/core.c
··· 127 127 return ACPI_FAILURE(status) ? -ENODEV : 0; 128 128 } 129 129 130 + #ifdef CONFIG_ACPI_SLEEP 130 131 static int pnpacpi_suspend(struct pnp_dev *dev, pm_message_t state) 131 132 { 132 133 return acpi_bus_set_power((acpi_handle) dev->data, ··· 141 140 { 142 141 return acpi_bus_set_power((acpi_handle) dev->data, ACPI_STATE_D0); 143 142 } 143 + #endif 144 144 145 145 static struct pnp_protocol pnpacpi_protocol = { 146 146 .name = "Plug and Play ACPI", 147 147 .get = pnpacpi_get_resources, 148 148 .set = pnpacpi_set_resources, 149 149 .disable = pnpacpi_disable_resources, 150 + #ifdef CONFIG_ACPI_SLEEP 150 151 .suspend = pnpacpi_suspend, 151 152 .resume = pnpacpi_resume, 153 + #endif 152 154 }; 153 155 154 156 static int __init pnpacpi_add_device(struct acpi_device *device)
+1 -1
include/acpi/acpi_drivers.h
··· 147 147 /*-------------------------------------------------------------------------- 148 148 Suspend/Resume 149 149 -------------------------------------------------------------------------- */ 150 - #ifdef CONFIG_PM_SLEEP 150 + #ifdef CONFIG_ACPI_SLEEP 151 151 extern int acpi_sleep_init(void); 152 152 #else 153 153 static inline int acpi_sleep_init(void) { return 0; }
+1 -1
kernel/sysctl.c
··· 689 689 .proc_handler = &proc_dointvec, 690 690 }, 691 691 #endif 692 - #if defined(CONFIG_ACPI) && defined(CONFIG_X86) 692 + #if defined(CONFIG_ACPI_SLEEP) && defined(CONFIG_X86) 693 693 { 694 694 .ctl_name = KERN_ACPI_VIDEO_FLAGS, 695 695 .procname = "acpi_video_flags",