diff options
author | David S. Miller <davem@davemloft.net> | 2008-10-30 00:25:00 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-04 12:16:46 -0500 |
commit | 64f2dde3f743c8a1ad8c0a1aa74166c1034afd92 (patch) | |
tree | 5033069de9784f6c2a6f545e5dfafa97a2b430d8 /arch/sparc64/kernel/etrap.S | |
parent | c9bb6003dd096ad190e1594a7d835ae1c39fae8f (diff) |
sparc64: Run the kernel always in the TSO memory model.
The fact of the matter is, all UltraSPARC-III and later chips only
implement TSO. They don't implement PSO and RMO memory models at all.
Only the Ultra-I and Ultra-II family chips implement RMO and they are
only helped marginally by using this setting when executing kernel
code.
The big plus to doing this is that we can eliminate all of the non-Sync
memory barriers in the kernel except for the ones used in the optimized
memcpy/memset code (these use block load and store operations which
have their own memory ordering rules).
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/etrap.S')
-rw-r--r-- | arch/sparc64/kernel/etrap.S | 6 |
1 files changed, 3 insertions, 3 deletions
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 |