aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/i386/kernel/acpi/Makefile2
-rw-r--r--arch/i386/kernel/setup.c2
-rw-r--r--arch/i386/mm/init.c2
-rw-r--r--arch/ia64/kernel/acpi.c19
-rw-r--r--arch/x86_64/kernel/acpi/Makefile2
-rw-r--r--arch/x86_64/kernel/acpi/sleep.c4
-rw-r--r--arch/x86_64/kernel/head.S2
-rw-r--r--arch/x86_64/kernel/setup.c2
-rw-r--r--drivers/acpi/Kconfig10
-rw-r--r--drivers/acpi/sleep/Makefile4
-rw-r--r--drivers/acpi/sleep/main.c2
-rw-r--r--drivers/acpi/sleep/poweroff.c2
-rw-r--r--drivers/acpi/sleep/wakeup.c2
-rw-r--r--include/acpi/acpi_drivers.h4
-rw-r--r--include/asm-i386/acpi.h23
-rw-r--r--include/asm-i386/suspend.h2
-rw-r--r--include/asm-ia64/acpi.h5
-rw-r--r--include/asm-x86_64/acpi.h22
-rw-r--r--include/asm-x86_64/suspend.h2
-rw-r--r--kernel/sysctl.c2
20 files changed, 57 insertions, 58 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
2ifneq ($(CONFIG_PCI),) 2ifneq ($(CONFIG_PCI),)
3obj-$(CONFIG_X86_IO_APIC) += earlyquirk.o 3obj-$(CONFIG_X86_IO_APIC) += earlyquirk.o
4endif 4endif
5obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o 5obj-$(CONFIG_ACPI) += sleep.o wakeup.o
6 6
7ifneq ($(CONFIG_ACPI_PROCESSOR),) 7ifneq ($(CONFIG_ACPI_PROCESSOR),)
8obj-y += cstate.o processor.o 8obj-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);
67unsigned int acpi_cpei_override; 67unsigned int acpi_cpei_override;
68unsigned int acpi_cpei_phys_cpuid; 68unsigned int acpi_cpei_phys_cpuid;
69 69
70unsigned long acpi_wakeup_address = 0;
71
70const char __init * 72const char __init *
71acpi_get_sysname(void) 73acpi_get_sysname(void)
72{ 74{
@@ -986,4 +988,21 @@ int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base)
986 988
987EXPORT_SYMBOL(acpi_unregister_ioapic); 989EXPORT_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 */
996int acpi_save_state_mem(void) { return 0; }
997
998/*
999 * acpi_restore_state()
1000 */
1001void acpi_restore_state_mem(void) {}
1002
1003/*
1004 * do_suspend_lowlevel()
1005 */
1006void 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 @@
1obj-y := boot.o 1obj-y := boot.o
2boot-y := ../../../i386/kernel/acpi/boot.o 2boot-y := ../../../i386/kernel/acpi/boot.o
3obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o 3obj-y += sleep.o wakeup.o
4 4
5ifneq ($(CONFIG_ACPI_PROCESSOR),) 5ifneq ($(CONFIG_ACPI_PROCESSOR),)
6obj-y += processor.o 6obj-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. */
57unsigned long acpi_wakeup_address = 0; 55unsigned long acpi_wakeup_address = 0;
58unsigned long acpi_realmode_flags; 56unsigned 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
122void acpi_pci_link_exit(void) 118void 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 524cbf151fc2..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,13 +45,6 @@ menuconfig ACPI
42 45
43if ACPI 46if ACPI
44 47
45config ACPI_SLEEP
46 bool
47 depends on X86
48 select HOTPLUG_CPU if SMP
49 select SUSPEND_SMP if SMP
50 default y
51
52config ACPI_PROCFS 48config ACPI_PROCFS
53 bool "Deprecated /proc/acpi files" 49 bool "Deprecated /proc/acpi files"
54 depends on PROC_FS 50 depends on PROC_FS
diff --git a/drivers/acpi/sleep/Makefile b/drivers/acpi/sleep/Makefile
index 195a4f69c0f7..01a993a1d086 100644
--- a/drivers/acpi/sleep/Makefile
+++ b/drivers/acpi/sleep/Makefile
@@ -1,5 +1,5 @@
1obj-y := poweroff.o wakeup.o 1obj-y := poweroff.o wakeup.o
2obj-$(CONFIG_ACPI_SLEEP) += main.o 2obj-y += main.o
3obj-$(CONFIG_ACPI_SLEEP) += proc.o 3obj-$(CONFIG_X86) += proc.o
4 4
5EXTRA_CFLAGS += $(ACPI_CFLAGS) 5EXTRA_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
19int acpi_sleep_prepare(u32 acpi_state) 19int 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/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")
17extern struct list_head acpi_wakeup_device_list; 17extern struct list_head acpi_wakeup_device_list;
18extern spinlock_t acpi_device_lock; 18extern 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
182late_initcall(acpi_wakeup_device_init); 181late_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
146extern int acpi_sleep_init(void); 145extern 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}
122extern int acpi_irq_balance_set(char *str); 122extern int acpi_irq_balance_set(char *str);
123 123
124#else /* !CONFIG_ACPI */
125
126#define acpi_lapic 0
127#define acpi_ioapic 0
128static inline void acpi_noirq_set(void) { }
129static inline void acpi_disable_pci(void) { }
130static 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 */
138extern int acpi_save_state_mem(void); 125extern int acpi_save_state_mem(void);
139extern void acpi_restore_state_mem(void); 126extern void acpi_restore_state_mem(void);
@@ -143,7 +130,15 @@ extern unsigned long acpi_wakeup_address;
143/* early initialization routine */ 130/* early initialization routine */
144extern void acpi_reserve_bootmem(void); 131extern 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
137static inline void acpi_noirq_set(void) { }
138static inline void acpi_disable_pci(void) { }
139static 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
25extern unsigned long saved_eip; 25extern unsigned long saved_eip;
26extern unsigned long saved_esp; 26extern unsigned long saved_esp;
27extern unsigned long saved_ebp; 27extern 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);
100int acpi_request_vector (u32 int_type); 100int acpi_request_vector (u32 int_type);
101int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); 101int acpi_gsi_to_irq (u32 gsi, unsigned int *irq);
102 102
103/* routines for saving/restoring kernel state */
104extern int acpi_save_state_mem(void);
105extern void acpi_restore_state_mem(void);
106extern 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}
109extern int acpi_irq_balance_set(char *str); 109extern int acpi_irq_balance_set(char *str);
110 110
111/* routines for saving/restoring kernel state */
112extern int acpi_save_state_mem(void);
113extern void acpi_restore_state_mem(void);
114
115extern unsigned long acpi_wakeup_address;
116
117/* early initialization routine */
118extern 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;
121extern int acpi_scan_nodes(unsigned long start, unsigned long end); 130extern 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 */
127extern int acpi_save_state_mem(void);
128extern void acpi_restore_state_mem(void);
129
130extern unsigned long acpi_wakeup_address;
131
132/* early initialization routine */
133extern void acpi_reserve_bootmem(void);
134
135#endif /*CONFIG_ACPI_SLEEP*/
136
137extern int acpi_disabled; 133extern int acpi_disabled;
138extern int acpi_pci_disabled; 134extern 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
45extern void fix_processor_context(void); 45extern void fix_processor_context(void);
46 46
47#ifdef CONFIG_ACPI_SLEEP
48extern unsigned long saved_rip; 47extern unsigned long saved_rip;
49extern unsigned long saved_rsp; 48extern unsigned long saved_rsp;
50extern unsigned long saved_rbp; 49extern 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 */
56extern int acpi_save_state_mem(void); 55extern 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",