diff options
Diffstat (limited to 'arch/arm/include/asm/assembler.h')
-rw-r--r-- | arch/arm/include/asm/assembler.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h index 2ef95813fce0..eb87200aa4b5 100644 --- a/arch/arm/include/asm/assembler.h +++ b/arch/arm/include/asm/assembler.h | |||
@@ -250,6 +250,7 @@ | |||
250 | * Beware, it also clobers LR. | 250 | * Beware, it also clobers LR. |
251 | */ | 251 | */ |
252 | .macro safe_svcmode_maskall reg:req | 252 | .macro safe_svcmode_maskall reg:req |
253 | #if __LINUX_ARM_ARCH__ >= 6 | ||
253 | mrs \reg , cpsr | 254 | mrs \reg , cpsr |
254 | mov lr , \reg | 255 | mov lr , \reg |
255 | and lr , lr , #MODE_MASK | 256 | and lr , lr , #MODE_MASK |
@@ -266,6 +267,13 @@ THUMB( orr \reg , \reg , #PSR_T_BIT ) | |||
266 | __ERET | 267 | __ERET |
267 | 1: msr cpsr_c, \reg | 268 | 1: msr cpsr_c, \reg |
268 | 2: | 269 | 2: |
270 | #else | ||
271 | /* | ||
272 | * workaround for possibly broken pre-v6 hardware | ||
273 | * (akita, Sharp Zaurus C-1000, PXA270-based) | ||
274 | */ | ||
275 | setmode PSR_F_BIT | PSR_I_BIT | SVC_MODE, \reg | ||
276 | #endif | ||
269 | .endm | 277 | .endm |
270 | 278 | ||
271 | /* | 279 | /* |