diff options
author | Scott Wood <scottwood@freescale.com> | 2007-12-12 12:35:19 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-12-21 06:13:35 -0500 |
commit | 7ac5dde99eb9fefdb526973c600075b7c5703a86 (patch) | |
tree | 3ea3277339990880697d2ce89197293b7a0a2277 /include/asm-powerpc/machdep.h | |
parent | cbea92383d0d55fb4b4eb5833488bfee325254d6 (diff) |
[POWERPC] Implement arch disable/enable irq hooks.
These hooks ensure that a decrementer interrupt is not pending when
suspending; otherwise, problems may occur on 6xx/7xx/7xxx-based
systems (except for powermacs, which use a separate suspend path).
For example, with deep sleep on the 831x, a pending decrementer will
cause a system freeze because the SoC thinks the decrementer interrupt
would have woken the system, but the core must have interrupts
disabled due to the setup required for deep sleep.
Changed via-pmu.c to use the new ppc_md hooks, and made the arch_*
functions call the generic_* functions unconditionally. -- paulus
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/machdep.h')
-rw-r--r-- | include/asm-powerpc/machdep.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/asm-powerpc/machdep.h b/include/asm-powerpc/machdep.h index 79c704ed5381..0872ec228c1e 100644 --- a/include/asm-powerpc/machdep.h +++ b/include/asm-powerpc/machdep.h | |||
@@ -251,6 +251,16 @@ struct machdep_calls { | |||
251 | */ | 251 | */ |
252 | void (*machine_kexec)(struct kimage *image); | 252 | void (*machine_kexec)(struct kimage *image); |
253 | #endif /* CONFIG_KEXEC */ | 253 | #endif /* CONFIG_KEXEC */ |
254 | |||
255 | #ifdef CONFIG_SUSPEND | ||
256 | /* These are called to disable and enable, respectively, IRQs when | ||
257 | * entering a suspend state. If NULL, then the generic versions | ||
258 | * will be called. The generic versions disable/enable the | ||
259 | * decrementer along with interrupts. | ||
260 | */ | ||
261 | void (*suspend_disable_irqs)(void); | ||
262 | void (*suspend_enable_irqs)(void); | ||
263 | #endif | ||
254 | }; | 264 | }; |
255 | 265 | ||
256 | extern void power4_idle(void); | 266 | extern void power4_idle(void); |
@@ -347,5 +357,8 @@ static inline void log_error(char *buf, unsigned int err_type, int fatal) | |||
347 | #define machine_late_initcall(mach,fn) __define_machine_initcall(mach,"7",fn,7) | 357 | #define machine_late_initcall(mach,fn) __define_machine_initcall(mach,"7",fn,7) |
348 | #define machine_late_initcall_sync(mach,fn) __define_machine_initcall(mach,"7s",fn,7s) | 358 | #define machine_late_initcall_sync(mach,fn) __define_machine_initcall(mach,"7s",fn,7s) |
349 | 359 | ||
360 | void generic_suspend_disable_irqs(void); | ||
361 | void generic_suspend_enable_irqs(void); | ||
362 | |||
350 | #endif /* __KERNEL__ */ | 363 | #endif /* __KERNEL__ */ |
351 | #endif /* _ASM_POWERPC_MACHDEP_H */ | 364 | #endif /* _ASM_POWERPC_MACHDEP_H */ |