aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/thread_info.h
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-05-14 14:30:48 +1000
committerPaul Mackerras <paulus@samba.org>2008-05-16 23:22:28 +1000
commita560643e21e1ac10f7398b45111aecdd7f47a4a5 (patch)
tree32cd887f782c35c60cc2a925ab4c49f762851319 /include/asm-powerpc/thread_info.h
parentfcff474ea5cb17ff015aa40e92ed86fede41f1e2 (diff)
downloadlinux-a560643e21e1ac10f7398b45111aecdd7f47a4a5.tar.gz
[POWERPC] Defer processing of interrupts when the CPU wakes from sleep mode
This provides a way to defer processing of an interrupt that wakes the processor out of sleep mode. On 32-bit platforms that use an interrupt to wake the processor, we have to have interrupts enabled in hardware at the point where we go to sleep, otherwise the processor will never wake up. However, because interrupts are logically disabled at this point, we don't want to process the interrupt straight away. This is handled by setting the _TLF_SLEEPING flag. When we get an interrupt and _TLF_SLEEPING is set, we firstly clear the MSR_EE (external interrupt enable) bit in the saved MSR value, and secondly we then return to the address in the link register, like we do for _TLF_NAPPING, but without actually handling the interrupt. Note that this is handled somewhat differently on powerbooks, so this new code will only be used on non-Apple machines. Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/thread_info.h')
-rw-r--r--include/asm-powerpc/thread_info.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/asm-powerpc/thread_info.h b/include/asm-powerpc/thread_info.h
index e079e81051fda1..b705c2a7651a92 100644
--- a/include/asm-powerpc/thread_info.h
+++ b/include/asm-powerpc/thread_info.h
@@ -144,9 +144,11 @@ static inline struct thread_info *current_thread_info(void)
/* Bits in local_flags */
/* Don't move TLF_NAPPING without adjusting the code in entry_32.S */
#define TLF_NAPPING 0 /* idle thread enabled NAP mode */
-#define TLF_RESTORE_SIGMASK 1 /* Restore signal mask in do_signal */
+#define TLF_SLEEPING 1 /* suspend code enabled SLEEP mode */
+#define TLF_RESTORE_SIGMASK 2 /* Restore signal mask in do_signal */
#define _TLF_NAPPING (1 << TLF_NAPPING)
+#define _TLF_SLEEPING (1 << TLF_SLEEPING)
#define _TLF_RESTORE_SIGMASK (1 << TLF_RESTORE_SIGMASK)
#ifndef __ASSEMBLY__