diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-02-01 22:29:57 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-02-01 22:29:57 -0500 |
commit | 687fcdf741e4a268c2c7bac8b3734de761bb9719 (patch) | |
tree | 82603cd0f892b13d4252cc525ecaec99bb86c0cd /arch | |
parent | 215e871aaa3d94540121a3809d80d0c5e5686e4f (diff) | |
parent | a6eb84bc1e069e1d285167e09035ed6c27978feb (diff) |
Merge branch 'suspend' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'suspend' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (38 commits)
suspend: cleanup reference to swsusp_pg_dir[]
PM: Remove obsolete /sys/devices/.../power/state docs
Hibernation: Invoke suspend notifications after console switch
Suspend: Invoke suspend notifications after console switch
Suspend: Clean up suspend_64.c
Suspend: Add config option to disable the freezer if architecture wants that
ACPI: Print message before calling _PTS
ACPI hibernation: Call _PTS before suspending devices
Hibernation: Introduce begin() and end() callbacks
ACPI suspend: Call _PTS before suspending devices
ACPI: Separate disabling of GPEs from _PTS
ACPI: Separate invocations of _GTS and _BFS from _PTS and _WAK
Suspend: Introduce begin() and end() callbacks
suspend: fix ia64 allmodconfig build
ACPI: clear GPE earily in resume to avoid warning
Suspend: Clean up Kconfig (V2)
Hibernation: Clean up Kconfig (V2)
Hibernation: Update messages
Suspend: Use common prefix in messages
Hibernation: Remove unnecessary variable declaration
...
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/Kconfig | 3 | ||||
-rw-r--r-- | arch/arm/mach-at91/pm.c | 17 | ||||
-rw-r--r-- | arch/blackfin/Kconfig | 4 | ||||
-rw-r--r-- | arch/frv/Kconfig | 5 | ||||
-rw-r--r-- | arch/mips/Kconfig | 4 | ||||
-rw-r--r-- | arch/powerpc/Kconfig | 22 | ||||
-rw-r--r-- | arch/powerpc/platforms/52xx/lite5200_pm.c | 10 | ||||
-rw-r--r-- | arch/sh/Kconfig | 4 | ||||
-rw-r--r-- | arch/x86/Kconfig | 8 | ||||
-rw-r--r-- | arch/x86/kernel/suspend_64.c | 8 | ||||
-rw-r--r-- | arch/x86/mm/init_32.c | 10 |
11 files changed, 80 insertions, 15 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 5d5997ca7011..4b1a8e3d292c 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -1030,6 +1030,9 @@ menu "Power management options" | |||
1030 | 1030 | ||
1031 | source "kernel/power/Kconfig" | 1031 | source "kernel/power/Kconfig" |
1032 | 1032 | ||
1033 | config ARCH_SUSPEND_POSSIBLE | ||
1034 | def_bool y | ||
1035 | |||
1033 | endmenu | 1036 | endmenu |
1034 | 1037 | ||
1035 | source "net/Kconfig" | 1038 | source "net/Kconfig" |
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index 4b120cc36135..a67defd50438 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c | |||
@@ -52,7 +52,7 @@ static suspend_state_t target_state; | |||
52 | /* | 52 | /* |
53 | * Called after processes are frozen, but before we shutdown devices. | 53 | * Called after processes are frozen, but before we shutdown devices. |
54 | */ | 54 | */ |
55 | static int at91_pm_set_target(suspend_state_t state) | 55 | static int at91_pm_begin(suspend_state_t state) |
56 | { | 56 | { |
57 | target_state = state; | 57 | target_state = state; |
58 | return 0; | 58 | return 0; |
@@ -202,11 +202,20 @@ error: | |||
202 | return 0; | 202 | return 0; |
203 | } | 203 | } |
204 | 204 | ||
205 | /* | ||
206 | * Called right prior to thawing processes. | ||
207 | */ | ||
208 | static void at91_pm_end(void) | ||
209 | { | ||
210 | target_state = PM_SUSPEND_ON; | ||
211 | } | ||
212 | |||
205 | 213 | ||
206 | static struct platform_suspend_ops at91_pm_ops ={ | 214 | static struct platform_suspend_ops at91_pm_ops ={ |
207 | .valid = at91_pm_valid_state, | 215 | .valid = at91_pm_valid_state, |
208 | .set_target = at91_pm_set_target, | 216 | .begin = at91_pm_begin, |
209 | .enter = at91_pm_enter, | 217 | .enter = at91_pm_enter, |
218 | .end = at91_pm_end, | ||
210 | }; | 219 | }; |
211 | 220 | ||
212 | static int __init at91_pm_init(void) | 221 | static int __init at91_pm_init(void) |
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index fc7ca86ac8bf..4802eb767dc9 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig | |||
@@ -898,6 +898,10 @@ endmenu | |||
898 | menu "Power management options" | 898 | menu "Power management options" |
899 | source "kernel/power/Kconfig" | 899 | source "kernel/power/Kconfig" |
900 | 900 | ||
901 | config ARCH_SUSPEND_POSSIBLE | ||
902 | def_bool y | ||
903 | depends on !SMP | ||
904 | |||
901 | choice | 905 | choice |
902 | prompt "Select PM Wakeup Event Source" | 906 | prompt "Select PM Wakeup Event Source" |
903 | default PM_WAKEUP_GPIO_BY_SIC_IWR | 907 | default PM_WAKEUP_GPIO_BY_SIC_IWR |
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig index afb19b0d761d..e3f965c91e22 100644 --- a/arch/frv/Kconfig +++ b/arch/frv/Kconfig | |||
@@ -352,6 +352,11 @@ source "drivers/pcmcia/Kconfig" | |||
352 | # should probably wait a while. | 352 | # should probably wait a while. |
353 | 353 | ||
354 | menu "Power management options" | 354 | menu "Power management options" |
355 | |||
356 | config ARCH_SUSPEND_POSSIBLE | ||
357 | def_bool y | ||
358 | depends on !SMP | ||
359 | |||
355 | source kernel/power/Kconfig | 360 | source kernel/power/Kconfig |
356 | endmenu | 361 | endmenu |
357 | 362 | ||
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 09e7bf3723df..36a4018f71d2 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -2081,6 +2081,10 @@ endmenu | |||
2081 | 2081 | ||
2082 | menu "Power management options" | 2082 | menu "Power management options" |
2083 | 2083 | ||
2084 | config ARCH_SUSPEND_POSSIBLE | ||
2085 | def_bool y | ||
2086 | depends on !SMP | ||
2087 | |||
2084 | source "kernel/power/Kconfig" | 2088 | source "kernel/power/Kconfig" |
2085 | 2089 | ||
2086 | endmenu | 2090 | endmenu |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 9c44af3db8d9..4a22c9928618 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -151,11 +151,25 @@ config DEFAULT_UIMAGE | |||
151 | config REDBOOT | 151 | config REDBOOT |
152 | bool | 152 | bool |
153 | 153 | ||
154 | config PPC64_SWSUSP | 154 | config HIBERNATE_32 |
155 | bool | 155 | bool |
156 | depends on PPC64 && (BROKEN || (PPC_PMAC64 && EXPERIMENTAL)) | 156 | depends on (PPC_PMAC && !SMP) || BROKEN |
157 | default y | 157 | default y |
158 | 158 | ||
159 | config HIBERNATE_64 | ||
160 | bool | ||
161 | depends on BROKEN || (PPC_PMAC64 && EXPERIMENTAL) | ||
162 | default y | ||
163 | |||
164 | config ARCH_HIBERNATION_POSSIBLE | ||
165 | bool | ||
166 | depends on (PPC64 && HIBERNATE_64) || (PPC32 && HIBERNATE_32) | ||
167 | default y | ||
168 | |||
169 | config ARCH_SUSPEND_POSSIBLE | ||
170 | def_bool y | ||
171 | depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200 | ||
172 | |||
159 | config PPC_DCR_NATIVE | 173 | config PPC_DCR_NATIVE |
160 | bool | 174 | bool |
161 | default n | 175 | default n |
@@ -391,6 +405,10 @@ config CMDLINE | |||
391 | most cases you will need to specify the root device here. | 405 | most cases you will need to specify the root device here. |
392 | 406 | ||
393 | if !44x || BROKEN | 407 | if !44x || BROKEN |
408 | config ARCH_WANTS_FREEZER_CONTROL | ||
409 | def_bool y | ||
410 | depends on ADB_PMU | ||
411 | |||
394 | source kernel/power/Kconfig | 412 | source kernel/power/Kconfig |
395 | endif | 413 | endif |
396 | 414 | ||
diff --git a/arch/powerpc/platforms/52xx/lite5200_pm.c b/arch/powerpc/platforms/52xx/lite5200_pm.c index c0f13e8deb0b..41c7fd91e99e 100644 --- a/arch/powerpc/platforms/52xx/lite5200_pm.c +++ b/arch/powerpc/platforms/52xx/lite5200_pm.c | |||
@@ -31,7 +31,7 @@ static int lite5200_pm_valid(suspend_state_t state) | |||
31 | } | 31 | } |
32 | } | 32 | } |
33 | 33 | ||
34 | static int lite5200_pm_set_target(suspend_state_t state) | 34 | static int lite5200_pm_begin(suspend_state_t state) |
35 | { | 35 | { |
36 | if (lite5200_pm_valid(state)) { | 36 | if (lite5200_pm_valid(state)) { |
37 | lite5200_pm_target_state = state; | 37 | lite5200_pm_target_state = state; |
@@ -219,12 +219,18 @@ static void lite5200_pm_finish(void) | |||
219 | mpc52xx_pm_finish(); | 219 | mpc52xx_pm_finish(); |
220 | } | 220 | } |
221 | 221 | ||
222 | static void lite5200_pm_end(void) | ||
223 | { | ||
224 | lite5200_pm_target_state = PM_SUSPEND_ON; | ||
225 | } | ||
226 | |||
222 | static struct platform_suspend_ops lite5200_pm_ops = { | 227 | static struct platform_suspend_ops lite5200_pm_ops = { |
223 | .valid = lite5200_pm_valid, | 228 | .valid = lite5200_pm_valid, |
224 | .set_target = lite5200_pm_set_target, | 229 | .begin = lite5200_pm_begin, |
225 | .prepare = lite5200_pm_prepare, | 230 | .prepare = lite5200_pm_prepare, |
226 | .enter = lite5200_pm_enter, | 231 | .enter = lite5200_pm_enter, |
227 | .finish = lite5200_pm_finish, | 232 | .finish = lite5200_pm_finish, |
233 | .end = lite5200_pm_end, | ||
228 | }; | 234 | }; |
229 | 235 | ||
230 | int __init lite5200_pm_init(void) | 236 | int __init lite5200_pm_init(void) |
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 1cd9c8fd927d..b30c4c376a83 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -882,6 +882,10 @@ endmenu | |||
882 | menu "Power management options (EXPERIMENTAL)" | 882 | menu "Power management options (EXPERIMENTAL)" |
883 | depends on EXPERIMENTAL && SYS_SUPPORTS_PM | 883 | depends on EXPERIMENTAL && SYS_SUPPORTS_PM |
884 | 884 | ||
885 | config ARCH_SUSPEND_POSSIBLE | ||
886 | def_bool y | ||
887 | depends on !SMP | ||
888 | |||
885 | source kernel/power/Kconfig | 889 | source kernel/power/Kconfig |
886 | 890 | ||
887 | endmenu | 891 | endmenu |
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index bb07f87d8622..7109037bdf7c 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -112,6 +112,14 @@ config ARCH_SUPPORTS_OPROFILE | |||
112 | 112 | ||
113 | select HAVE_KVM | 113 | select HAVE_KVM |
114 | 114 | ||
115 | config ARCH_HIBERNATION_POSSIBLE | ||
116 | def_bool y | ||
117 | depends on !SMP || !X86_VOYAGER | ||
118 | |||
119 | config ARCH_SUSPEND_POSSIBLE | ||
120 | def_bool y | ||
121 | depends on !X86_VOYAGER | ||
122 | |||
115 | config ZONE_DMA32 | 123 | config ZONE_DMA32 |
116 | bool | 124 | bool |
117 | default X86_64 | 125 | default X86_64 |
diff --git a/arch/x86/kernel/suspend_64.c b/arch/x86/kernel/suspend_64.c index 09199511c256..7ac7130022f1 100644 --- a/arch/x86/kernel/suspend_64.c +++ b/arch/x86/kernel/suspend_64.c | |||
@@ -140,7 +140,12 @@ static void fix_processor_context(void) | |||
140 | int cpu = smp_processor_id(); | 140 | int cpu = smp_processor_id(); |
141 | struct tss_struct *t = &per_cpu(init_tss, cpu); | 141 | struct tss_struct *t = &per_cpu(init_tss, cpu); |
142 | 142 | ||
143 | set_tss_desc(cpu,t); /* This just modifies memory; should not be necessary. But... This is necessary, because 386 hardware has concept of busy TSS or some similar stupidity. */ | 143 | /* |
144 | * This just modifies memory; should not be necessary. But... This | ||
145 | * is necessary, because 386 hardware has concept of busy TSS or some | ||
146 | * similar stupidity. | ||
147 | */ | ||
148 | set_tss_desc(cpu, t); | ||
144 | 149 | ||
145 | get_cpu_gdt_table(cpu)[GDT_ENTRY_TSS].type = 9; | 150 | get_cpu_gdt_table(cpu)[GDT_ENTRY_TSS].type = 9; |
146 | 151 | ||
@@ -160,7 +165,6 @@ static void fix_processor_context(void) | |||
160 | loaddebug(¤t->thread, 6); | 165 | loaddebug(¤t->thread, 6); |
161 | loaddebug(¤t->thread, 7); | 166 | loaddebug(¤t->thread, 7); |
162 | } | 167 | } |
163 | |||
164 | } | 168 | } |
165 | 169 | ||
166 | #ifdef CONFIG_HIBERNATION | 170 | #ifdef CONFIG_HIBERNATION |
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index da524fb22422..f2f36f8dae52 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c | |||
@@ -423,23 +423,23 @@ static void __init pagetable_init(void) | |||
423 | paravirt_pagetable_setup_done(pgd_base); | 423 | paravirt_pagetable_setup_done(pgd_base); |
424 | } | 424 | } |
425 | 425 | ||
426 | #if defined(CONFIG_HIBERNATION) || defined(CONFIG_ACPI) | 426 | #ifdef CONFIG_ACPI_SLEEP |
427 | /* | 427 | /* |
428 | * Swap suspend & friends need this for resume because things like the intel-agp | 428 | * ACPI suspend needs this for resume, because things like the intel-agp |
429 | * driver might have split up a kernel 4MB mapping. | 429 | * driver might have split up a kernel 4MB mapping. |
430 | */ | 430 | */ |
431 | char __nosavedata swsusp_pg_dir[PAGE_SIZE] | 431 | char swsusp_pg_dir[PAGE_SIZE] |
432 | __attribute__ ((aligned(PAGE_SIZE))); | 432 | __attribute__ ((aligned(PAGE_SIZE))); |
433 | 433 | ||
434 | static inline void save_pg_dir(void) | 434 | static inline void save_pg_dir(void) |
435 | { | 435 | { |
436 | memcpy(swsusp_pg_dir, swapper_pg_dir, PAGE_SIZE); | 436 | memcpy(swsusp_pg_dir, swapper_pg_dir, PAGE_SIZE); |
437 | } | 437 | } |
438 | #else | 438 | #else /* !CONFIG_ACPI_SLEEP */ |
439 | static inline void save_pg_dir(void) | 439 | static inline void save_pg_dir(void) |
440 | { | 440 | { |
441 | } | 441 | } |
442 | #endif | 442 | #endif /* !CONFIG_ACPI_SLEEP */ |
443 | 443 | ||
444 | void zap_low_mappings(void) | 444 | void zap_low_mappings(void) |
445 | { | 445 | { |