aboutsummaryrefslogtreecommitdiff
path: root/sys/sparc64/sparc64/trap.c
diff options
context:
space:
mode:
authorMarius Strobl <marius@FreeBSD.org>2010-02-20 23:24:19 +0000
committerMarius Strobl <marius@FreeBSD.org>2010-02-20 23:24:19 +0000
commit9b824f84d541568bdeb44a7eb0985a831c8635ab (patch)
treee93ca7084184f69831be9ec848380cb2e7a4faf0 /sys/sparc64/sparc64/trap.c
parent04bde8528b1b23293ede30f43b079bd0f688a61e (diff)
downloadsrc-9b824f84d541568bdeb44a7eb0985a831c8635ab.tar.gz
src-9b824f84d541568bdeb44a7eb0985a831c8635ab.zip
Some machines can not only consist of CPUs running at different speeds
but also of different types, f.e. Sun Fire V890 can be equipped with a mix of UltraSPARC IV and IV+ CPUs, requiring different MMU initialization and different workarounds for model specific errata. Therefore move the CPU implementation number from a global variable to the per-CPU data. Functions which are called before the latter is available are passed the implementation number as a parameter now.
Notes
Notes: svn path=/head/; revision=204152
Diffstat (limited to 'sys/sparc64/sparc64/trap.c')
-rw-r--r--sys/sparc64/sparc64/trap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/sparc64/sparc64/trap.c b/sys/sparc64/sparc64/trap.c
index 56935c5f4cbd..3df335bcc48d 100644
--- a/sys/sparc64/sparc64/trap.c
+++ b/sys/sparc64/sparc64/trap.c
@@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$");
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/systm.h>
+#include <sys/pcpu.h>
#include <sys/pioctl.h>
#include <sys/ptrace.h>
#include <sys/proc.h>
@@ -391,7 +392,7 @@ trap(struct trapframe *tf)
if (tf->tf_tpc > (u_long)fas_nofault_begin &&
tf->tf_tpc < (u_long)fas_nofault_end) {
cache_flush();
- cache_enable();
+ cache_enable(PCPU_GET(impl));
tf->tf_tpc = (u_long)fas_fault;
tf->tf_tnpc = tf->tf_tpc + 4;
error = 0;