diff options
author | Nicolas Pitre <nico@org.rmk.(none)> | 2005-05-05 18:24:45 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-05-05 18:24:45 -0400 |
commit | 4b0e07a5566a4e3f141e52c1f17e683e4a5bba91 (patch) | |
tree | 4a2f67e6cb6ea665c6d45529a5b7c61ac255663d /arch/arm/kernel/traps.c | |
parent | f7e68bbf405a45d6e7c5b8fc384ff1ba20dd7aa4 (diff) |
[PATCH] ARM: 2663/1: straightify TLS register emulation a bit more
Patch from Nicolas Pitre
This better express things, and should cover RMK's weird SMP toys.
Signed-off-by: Nicolas Pitre
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/traps.c')
-rw-r--r-- | arch/arm/kernel/traps.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 8988c02119fd..14df16b983f4 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -451,9 +451,9 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) | |||
451 | 451 | ||
452 | case NR(set_tls): | 452 | case NR(set_tls): |
453 | thread->tp_value = regs->ARM_r0; | 453 | thread->tp_value = regs->ARM_r0; |
454 | #ifdef CONFIG_HAS_TLS_REG | 454 | #if defined(CONFIG_HAS_TLS_REG) |
455 | asm ("mcr p15, 0, %0, c13, c0, 3" : : "r" (regs->ARM_r0) ); | 455 | asm ("mcr p15, 0, %0, c13, c0, 3" : : "r" (regs->ARM_r0) ); |
456 | #else | 456 | #elif !defined(CONFIG_TLS_REG_EMUL) |
457 | /* | 457 | /* |
458 | * User space must never try to access this directly. | 458 | * User space must never try to access this directly. |
459 | * Expect your app to break eventually if you do so. | 459 | * Expect your app to break eventually if you do so. |
@@ -498,11 +498,14 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) | |||
498 | return 0; | 498 | return 0; |
499 | } | 499 | } |
500 | 500 | ||
501 | #if defined(CONFIG_CPU_32v6) && !defined(CONFIG_HAS_TLS_REG) | 501 | #ifdef CONFIG_TLS_REG_EMUL |
502 | 502 | ||
503 | /* | 503 | /* |
504 | * We might be running on an ARMv6+ processor which should have the TLS | 504 | * We might be running on an ARMv6+ processor which should have the TLS |
505 | * register, but for some reason we can't use it and have to emulate it. | 505 | * register but for some reason we can't use it, or maybe an SMP system |
506 | * using a pre-ARMv6 processor (there are apparently a few prototypes like | ||
507 | * that in existence) and therefore access to that register must be | ||
508 | * emulated. | ||
506 | */ | 509 | */ |
507 | 510 | ||
508 | static int get_tp_trap(struct pt_regs *regs, unsigned int instr) | 511 | static int get_tp_trap(struct pt_regs *regs, unsigned int instr) |