diff options
| -rw-r--r-- | arch/i386/kernel/acpi/Makefile | 2 | ||||
| -rw-r--r-- | arch/i386/kernel/setup.c | 2 | ||||
| -rw-r--r-- | arch/i386/mm/init.c | 2 | ||||
| -rw-r--r-- | arch/ia64/kernel/acpi.c | 19 | ||||
| -rw-r--r-- | arch/x86_64/kernel/acpi/Makefile | 2 | ||||
| -rw-r--r-- | arch/x86_64/kernel/acpi/sleep.c | 4 | ||||
| -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 | 64 | ||||
| -rw-r--r-- | drivers/acpi/sleep/Makefile | 4 | ||||
| -rw-r--r-- | drivers/acpi/sleep/main.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/sleep/poweroff.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/sleep/proc.c | 20 | ||||
| -rw-r--r-- | drivers/acpi/sleep/wakeup.c | 2 | ||||
| -rw-r--r-- | include/acpi/acpi_drivers.h | 4 | ||||
| -rw-r--r-- | include/asm-i386/acpi.h | 23 | ||||
| -rw-r--r-- | include/asm-i386/suspend.h | 2 | ||||
| -rw-r--r-- | include/asm-ia64/acpi.h | 5 | ||||
| -rw-r--r-- | include/asm-x86_64/acpi.h | 22 | ||||
| -rw-r--r-- | include/asm-x86_64/suspend.h | 2 | ||||
| -rw-r--r-- | kernel/sysctl.c | 2 |
21 files changed, 89 insertions, 100 deletions
diff --git a/arch/i386/kernel/acpi/Makefile b/arch/i386/kernel/acpi/Makefile index 7f7be01f44e6..223f58fc9f46 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) += sleep.o wakeup.o | 5 | obj-$(CONFIG_ACPI) += 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 d474cd639bcb..7fe5da3c932e 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_SLEEP | 425 | #ifdef CONFIG_ACPI |
| 426 | /* | 426 | /* |
| 427 | * Reserve low memory region for sleep support. | 427 | * Reserve low memory region for sleep support. |
| 428 | */ | 428 | */ |
diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c index c3b9905af2d5..1b1a1e66d099 100644 --- a/arch/i386/mm/init.c +++ b/arch/i386/mm/init.c | |||
| @@ -432,7 +432,7 @@ static void __init pagetable_init (void) | |||
| 432 | paravirt_pagetable_setup_done(pgd_base); | 432 | paravirt_pagetable_setup_done(pgd_base); |
| 433 | } | 433 | } |
| 434 | 434 | ||
| 435 | #if defined(CONFIG_SOFTWARE_SUSPEND) || defined(CONFIG_ACPI_SLEEP) | 435 | #if defined(CONFIG_SOFTWARE_SUSPEND) || defined(CONFIG_ACPI) |
| 436 | /* | 436 | /* |
| 437 | * Swap suspend & friends need this for resume because things like the intel-agp | 437 | * Swap suspend & friends need this for resume because things like the intel-agp |
| 438 | * driver might have split up a kernel 4MB mapping. | 438 | * driver might have split up a kernel 4MB mapping. |
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index 103dd8edda71..c6ede8780ded 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
| @@ -67,6 +67,8 @@ EXPORT_SYMBOL(pm_power_off); | |||
| 67 | unsigned int acpi_cpei_override; | 67 | unsigned int acpi_cpei_override; |
| 68 | unsigned int acpi_cpei_phys_cpuid; | 68 | unsigned int acpi_cpei_phys_cpuid; |
| 69 | 69 | ||
| 70 | unsigned long acpi_wakeup_address = 0; | ||
| 71 | |||
| 70 | const char __init * | 72 | const char __init * |
| 71 | acpi_get_sysname(void) | 73 | acpi_get_sysname(void) |
| 72 | { | 74 | { |
| @@ -986,4 +988,21 @@ int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base) | |||
| 986 | 988 | ||
| 987 | EXPORT_SYMBOL(acpi_unregister_ioapic); | 989 | EXPORT_SYMBOL(acpi_unregister_ioapic); |
| 988 | 990 | ||
| 991 | /* | ||
| 992 | * acpi_save_state_mem() - save kernel state | ||
| 993 | * | ||
| 994 | * TBD when when IA64 starts to support suspend... | ||
| 995 | */ | ||
| 996 | int acpi_save_state_mem(void) { return 0; } | ||
| 997 | |||
| 998 | /* | ||
| 999 | * acpi_restore_state() | ||
| 1000 | */ | ||
| 1001 | void acpi_restore_state_mem(void) {} | ||
| 1002 | |||
| 1003 | /* | ||
| 1004 | * do_suspend_lowlevel() | ||
| 1005 | */ | ||
| 1006 | void do_suspend_lowlevel(void) {} | ||
| 1007 | |||
| 989 | #endif /* CONFIG_ACPI */ | 1008 | #endif /* CONFIG_ACPI */ |
diff --git a/arch/x86_64/kernel/acpi/Makefile b/arch/x86_64/kernel/acpi/Makefile index 080b9963f1bc..17595d23fee7 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-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o | 3 | obj-y += 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/acpi/sleep.c b/arch/x86_64/kernel/acpi/sleep.c index 4277f2b27e6d..79475d237071 100644 --- a/arch/x86_64/kernel/acpi/sleep.c +++ b/arch/x86_64/kernel/acpi/sleep.c | |||
| @@ -51,8 +51,6 @@ | |||
| 51 | Low-Level Sleep Support | 51 | Low-Level Sleep Support |
| 52 | -------------------------------------------------------------------------- */ | 52 | -------------------------------------------------------------------------- */ |
| 53 | 53 | ||
| 54 | #ifdef CONFIG_ACPI_SLEEP | ||
| 55 | |||
| 56 | /* address in low memory of the wakeup routine. */ | 54 | /* address in low memory of the wakeup routine. */ |
| 57 | unsigned long acpi_wakeup_address = 0; | 55 | unsigned long acpi_wakeup_address = 0; |
| 58 | unsigned long acpi_realmode_flags; | 56 | unsigned long acpi_realmode_flags; |
| @@ -117,8 +115,6 @@ static int __init acpi_sleep_setup(char *str) | |||
| 117 | 115 | ||
| 118 | __setup("acpi_sleep=", acpi_sleep_setup); | 116 | __setup("acpi_sleep=", acpi_sleep_setup); |
| 119 | 117 | ||
| 120 | #endif /*CONFIG_ACPI_SLEEP */ | ||
| 121 | |||
| 122 | void acpi_pci_link_exit(void) | 118 | void acpi_pci_link_exit(void) |
| 123 | { | 119 | { |
| 124 | } | 120 | } |
diff --git a/arch/x86_64/kernel/head.S b/arch/x86_64/kernel/head.S index e89abcdbdde8..3a16e417dd8d 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_SLEEP | 123 | #ifdef CONFIG_ACPI |
| 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 af838f6b0b7f..0f400f3c4694 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_SLEEP | 336 | #ifdef CONFIG_ACPI |
| 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 408b45168aba..251344cb29ae 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig | |||
| @@ -11,6 +11,9 @@ menuconfig ACPI | |||
| 11 | depends on PCI | 11 | depends on PCI |
| 12 | depends on PM | 12 | depends on PM |
| 13 | select PNP | 13 | select PNP |
| 14 | # for sleep | ||
| 15 | select HOTPLUG_CPU if X86 && SMP | ||
| 16 | select SUSPEND_SMP if X86 && SMP | ||
| 14 | default y | 17 | default y |
| 15 | ---help--- | 18 | ---help--- |
| 16 | Advanced Configuration and Power Interface (ACPI) support for | 19 | Advanced Configuration and Power Interface (ACPI) support for |
| @@ -42,51 +45,26 @@ menuconfig ACPI | |||
| 42 | 45 | ||
| 43 | if ACPI | 46 | if ACPI |
| 44 | 47 | ||
| 45 | config ACPI_SLEEP | ||
| 46 | bool "Sleep States" | ||
| 47 | depends on X86 && (!SMP || SUSPEND_SMP) | ||
| 48 | default y | ||
| 49 | ---help--- | ||
| 50 | This option adds support for ACPI suspend states. | ||
| 51 | |||
| 52 | With this option, you will be able to put the system "to sleep". | ||
| 53 | Sleep states are low power states for the system and devices. All | ||
| 54 | of the system operating state is saved to either memory or disk | ||
| 55 | (depending on the state), to allow the system to resume operation | ||
| 56 | quickly at your request. | ||
| 57 | |||
| 58 | Although this option sounds really nifty, barely any of the device | ||
| 59 | drivers have been converted to the new driver model and hence few | ||
| 60 | have proper power management support. | ||
| 61 | |||
| 62 | This option is not recommended for anyone except those doing driver | ||
| 63 | power management development. | ||
| 64 | |||
| 65 | config ACPI_SLEEP_PROC_FS | ||
| 66 | bool | ||
| 67 | depends on ACPI_SLEEP && PROC_FS | ||
| 68 | default y | ||
| 69 | |||
| 70 | config ACPI_SLEEP_PROC_SLEEP | ||
| 71 | bool "/proc/acpi/sleep (deprecated)" | ||
| 72 | depends on ACPI_SLEEP_PROC_FS | ||
| 73 | default n | ||
| 74 | ---help--- | ||
| 75 | Create /proc/acpi/sleep | ||
| 76 | Deprecated by /sys/power/state | ||
| 77 | |||
| 78 | config ACPI_PROCFS | 48 | config ACPI_PROCFS |
| 79 | bool "Procfs interface (deprecated)" | 49 | bool "Deprecated /proc/acpi files" |
| 80 | default y | 50 | depends on PROC_FS |
| 81 | ---help--- | 51 | ---help--- |
| 82 | The Procfs interface for ACPI is made optional for backward compatibility. | 52 | For backwards compatibility, this option allows |
| 83 | As the same functions are duplicated in the sysfs interface | 53 | depricated /proc/acpi/ files to exist, even when |
| 84 | and this proc interface will be removed some time later, | 54 | they have been replaced by functions in /sys. |
| 85 | it's marked as deprecated. | 55 | The deprecated files (and their replacements) include: |
| 86 | ( /proc/acpi/debug_layer && debug_level are deprecated by | 56 | |
| 87 | /sys/module/acpi/parameters/debug_layer && debug_level. | 57 | /proc/acpi/sleep (/sys/power/state) |
| 88 | /proc/acpi/info is deprecated by | 58 | /proc/acpi/info (/sys/modules/acpi/parameters/acpica_version) |
| 89 | /sys/module/acpi/parameters/acpica_version ) | 59 | /proc/acpi/dsdt (/sys/firmware/acpi/tables/DSDT) |
| 60 | /proc/acpi/fadt (/sys/firmware/acpi/tables/FACP) | ||
| 61 | /proc/acpi/debug_layer (/sys/module/acpi/parameters/debug_layer) | ||
| 62 | /proc/acpi/debug_level (/sys/module/acpi/parameters/debug_level) | ||
| 63 | |||
| 64 | This option has no effect on /proc/acpi/ files | ||
| 65 | and functions which do not yet exist in /sys. | ||
| 66 | |||
| 67 | Say N to delete /proc/acpi/ files that have moved to /sys/ | ||
| 90 | 68 | ||
| 91 | config ACPI_AC | 69 | config ACPI_AC |
| 92 | tristate "AC Adapter" | 70 | tristate "AC Adapter" |
diff --git a/drivers/acpi/sleep/Makefile b/drivers/acpi/sleep/Makefile index d6c017709c85..01a993a1d086 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_ACPI_SLEEP) += main.o | 2 | obj-y += main.o |
| 3 | obj-$(CONFIG_ACPI_SLEEP_PROC_FS) += proc.o | 3 | obj-$(CONFIG_X86) += proc.o |
| 4 | 4 | ||
| 5 | EXTRA_CFLAGS += $(ACPI_CFLAGS) | 5 | EXTRA_CFLAGS += $(ACPI_CFLAGS) |
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c index 3279e72a94f8..54c2dfcf8651 100644 --- a/drivers/acpi/sleep/main.c +++ b/drivers/acpi/sleep/main.c | |||
| @@ -136,10 +136,12 @@ static int acpi_pm_finish(suspend_state_t pm_state) | |||
| 136 | /* reset firmware waking vector */ | 136 | /* reset firmware waking vector */ |
| 137 | acpi_set_firmware_waking_vector((acpi_physical_address) 0); | 137 | acpi_set_firmware_waking_vector((acpi_physical_address) 0); |
| 138 | 138 | ||
| 139 | #ifdef CONFIG_X86 | ||
| 139 | if (init_8259A_after_S1) { | 140 | if (init_8259A_after_S1) { |
| 140 | printk("Broken toshiba laptop -> kicking interrupts\n"); | 141 | printk("Broken toshiba laptop -> kicking interrupts\n"); |
| 141 | init_8259A(0); | 142 | init_8259A(0); |
| 142 | } | 143 | } |
| 144 | #endif | ||
| 143 | return 0; | 145 | return 0; |
| 144 | } | 146 | } |
| 145 | 147 | ||
diff --git a/drivers/acpi/sleep/poweroff.c b/drivers/acpi/sleep/poweroff.c index 39e40d56b034..b3f68ef0669e 100644 --- a/drivers/acpi/sleep/poweroff.c +++ b/drivers/acpi/sleep/poweroff.c | |||
| @@ -18,7 +18,6 @@ | |||
| 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 | ||
| 22 | /* do we have a wakeup address for S2 and S3? */ | 21 | /* do we have a wakeup address for S2 and S3? */ |
| 23 | if (acpi_state == ACPI_STATE_S3) { | 22 | if (acpi_state == ACPI_STATE_S3) { |
| 24 | if (!acpi_wakeup_address) { | 23 | if (!acpi_wakeup_address) { |
| @@ -31,7 +30,6 @@ int acpi_sleep_prepare(u32 acpi_state) | |||
| 31 | } | 30 | } |
| 32 | ACPI_FLUSH_CPU_CACHE(); | 31 | ACPI_FLUSH_CPU_CACHE(); |
| 33 | acpi_enable_wakeup_device_prep(acpi_state); | 32 | acpi_enable_wakeup_device_prep(acpi_state); |
| 34 | #endif | ||
| 35 | acpi_gpe_sleep_prepare(acpi_state); | 33 | acpi_gpe_sleep_prepare(acpi_state); |
| 36 | acpi_enter_sleep_state_prep(acpi_state); | 34 | acpi_enter_sleep_state_prep(acpi_state); |
| 37 | return 0; | 35 | return 0; |
diff --git a/drivers/acpi/sleep/proc.c b/drivers/acpi/sleep/proc.c index 61f1822cc350..ed58e1168aed 100644 --- a/drivers/acpi/sleep/proc.c +++ b/drivers/acpi/sleep/proc.c | |||
| @@ -14,8 +14,16 @@ | |||
| 14 | #include "sleep.h" | 14 | #include "sleep.h" |
| 15 | 15 | ||
| 16 | #define _COMPONENT ACPI_SYSTEM_COMPONENT | 16 | #define _COMPONENT ACPI_SYSTEM_COMPONENT |
| 17 | |||
| 18 | /* | ||
| 19 | * this file provides support for: | ||
| 20 | * /proc/acpi/sleep | ||
| 21 | * /proc/acpi/alarm | ||
| 22 | * /proc/acpi/wakeup | ||
| 23 | */ | ||
| 24 | |||
| 17 | ACPI_MODULE_NAME("sleep") | 25 | ACPI_MODULE_NAME("sleep") |
| 18 | #ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP | 26 | #ifdef CONFIG_ACPI_PROCFS |
| 19 | static int acpi_system_sleep_seq_show(struct seq_file *seq, void *offset) | 27 | static int acpi_system_sleep_seq_show(struct seq_file *seq, void *offset) |
| 20 | { | 28 | { |
| 21 | int i; | 29 | int i; |
| @@ -68,7 +76,7 @@ acpi_system_write_sleep(struct file *file, | |||
| 68 | Done: | 76 | Done: |
| 69 | return error ? error : count; | 77 | return error ? error : count; |
| 70 | } | 78 | } |
| 71 | #endif /* CONFIG_ACPI_SLEEP_PROC_SLEEP */ | 79 | #endif /* CONFIG_ACPI_PROCFS */ |
| 72 | 80 | ||
| 73 | #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) |
| 74 | /* 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 */ |
| @@ -463,7 +471,7 @@ static const struct file_operations acpi_system_wakeup_device_fops = { | |||
| 463 | .release = single_release, | 471 | .release = single_release, |
| 464 | }; | 472 | }; |
| 465 | 473 | ||
| 466 | #ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP | 474 | #ifdef CONFIG_ACPI_PROCFS |
| 467 | static const struct file_operations acpi_system_sleep_fops = { | 475 | static const struct file_operations acpi_system_sleep_fops = { |
| 468 | .open = acpi_system_sleep_open_fs, | 476 | .open = acpi_system_sleep_open_fs, |
| 469 | .read = seq_read, | 477 | .read = seq_read, |
| @@ -471,7 +479,7 @@ static const struct file_operations acpi_system_sleep_fops = { | |||
| 471 | .llseek = seq_lseek, | 479 | .llseek = seq_lseek, |
| 472 | .release = single_release, | 480 | .release = single_release, |
| 473 | }; | 481 | }; |
| 474 | #endif /* CONFIG_ACPI_SLEEP_PROC_SLEEP */ | 482 | #endif /* CONFIG_ACPI_PROCFS */ |
| 475 | 483 | ||
| 476 | #ifdef HAVE_ACPI_LEGACY_ALARM | 484 | #ifdef HAVE_ACPI_LEGACY_ALARM |
| 477 | static const struct file_operations acpi_system_alarm_fops = { | 485 | static const struct file_operations acpi_system_alarm_fops = { |
| @@ -498,14 +506,14 @@ static int __init acpi_sleep_proc_init(void) | |||
| 498 | if (acpi_disabled) | 506 | if (acpi_disabled) |
| 499 | return 0; | 507 | return 0; |
| 500 | 508 | ||
| 501 | #ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP | 509 | #ifdef CONFIG_ACPI_PROCFS |
| 502 | /* 'sleep' [R/W] */ | 510 | /* 'sleep' [R/W] */ |
| 503 | entry = | 511 | entry = |
| 504 | create_proc_entry("sleep", S_IFREG | S_IRUGO | S_IWUSR, | 512 | create_proc_entry("sleep", S_IFREG | S_IRUGO | S_IWUSR, |
| 505 | acpi_root_dir); | 513 | acpi_root_dir); |
| 506 | if (entry) | 514 | if (entry) |
| 507 | entry->proc_fops = &acpi_system_sleep_fops; | 515 | entry->proc_fops = &acpi_system_sleep_fops; |
| 508 | #endif | 516 | #endif /* CONFIG_ACPI_PROCFS */ |
| 509 | 517 | ||
| 510 | #ifdef HAVE_ACPI_LEGACY_ALARM | 518 | #ifdef HAVE_ACPI_LEGACY_ALARM |
| 511 | /* 'alarm' [R/W] */ | 519 | /* 'alarm' [R/W] */ |
diff --git a/drivers/acpi/sleep/wakeup.c b/drivers/acpi/sleep/wakeup.c index fab8f2694f03..97c27ddb144d 100644 --- a/drivers/acpi/sleep/wakeup.c +++ b/drivers/acpi/sleep/wakeup.c | |||
| @@ -17,7 +17,6 @@ ACPI_MODULE_NAME("wakeup_devices") | |||
| 17 | extern struct list_head acpi_wakeup_device_list; | 17 | extern struct list_head acpi_wakeup_device_list; |
| 18 | extern spinlock_t acpi_device_lock; | 18 | extern spinlock_t acpi_device_lock; |
| 19 | 19 | ||
| 20 | #ifdef CONFIG_ACPI_SLEEP | ||
| 21 | /** | 20 | /** |
| 22 | * acpi_enable_wakeup_device_prep - prepare wakeup devices | 21 | * acpi_enable_wakeup_device_prep - prepare wakeup devices |
| 23 | * @sleep_state: ACPI state | 22 | * @sleep_state: ACPI state |
| @@ -180,7 +179,6 @@ static int __init acpi_wakeup_device_init(void) | |||
| 180 | } | 179 | } |
| 181 | 180 | ||
| 182 | late_initcall(acpi_wakeup_device_init); | 181 | late_initcall(acpi_wakeup_device_init); |
| 183 | #endif | ||
| 184 | 182 | ||
| 185 | /* | 183 | /* |
| 186 | * Disable all wakeup GPEs before entering requested sleep state. | 184 | * Disable all wakeup GPEs before entering requested sleep state. |
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h index 553515912c0b..07b5d76b92cc 100644 --- a/include/acpi/acpi_drivers.h +++ b/include/acpi/acpi_drivers.h | |||
| @@ -142,10 +142,6 @@ static inline void unregister_hotplug_dock_device(acpi_handle handle) | |||
| 142 | /*-------------------------------------------------------------------------- | 142 | /*-------------------------------------------------------------------------- |
| 143 | Suspend/Resume | 143 | Suspend/Resume |
| 144 | -------------------------------------------------------------------------- */ | 144 | -------------------------------------------------------------------------- */ |
| 145 | #ifdef CONFIG_ACPI_SLEEP | ||
| 146 | extern int acpi_sleep_init(void); | 145 | extern int acpi_sleep_init(void); |
| 147 | #else | ||
| 148 | #define acpi_sleep_init() do {} while (0) | ||
| 149 | #endif | ||
| 150 | 146 | ||
| 151 | #endif /*__ACPI_DRIVERS_H__*/ | 147 | #endif /*__ACPI_DRIVERS_H__*/ |
diff --git a/include/asm-i386/acpi.h b/include/asm-i386/acpi.h index 449f3f272e07..125179adf044 100644 --- a/include/asm-i386/acpi.h +++ b/include/asm-i386/acpi.h | |||
| @@ -121,19 +121,6 @@ static inline void acpi_disable_pci(void) | |||
| 121 | } | 121 | } |
| 122 | extern int acpi_irq_balance_set(char *str); | 122 | extern int acpi_irq_balance_set(char *str); |
| 123 | 123 | ||
| 124 | #else /* !CONFIG_ACPI */ | ||
| 125 | |||
| 126 | #define acpi_lapic 0 | ||
| 127 | #define acpi_ioapic 0 | ||
| 128 | static inline void acpi_noirq_set(void) { } | ||
| 129 | static inline void acpi_disable_pci(void) { } | ||
| 130 | static inline void disable_acpi(void) { } | ||
| 131 | |||
| 132 | #endif /* !CONFIG_ACPI */ | ||
| 133 | |||
| 134 | |||
| 135 | #ifdef CONFIG_ACPI_SLEEP | ||
| 136 | |||
| 137 | /* routines for saving/restoring kernel state */ | 124 | /* routines for saving/restoring kernel state */ |
| 138 | extern int acpi_save_state_mem(void); | 125 | extern int acpi_save_state_mem(void); |
| 139 | extern void acpi_restore_state_mem(void); | 126 | extern void acpi_restore_state_mem(void); |
| @@ -143,7 +130,15 @@ extern unsigned long acpi_wakeup_address; | |||
| 143 | /* early initialization routine */ | 130 | /* early initialization routine */ |
| 144 | extern void acpi_reserve_bootmem(void); | 131 | extern void acpi_reserve_bootmem(void); |
| 145 | 132 | ||
| 146 | #endif /*CONFIG_ACPI_SLEEP*/ | 133 | #else /* !CONFIG_ACPI */ |
| 134 | |||
| 135 | #define acpi_lapic 0 | ||
| 136 | #define acpi_ioapic 0 | ||
| 137 | static inline void acpi_noirq_set(void) { } | ||
| 138 | static inline void acpi_disable_pci(void) { } | ||
| 139 | static inline void disable_acpi(void) { } | ||
| 140 | |||
| 141 | #endif /* !CONFIG_ACPI */ | ||
| 147 | 142 | ||
| 148 | #define ARCH_HAS_POWER_INIT 1 | 143 | #define ARCH_HAS_POWER_INIT 1 |
| 149 | 144 | ||
diff --git a/include/asm-i386/suspend.h b/include/asm-i386/suspend.h index 8dbaafe611ff..a2520732ffd6 100644 --- a/include/asm-i386/suspend.h +++ b/include/asm-i386/suspend.h | |||
| @@ -21,7 +21,7 @@ struct saved_context { | |||
| 21 | unsigned long return_address; | 21 | unsigned long return_address; |
| 22 | } __attribute__((packed)); | 22 | } __attribute__((packed)); |
| 23 | 23 | ||
| 24 | #ifdef CONFIG_ACPI_SLEEP | 24 | #ifdef CONFIG_ACPI |
| 25 | extern unsigned long saved_eip; | 25 | extern unsigned long saved_eip; |
| 26 | extern unsigned long saved_esp; | 26 | extern unsigned long saved_esp; |
| 27 | extern unsigned long saved_ebp; | 27 | extern unsigned long saved_ebp; |
diff --git a/include/asm-ia64/acpi.h b/include/asm-ia64/acpi.h index 5b526357d178..49730ffbbae4 100644 --- a/include/asm-ia64/acpi.h +++ b/include/asm-ia64/acpi.h | |||
| @@ -100,6 +100,11 @@ const char *acpi_get_sysname (void); | |||
| 100 | int acpi_request_vector (u32 int_type); | 100 | int acpi_request_vector (u32 int_type); |
| 101 | int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); | 101 | int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); |
| 102 | 102 | ||
| 103 | /* routines for saving/restoring kernel state */ | ||
| 104 | extern int acpi_save_state_mem(void); | ||
| 105 | extern void acpi_restore_state_mem(void); | ||
| 106 | extern unsigned long acpi_wakeup_address; | ||
| 107 | |||
| 103 | /* | 108 | /* |
| 104 | * Record the cpei override flag and current logical cpu. This is | 109 | * Record the cpei override flag and current logical cpu. This is |
| 105 | * useful for CPU removal. | 110 | * useful for CPU removal. |
diff --git a/include/asm-x86_64/acpi.h b/include/asm-x86_64/acpi.h index 1da8f49c0fe2..98173357dd89 100644 --- a/include/asm-x86_64/acpi.h +++ b/include/asm-x86_64/acpi.h | |||
| @@ -108,6 +108,15 @@ static inline void acpi_disable_pci(void) | |||
| 108 | } | 108 | } |
| 109 | extern int acpi_irq_balance_set(char *str); | 109 | extern int acpi_irq_balance_set(char *str); |
| 110 | 110 | ||
| 111 | /* routines for saving/restoring kernel state */ | ||
| 112 | extern int acpi_save_state_mem(void); | ||
| 113 | extern void acpi_restore_state_mem(void); | ||
| 114 | |||
| 115 | extern unsigned long acpi_wakeup_address; | ||
| 116 | |||
| 117 | /* early initialization routine */ | ||
| 118 | extern void acpi_reserve_bootmem(void); | ||
| 119 | |||
| 111 | #else /* !CONFIG_ACPI */ | 120 | #else /* !CONFIG_ACPI */ |
| 112 | 121 | ||
| 113 | #define acpi_lapic 0 | 122 | #define acpi_lapic 0 |
| @@ -121,19 +130,6 @@ extern int acpi_numa; | |||
| 121 | extern int acpi_scan_nodes(unsigned long start, unsigned long end); | 130 | extern int acpi_scan_nodes(unsigned long start, unsigned long end); |
| 122 | #define NR_NODE_MEMBLKS (MAX_NUMNODES*2) | 131 | #define NR_NODE_MEMBLKS (MAX_NUMNODES*2) |
| 123 | 132 | ||
| 124 | #ifdef CONFIG_ACPI_SLEEP | ||
| 125 | |||
| 126 | /* routines for saving/restoring kernel state */ | ||
| 127 | extern int acpi_save_state_mem(void); | ||
| 128 | extern void acpi_restore_state_mem(void); | ||
| 129 | |||
| 130 | extern unsigned long acpi_wakeup_address; | ||
| 131 | |||
| 132 | /* early initialization routine */ | ||
| 133 | extern void acpi_reserve_bootmem(void); | ||
| 134 | |||
| 135 | #endif /*CONFIG_ACPI_SLEEP*/ | ||
| 136 | |||
| 137 | extern int acpi_disabled; | 133 | extern int acpi_disabled; |
| 138 | extern int acpi_pci_disabled; | 134 | extern int acpi_pci_disabled; |
| 139 | 135 | ||
diff --git a/include/asm-x86_64/suspend.h b/include/asm-x86_64/suspend.h index 9c3f8de90d2d..b897e8cb55fb 100644 --- a/include/asm-x86_64/suspend.h +++ b/include/asm-x86_64/suspend.h | |||
| @@ -44,7 +44,6 @@ extern unsigned long saved_context_eflags; | |||
| 44 | 44 | ||
| 45 | extern void fix_processor_context(void); | 45 | extern void fix_processor_context(void); |
| 46 | 46 | ||
| 47 | #ifdef CONFIG_ACPI_SLEEP | ||
| 48 | extern unsigned long saved_rip; | 47 | extern unsigned long saved_rip; |
| 49 | extern unsigned long saved_rsp; | 48 | extern unsigned long saved_rsp; |
| 50 | extern unsigned long saved_rbp; | 49 | extern unsigned long saved_rbp; |
| @@ -54,4 +53,3 @@ extern unsigned long saved_rdi; | |||
| 54 | 53 | ||
| 55 | /* routines for saving/restoring kernel state */ | 54 | /* routines for saving/restoring kernel state */ |
| 56 | extern int acpi_save_state_mem(void); | 55 | extern int acpi_save_state_mem(void); |
| 57 | #endif | ||
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index ddebf3f2affe..eb26f2ba51ed 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 | #ifdef CONFIG_ACPI_SLEEP | 692 | #if defined(CONFIG_ACPI) && 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", |
