From: Brian Swetland Date: Thu, 29 Jan 2009 04:45:48 +0000 (-0800) Subject: HACK stay compatible with the emulated TLS register HACK X-Git-Tag: firefly_0821_release~9833^2~5^2~245 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f00c8f71dae5a16b7fab0e77fc8b32feac9d38a7;p=firefly-linux-kernel-4.4.55.git HACK stay compatible with the emulated TLS register HACK Change-Id: I06453a7ce78a3d201f3cd5145d3000b0d9ba11fe --- 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.