aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sparc/include/asm/spinlock_64.h17
-rw-r--r--arch/sparc64/kernel/etrap.S6
-rw-r--r--arch/sparc64/kernel/rtrap.S6
3 files changed, 12 insertions, 17 deletions
diff --git a/arch/sparc/include/asm/spinlock_64.h b/arch/sparc/include/asm/spinlock_64.h
index 120cfe4577c7..fbac9d00744a 100644
--- a/arch/sparc/include/asm/spinlock_64.h
+++ b/arch/sparc/include/asm/spinlock_64.h
@@ -13,17 +13,12 @@
13 * and rebuild your kernel. 13 * and rebuild your kernel.
14 */ 14 */
15 15
16/* All of these locking primitives are expected to work properly 16/* Because we play games to save cycles in the non-contention case, we
17 * even in an RMO memory model, which currently is what the kernel 17 * need to be extra careful about branch targets into the "spinning"
18 * runs in. 18 * code. They live in their own section, but the newer V9 branches
19 * 19 * have a shorter range than the traditional 32-bit sparc branch
20 * There is another issue. Because we play games to save cycles 20 * variants. The rule is that the branches that go into and out of
21 * in the non-contention case, we need to be extra careful about 21 * the spinner sections must be pre-V9 branches.
22 * branch targets into the "spinning" code. They live in their
23 * own section, but the newer V9 branches have a shorter range
24 * than the traditional 32-bit sparc branch variants. The rule
25 * is that the branches that go into and out of the spinner sections
26 * must be pre-V9 branches.
27 */ 22 */
28 23
29#define __raw_spin_is_locked(lp) ((lp)->lock != 0) 24#define __raw_spin_is_locked(lp) ((lp)->lock != 0)
diff --git a/arch/sparc64/kernel/etrap.S b/arch/sparc64/kernel/etrap.S
index 29ce489bc188..786b185e6e3f 100644
--- a/arch/sparc64/kernel/etrap.S
+++ b/arch/sparc64/kernel/etrap.S
@@ -16,9 +16,9 @@
16#include <asm/mmu.h> 16#include <asm/mmu.h>
17 17
18#define TASK_REGOFF (THREAD_SIZE-TRACEREG_SZ-STACKFRAME_SZ) 18#define TASK_REGOFF (THREAD_SIZE-TRACEREG_SZ-STACKFRAME_SZ)
19#define ETRAP_PSTATE1 (PSTATE_RMO | PSTATE_PRIV) 19#define ETRAP_PSTATE1 (PSTATE_TSO | PSTATE_PRIV)
20#define ETRAP_PSTATE2 \ 20#define ETRAP_PSTATE2 \
21 (PSTATE_RMO | PSTATE_PEF | PSTATE_PRIV | PSTATE_IE) 21 (PSTATE_TSO | PSTATE_PEF | PSTATE_PRIV | PSTATE_IE)
22 22
23/* 23/*
24 * On entry, %g7 is return address - 0x4. 24 * On entry, %g7 is return address - 0x4.
@@ -130,7 +130,7 @@ etrap_save: save %g2, -STACK_BIAS, %sp
130 stx %g6, [%sp + PTREGS_OFF + PT_V9_G6] 130 stx %g6, [%sp + PTREGS_OFF + PT_V9_G6]
131 stx %g7, [%sp + PTREGS_OFF + PT_V9_G7] 131 stx %g7, [%sp + PTREGS_OFF + PT_V9_G7]
132 or %l7, %l0, %l7 132 or %l7, %l0, %l7
133 sethi %hi(TSTATE_RMO | TSTATE_PEF), %l0 133 sethi %hi(TSTATE_TSO | TSTATE_PEF), %l0
134 or %l7, %l0, %l7 134 or %l7, %l0, %l7
135 wrpr %l2, %tnpc 135 wrpr %l2, %tnpc
136 wrpr %l7, (TSTATE_PRIV | TSTATE_IE), %tstate 136 wrpr %l7, (TSTATE_PRIV | TSTATE_IE), %tstate
diff --git a/arch/sparc64/kernel/rtrap.S b/arch/sparc64/kernel/rtrap.S
index 97a993c1f7f3..6892cf556f45 100644
--- a/arch/sparc64/kernel/rtrap.S
+++ b/arch/sparc64/kernel/rtrap.S
@@ -14,9 +14,9 @@
14#include <asm/visasm.h> 14#include <asm/visasm.h>
15#include <asm/processor.h> 15#include <asm/processor.h>
16 16
17#define RTRAP_PSTATE (PSTATE_RMO|PSTATE_PEF|PSTATE_PRIV|PSTATE_IE) 17#define RTRAP_PSTATE (PSTATE_TSO|PSTATE_PEF|PSTATE_PRIV|PSTATE_IE)
18#define RTRAP_PSTATE_IRQOFF (PSTATE_RMO|PSTATE_PEF|PSTATE_PRIV) 18#define RTRAP_PSTATE_IRQOFF (PSTATE_TSO|PSTATE_PEF|PSTATE_PRIV)
19#define RTRAP_PSTATE_AG_IRQOFF (PSTATE_RMO|PSTATE_PEF|PSTATE_PRIV|PSTATE_AG) 19#define RTRAP_PSTATE_AG_IRQOFF (PSTATE_TSO|PSTATE_PEF|PSTATE_PRIV|PSTATE_AG)
20 20
21 .text 21 .text
22 .align 32 22 .align 32