@@ -797,7 +797,10 @@ ENTRY(__switch_to)
#if defined(CONFIG_CC_STACKPROTECTOR) && !defined(CONFIG_SMP)
ldr r7, [r2, #TI_TASK]
ldr r8, =__stack_chk_guard
- ldr r7, [r7, #TSK_STACK_CANARY]
+ .if (TSK_STACK_CANARY > PAGE_MASK)
+ add r7, r7, #TSK_STACK_CANARY & PAGE_MASK
+ .endif
+ ldr r7, [r7, #TSK_STACK_CANARY & ~PAGE_MASK]
#endif
#ifdef CONFIG_CPU_USE_DOMAINS
mcr p15, 0, r6, c3, c0, 0 @ Set domain register
@@ -37,7 +37,10 @@
bic \rd, sp, #8128
bic \rd, \rd, #63
ldr \rd, [\rd, #TI_TASK]
- ldr \rd, [\rd, #TSK_ACTIVE_MM]
+ .if (TSK_ACTIVE_MM > PAGE_MASK)
+ add \rd, \rd, #TSK_ACTIVE_MM & PAGE_MASK
+ .endif
+ ldr \rd, [\rd, #TSK_ACTIVE_MM & ~PAGE_MASK]
.endm
/*