From f00c8f71dae5a16b7fab0e77fc8b32feac9d38a7 Mon Sep 17 00:00:00 2001 From: Brian Swetland Date: Wed, 28 Jan 2009 20:45:48 -0800 Subject: [PATCH] HACK stay compatible with the emulated TLS register HACK Change-Id: I06453a7ce78a3d201f3cd5145d3000b0d9ba11fe --- arch/arm/include/asm/tls.h | 4 +++- arch/arm/kernel/traps.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/tls.h b/arch/arm/include/asm/tls.h index e71d6ff8d104..80f749368e4f 100644 --- a/arch/arm/include/asm/tls.h +++ b/arch/arm/include/asm/tls.h @@ -7,6 +7,8 @@ .macro set_tls_v6k, tp, tmp1, tmp2 mcr p15, 0, \tp, c13, c0, 3 @ set TLS register + mov \tmp1, #0xffff0fff + str \tp, [\tmp1, #-15] @ set TLS value at 0xffff0ff0 .endm .macro set_tls_v6, tp, tmp1, tmp2 @@ -15,7 +17,7 @@ mov \tmp2, #0xffff0fff tst \tmp1, #HWCAP_TLS @ hardware TLS available? mcrne p15, 0, \tp, c13, c0, 3 @ yes, set TLS register - streq \tp, [\tmp2, #-15] @ set TLS value at 0xffff0ff0 + str \tp, [\tmp2, #-15] @ set TLS value at 0xffff0ff0 .endm .macro set_tls_software, tp, tmp1, tmp2 diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index cda78d59aa31..81ff213e08e3 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c @@ -524,7 +524,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) if (has_tls_reg) { asm ("mcr p15, 0, %0, c13, c0, 3" : : "r" (regs->ARM_r0)); - } else { + } /*else*/ { /* * User space must never try to access this directly. * Expect your app to break eventually if you do so. -- 2.34.1