Commit 673d5b43daa00b42759cecc6b0760b8bf6be80d2
Committed by
Linus Torvalds
1 parent
296699de6b
Exists in
master
and in
4 other branches
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>
Showing 13 changed files with 25 additions and 10 deletions Side-by-side Diff
- arch/i386/kernel/acpi/Makefile
- arch/i386/kernel/setup.c
- arch/x86_64/kernel/acpi/Makefile
- arch/x86_64/kernel/head.S
- arch/x86_64/kernel/setup.c
- drivers/acpi/Kconfig
- drivers/acpi/sleep/Makefile
- drivers/acpi/sleep/poweroff.c
- drivers/acpi/sleep/proc.c
- drivers/pci/pci-acpi.c
- drivers/pnp/pnpacpi/core.c
- include/acpi/acpi_drivers.h
- kernel/sysctl.c
arch/i386/kernel/acpi/Makefile
arch/i386/kernel/setup.c
arch/x86_64/kernel/acpi/Makefile
arch/x86_64/kernel/head.S
... | ... | @@ -120,7 +120,7 @@ |
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 |
arch/x86_64/kernel/setup.c
drivers/acpi/Kconfig
drivers/acpi/sleep/Makefile
drivers/acpi/sleep/poweroff.c
... | ... | @@ -18,6 +18,7 @@ |
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) { |
... | ... | @@ -30,6 +31,7 @@ |
30 | 31 | } |
31 | 32 | ACPI_FLUSH_CPU_CACHE(); |
32 | 33 | acpi_enable_wakeup_device_prep(acpi_state); |
34 | +#endif | |
33 | 35 | acpi_gpe_sleep_prepare(acpi_state); |
34 | 36 | acpi_enter_sleep_state_prep(acpi_state); |
35 | 37 | return 0; |
drivers/acpi/sleep/proc.c
... | ... | @@ -78,7 +78,7 @@ |
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 |
drivers/pci/pci-acpi.c
... | ... | @@ -220,6 +220,7 @@ |
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". |
... | ... | @@ -267,6 +268,7 @@ |
267 | 268 | } |
268 | 269 | return PCI_POWER_ERROR; |
269 | 270 | } |
271 | +#endif | |
270 | 272 | |
271 | 273 | static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state) |
272 | 274 | { |
273 | 275 | |
... | ... | @@ -340,7 +342,9 @@ |
340 | 342 | ret = register_acpi_bus_type(&acpi_pci_bus); |
341 | 343 | if (ret) |
342 | 344 | return 0; |
345 | +#ifdef CONFIG_ACPI_SLEEP | |
343 | 346 | platform_pci_choose_state = acpi_pci_choose_state; |
347 | +#endif | |
344 | 348 | platform_pci_set_power_state = acpi_pci_set_power_state; |
345 | 349 | return 0; |
346 | 350 | } |
drivers/pnp/pnpacpi/core.c
... | ... | @@ -127,6 +127,7 @@ |
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, |
133 | 134 | |
134 | 135 | |
... | ... | @@ -140,14 +141,17 @@ |
140 | 141 | { |
141 | 142 | return acpi_bus_set_power((acpi_handle) dev->data, ACPI_STATE_D0); |
142 | 143 | } |
144 | +#endif | |
143 | 145 | |
144 | 146 | static struct pnp_protocol pnpacpi_protocol = { |
145 | 147 | .name = "Plug and Play ACPI", |
146 | 148 | .get = pnpacpi_get_resources, |
147 | 149 | .set = pnpacpi_set_resources, |
148 | 150 | .disable = pnpacpi_disable_resources, |
151 | +#ifdef CONFIG_ACPI_SLEEP | |
149 | 152 | .suspend = pnpacpi_suspend, |
150 | 153 | .resume = pnpacpi_resume, |
154 | +#endif | |
151 | 155 | }; |
152 | 156 | |
153 | 157 | static int __init pnpacpi_add_device(struct acpi_device *device) |
include/acpi/acpi_drivers.h
... | ... | @@ -147,7 +147,7 @@ |
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; } |
kernel/sysctl.c