diff options
-rw-r--r-- | arch/powerpc/kernel/entry_32.S | 8 | ||||
-rw-r--r-- | include/asm-powerpc/thread_info.h | 4 |
2 files changed, 11 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index 3a05e9f93d42..888a364043a8 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S | |||
@@ -147,6 +147,7 @@ transfer_to_handler: | |||
147 | lwz r12,TI_LOCAL_FLAGS(r9) | 147 | lwz r12,TI_LOCAL_FLAGS(r9) |
148 | mtcrf 0x01,r12 | 148 | mtcrf 0x01,r12 |
149 | bt- 31-TLF_NAPPING,4f | 149 | bt- 31-TLF_NAPPING,4f |
150 | bt- 31-TLF_SLEEPING,7f | ||
150 | #endif /* CONFIG_6xx */ | 151 | #endif /* CONFIG_6xx */ |
151 | .globl transfer_to_handler_cont | 152 | .globl transfer_to_handler_cont |
152 | transfer_to_handler_cont: | 153 | transfer_to_handler_cont: |
@@ -164,6 +165,13 @@ transfer_to_handler_cont: | |||
164 | 4: rlwinm r12,r12,0,~_TLF_NAPPING | 165 | 4: rlwinm r12,r12,0,~_TLF_NAPPING |
165 | stw r12,TI_LOCAL_FLAGS(r9) | 166 | stw r12,TI_LOCAL_FLAGS(r9) |
166 | b power_save_6xx_restore | 167 | b power_save_6xx_restore |
168 | |||
169 | 7: rlwinm r12,r12,0,~_TLF_SLEEPING | ||
170 | stw r12,TI_LOCAL_FLAGS(r9) | ||
171 | lwz r9,_MSR(r11) /* if sleeping, clear MSR.EE */ | ||
172 | rlwinm r9,r9,0,~MSR_EE | ||
173 | lwz r12,_LINK(r11) /* and return to address in LR */ | ||
174 | b fast_exception_return | ||
167 | #endif | 175 | #endif |
168 | 176 | ||
169 | /* | 177 | /* |
diff --git a/include/asm-powerpc/thread_info.h b/include/asm-powerpc/thread_info.h index e079e81051fd..b705c2a7651a 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) | |||
144 | /* Bits in local_flags */ | 144 | /* Bits in local_flags */ |
145 | /* Don't move TLF_NAPPING without adjusting the code in entry_32.S */ | 145 | /* Don't move TLF_NAPPING without adjusting the code in entry_32.S */ |
146 | #define TLF_NAPPING 0 /* idle thread enabled NAP mode */ | 146 | #define TLF_NAPPING 0 /* idle thread enabled NAP mode */ |
147 | #define TLF_RESTORE_SIGMASK 1 /* Restore signal mask in do_signal */ | 147 | #define TLF_SLEEPING 1 /* suspend code enabled SLEEP mode */ |
148 | #define TLF_RESTORE_SIGMASK 2 /* Restore signal mask in do_signal */ | ||
148 | 149 | ||
149 | #define _TLF_NAPPING (1 << TLF_NAPPING) | 150 | #define _TLF_NAPPING (1 << TLF_NAPPING) |
151 | #define _TLF_SLEEPING (1 << TLF_SLEEPING) | ||
150 | #define _TLF_RESTORE_SIGMASK (1 << TLF_RESTORE_SIGMASK) | 152 | #define _TLF_RESTORE_SIGMASK (1 << TLF_RESTORE_SIGMASK) |
151 | 153 | ||
152 | #ifndef __ASSEMBLY__ | 154 | #ifndef __ASSEMBLY__ |