diff options
author | Len Brown <len.brown@intel.com> | 2007-07-28 03:33:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-29 19:53:59 -0400 |
commit | 673d5b43daa00b42759cecc6b0760b8bf6be80d2 (patch) | |
tree | a795ee922db699a8b4cb893ef5809399f1591ba6 | |
parent | 296699de6bdc717189a331ab6bbe90e05c94db06 (diff) |
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>
-rw-r--r-- | arch/i386/kernel/acpi/Makefile | 2 | ||||
-rw-r--r-- | arch/i386/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/acpi/Makefile | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/head.S | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/setup.c | 2 | ||||
-rw-r--r-- | drivers/acpi/Kconfig | 5 | ||||
-rw-r--r-- | drivers/acpi/sleep/Makefile | 4 | ||||
-rw-r--r-- | drivers/acpi/sleep/poweroff.c | 2 | ||||
-rw-r--r-- | drivers/acpi/sleep/proc.c | 2 | ||||
-rw-r--r-- | drivers/pci/pci-acpi.c | 4 | ||||
-rw-r--r-- | drivers/pnp/pnpacpi/core.c | 4 | ||||
-rw-r--r-- | include/acpi/acpi_drivers.h | 2 | ||||
-rw-r--r-- | kernel/sysctl.c | 2 |
13 files changed, 25 insertions, 10 deletions
diff --git a/arch/i386/kernel/acpi/Makefile b/arch/i386/kernel/acpi/Makefile index 223f58fc9f46..7f7be01f44e6 100644 --- a/arch/i386/kernel/acpi/Makefile +++ b/arch/i386/kernel/acpi/Makefile | |||
@@ -2,7 +2,7 @@ obj-$(CONFIG_ACPI) += boot.o | |||
2 | ifneq ($(CONFIG_PCI),) | 2 | ifneq ($(CONFIG_PCI),) |
3 | obj-$(CONFIG_X86_IO_APIC) += earlyquirk.o | 3 | obj-$(CONFIG_X86_IO_APIC) += earlyquirk.o |
4 | endif | 4 | endif |
5 | obj-$(CONFIG_ACPI) += sleep.o wakeup.o | 5 | obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o |
6 | 6 | ||
7 | ifneq ($(CONFIG_ACPI_PROCESSOR),) | 7 | ifneq ($(CONFIG_ACPI_PROCESSOR),) |
8 | obj-y += cstate.o processor.o | 8 | obj-y += cstate.o processor.o |
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index 7fe5da3c932e..d474cd639bcb 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c | |||
@@ -422,7 +422,7 @@ void __init setup_bootmem_allocator(void) | |||
422 | */ | 422 | */ |
423 | reserve_bootmem(PAGE_SIZE, PAGE_SIZE); | 423 | reserve_bootmem(PAGE_SIZE, PAGE_SIZE); |
424 | #endif | 424 | #endif |
425 | #ifdef CONFIG_ACPI | 425 | #ifdef CONFIG_ACPI_SLEEP |
426 | /* | 426 | /* |
427 | * Reserve low memory region for sleep support. | 427 | * Reserve low memory region for sleep support. |
428 | */ | 428 | */ |
diff --git a/arch/x86_64/kernel/acpi/Makefile b/arch/x86_64/kernel/acpi/Makefile index 17595d23fee7..080b9963f1bc 100644 --- a/arch/x86_64/kernel/acpi/Makefile +++ b/arch/x86_64/kernel/acpi/Makefile | |||
@@ -1,6 +1,6 @@ | |||
1 | obj-y := boot.o | 1 | obj-y := boot.o |
2 | boot-y := ../../../i386/kernel/acpi/boot.o | 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 | ifneq ($(CONFIG_ACPI_PROCESSOR),) | 5 | ifneq ($(CONFIG_ACPI_PROCESSOR),) |
6 | obj-y += processor.o | 6 | obj-y += processor.o |
diff --git a/arch/x86_64/kernel/head.S b/arch/x86_64/kernel/head.S index 3a16e417dd8d..e89abcdbdde8 100644 --- a/arch/x86_64/kernel/head.S +++ b/arch/x86_64/kernel/head.S | |||
@@ -120,7 +120,7 @@ ident_complete: | |||
120 | addq %rbp, trampoline_level4_pgt + 0(%rip) | 120 | addq %rbp, trampoline_level4_pgt + 0(%rip) |
121 | addq %rbp, trampoline_level4_pgt + (511*8)(%rip) | 121 | addq %rbp, trampoline_level4_pgt + (511*8)(%rip) |
122 | #endif | 122 | #endif |
123 | #ifdef CONFIG_ACPI | 123 | #ifdef CONFIG_ACPI_SLEEP |
124 | addq %rbp, wakeup_level4_pgt + 0(%rip) | 124 | addq %rbp, wakeup_level4_pgt + 0(%rip) |
125 | addq %rbp, wakeup_level4_pgt + (511*8)(%rip) | 125 | addq %rbp, wakeup_level4_pgt + (511*8)(%rip) |
126 | #endif | 126 | #endif |
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index 0f400f3c4694..af838f6b0b7f 100644 --- a/arch/x86_64/kernel/setup.c +++ b/arch/x86_64/kernel/setup.c | |||
@@ -333,7 +333,7 @@ void __init setup_arch(char **cmdline_p) | |||
333 | reserve_bootmem_generic(SMP_TRAMPOLINE_BASE, 2*PAGE_SIZE); | 333 | reserve_bootmem_generic(SMP_TRAMPOLINE_BASE, 2*PAGE_SIZE); |
334 | #endif | 334 | #endif |
335 | 335 | ||
336 | #ifdef CONFIG_ACPI | 336 | #ifdef CONFIG_ACPI_SLEEP |
337 | /* | 337 | /* |
338 | * Reserve low memory region for sleep support. | 338 | * Reserve low memory region for sleep support. |
339 | */ | 339 | */ |
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 66e78d52a093..934d639b3684 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig | |||
@@ -42,6 +42,11 @@ menuconfig ACPI | |||
42 | 42 | ||
43 | if ACPI | 43 | if ACPI |
44 | 44 | ||
45 | config ACPI_SLEEP | ||
46 | bool | ||
47 | depends on PM_SLEEP | ||
48 | default y | ||
49 | |||
45 | config ACPI_PROCFS | 50 | config ACPI_PROCFS |
46 | bool "Deprecated /proc/acpi files" | 51 | bool "Deprecated /proc/acpi files" |
47 | depends on PROC_FS | 52 | depends on PROC_FS |
diff --git a/drivers/acpi/sleep/Makefile b/drivers/acpi/sleep/Makefile index 2bec897ab1eb..195a4f69c0f7 100644 --- a/drivers/acpi/sleep/Makefile +++ b/drivers/acpi/sleep/Makefile | |||
@@ -1,5 +1,5 @@ | |||
1 | obj-y := poweroff.o wakeup.o | 1 | obj-y := poweroff.o wakeup.o |
2 | obj-$(CONFIG_PM_SLEEP) += main.o | 2 | obj-$(CONFIG_ACPI_SLEEP) += main.o |
3 | obj-$(CONFIG_X86) += proc.o | 3 | obj-$(CONFIG_ACPI_SLEEP) += proc.o |
4 | 4 | ||
5 | EXTRA_CFLAGS += $(ACPI_CFLAGS) | 5 | EXTRA_CFLAGS += $(ACPI_CFLAGS) |
diff --git a/drivers/acpi/sleep/poweroff.c b/drivers/acpi/sleep/poweroff.c index b3f68ef0669e..39e40d56b034 100644 --- a/drivers/acpi/sleep/poweroff.c +++ b/drivers/acpi/sleep/poweroff.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | int acpi_sleep_prepare(u32 acpi_state) | 19 | int acpi_sleep_prepare(u32 acpi_state) |
20 | { | 20 | { |
21 | #ifdef CONFIG_ACPI_SLEEP | ||
21 | /* do we have a wakeup address for S2 and S3? */ | 22 | /* do we have a wakeup address for S2 and S3? */ |
22 | if (acpi_state == ACPI_STATE_S3) { | 23 | if (acpi_state == ACPI_STATE_S3) { |
23 | if (!acpi_wakeup_address) { | 24 | if (!acpi_wakeup_address) { |
@@ -30,6 +31,7 @@ int acpi_sleep_prepare(u32 acpi_state) | |||
30 | } | 31 | } |
31 | ACPI_FLUSH_CPU_CACHE(); | 32 | ACPI_FLUSH_CPU_CACHE(); |
32 | acpi_enable_wakeup_device_prep(acpi_state); | 33 | acpi_enable_wakeup_device_prep(acpi_state); |
34 | #endif | ||
33 | acpi_gpe_sleep_prepare(acpi_state); | 35 | acpi_gpe_sleep_prepare(acpi_state); |
34 | acpi_enter_sleep_state_prep(acpi_state); | 36 | acpi_enter_sleep_state_prep(acpi_state); |
35 | return 0; | 37 | return 0; |
diff --git a/drivers/acpi/sleep/proc.c b/drivers/acpi/sleep/proc.c index 5dfe8b789633..66b62b0d3609 100644 --- a/drivers/acpi/sleep/proc.c +++ b/drivers/acpi/sleep/proc.c | |||
@@ -78,7 +78,7 @@ acpi_system_write_sleep(struct file *file, | |||
78 | } | 78 | } |
79 | #endif /* CONFIG_ACPI_PROCFS_SLEEP */ | 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 | /* use /sys/class/rtc/rtcX/wakealarm instead; it's not ACPI-specific */ | 82 | /* use /sys/class/rtc/rtcX/wakealarm instead; it's not ACPI-specific */ |
83 | #else | 83 | #else |
84 | #define HAVE_ACPI_LEGACY_ALARM | 84 | #define HAVE_ACPI_LEGACY_ALARM |
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index 67c63d1f1582..5c6a5d043007 100644 --- a/drivers/pci/pci-acpi.c +++ b/drivers/pci/pci-acpi.c | |||
@@ -220,6 +220,7 @@ acpi_status pci_osc_control_set(acpi_handle handle, u32 flags) | |||
220 | } | 220 | } |
221 | EXPORT_SYMBOL(pci_osc_control_set); | 221 | EXPORT_SYMBOL(pci_osc_control_set); |
222 | 222 | ||
223 | #ifdef CONFIG_ACPI_SLEEP | ||
223 | /* | 224 | /* |
224 | * _SxD returns the D-state with the highest power | 225 | * _SxD returns the D-state with the highest power |
225 | * (lowest D-state number) supported in the S-state "x". | 226 | * (lowest D-state number) supported in the S-state "x". |
@@ -267,6 +268,7 @@ static pci_power_t acpi_pci_choose_state(struct pci_dev *pdev, | |||
267 | } | 268 | } |
268 | return PCI_POWER_ERROR; | 269 | return PCI_POWER_ERROR; |
269 | } | 270 | } |
271 | #endif | ||
270 | 272 | ||
271 | static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state) | 273 | static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state) |
272 | { | 274 | { |
@@ -340,7 +342,9 @@ static int __init acpi_pci_init(void) | |||
340 | ret = register_acpi_bus_type(&acpi_pci_bus); | 342 | ret = register_acpi_bus_type(&acpi_pci_bus); |
341 | if (ret) | 343 | if (ret) |
342 | return 0; | 344 | return 0; |
345 | #ifdef CONFIG_ACPI_SLEEP | ||
343 | platform_pci_choose_state = acpi_pci_choose_state; | 346 | platform_pci_choose_state = acpi_pci_choose_state; |
347 | #endif | ||
344 | platform_pci_set_power_state = acpi_pci_set_power_state; | 348 | platform_pci_set_power_state = acpi_pci_set_power_state; |
345 | return 0; | 349 | return 0; |
346 | } | 350 | } |
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c index 6a2a3c2f4d5e..616fc72190bf 100644 --- a/drivers/pnp/pnpacpi/core.c +++ b/drivers/pnp/pnpacpi/core.c | |||
@@ -127,6 +127,7 @@ static int pnpacpi_disable_resources(struct pnp_dev *dev) | |||
127 | return ACPI_FAILURE(status) ? -ENODEV : 0; | 127 | return ACPI_FAILURE(status) ? -ENODEV : 0; |
128 | } | 128 | } |
129 | 129 | ||
130 | #ifdef CONFIG_ACPI_SLEEP | ||
130 | static int pnpacpi_suspend(struct pnp_dev *dev, pm_message_t state) | 131 | static int pnpacpi_suspend(struct pnp_dev *dev, pm_message_t state) |
131 | { | 132 | { |
132 | return acpi_bus_set_power((acpi_handle) dev->data, | 133 | return acpi_bus_set_power((acpi_handle) dev->data, |
@@ -140,14 +141,17 @@ static int pnpacpi_resume(struct pnp_dev *dev) | |||
140 | { | 141 | { |
141 | return acpi_bus_set_power((acpi_handle) dev->data, ACPI_STATE_D0); | 142 | return acpi_bus_set_power((acpi_handle) dev->data, ACPI_STATE_D0); |
142 | } | 143 | } |
144 | #endif | ||
143 | 145 | ||
144 | static struct pnp_protocol pnpacpi_protocol = { | 146 | static struct pnp_protocol pnpacpi_protocol = { |
145 | .name = "Plug and Play ACPI", | 147 | .name = "Plug and Play ACPI", |
146 | .get = pnpacpi_get_resources, | 148 | .get = pnpacpi_get_resources, |
147 | .set = pnpacpi_set_resources, | 149 | .set = pnpacpi_set_resources, |
148 | .disable = pnpacpi_disable_resources, | 150 | .disable = pnpacpi_disable_resources, |
151 | #ifdef CONFIG_ACPI_SLEEP | ||
149 | .suspend = pnpacpi_suspend, | 152 | .suspend = pnpacpi_suspend, |
150 | .resume = pnpacpi_resume, | 153 | .resume = pnpacpi_resume, |
154 | #endif | ||
151 | }; | 155 | }; |
152 | 156 | ||
153 | static int __init pnpacpi_add_device(struct acpi_device *device) | 157 | static int __init pnpacpi_add_device(struct acpi_device *device) |
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h index 777d37ae81a2..202acb9ff4d0 100644 --- a/include/acpi/acpi_drivers.h +++ b/include/acpi/acpi_drivers.h | |||
@@ -147,7 +147,7 @@ static inline void unregister_hotplug_dock_device(acpi_handle handle) | |||
147 | /*-------------------------------------------------------------------------- | 147 | /*-------------------------------------------------------------------------- |
148 | Suspend/Resume | 148 | Suspend/Resume |
149 | -------------------------------------------------------------------------- */ | 149 | -------------------------------------------------------------------------- */ |
150 | #ifdef CONFIG_PM_SLEEP | 150 | #ifdef CONFIG_ACPI_SLEEP |
151 | extern int acpi_sleep_init(void); | 151 | extern int acpi_sleep_init(void); |
152 | #else | 152 | #else |
153 | static inline int acpi_sleep_init(void) { return 0; } | 153 | static inline int acpi_sleep_init(void) { return 0; } |
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index eb26f2ba51ed..79c891e6266c 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -689,7 +689,7 @@ static ctl_table kern_table[] = { | |||
689 | .proc_handler = &proc_dointvec, | 689 | .proc_handler = &proc_dointvec, |
690 | }, | 690 | }, |
691 | #endif | 691 | #endif |
692 | #if defined(CONFIG_ACPI) && defined(CONFIG_X86) | 692 | #if defined(CONFIG_ACPI_SLEEP) && defined(CONFIG_X86) |
693 | { | 693 | { |
694 | .ctl_name = KERN_ACPI_VIDEO_FLAGS, | 694 | .ctl_name = KERN_ACPI_VIDEO_FLAGS, |
695 | .procname = "acpi_video_flags", | 695 | .procname = "acpi_video_flags", |