diff options
author | 2010-04-16 17:44:00 +0000 | |
---|---|---|
committer | 2010-04-16 17:44:00 +0000 | |
commit | 80e009bb9ff3348fa2a9ff076231419d0b35f090 (patch) | |
tree | 156f93ff0909e2221d6163e5f2a68172f844421b | |
parent | Additional gtt alignment paranoia: (diff) | |
download | wireguard-openbsd-80e009bb9ff3348fa2a9ff076231419d0b35f090.tar.xz wireguard-openbsd-80e009bb9ff3348fa2a9ff076231419d0b35f090.zip |
Use a somewhat bigger hammer and als flush tlb entries that have the global
bit set. While there, add an #ifdef MULTIPROCESSOR to make the diff between
amd64 and i386 smaller.
ok art@
-rw-r--r-- | sys/arch/amd64/amd64/cpu.c | 4 | ||||
-rw-r--r-- | sys/arch/i386/i386/cpu.c | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/arch/amd64/amd64/cpu.c b/sys/arch/amd64/amd64/cpu.c index e57aafa9055..64f5df05a62 100644 --- a/sys/arch/amd64/amd64/cpu.c +++ b/sys/arch/amd64/amd64/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.31 2010/04/08 19:27:40 kettenis Exp $ */ +/* $OpenBSD: cpu.c,v 1.32 2010/04/16 17:44:00 kettenis Exp $ */ /* $NetBSD: cpu.c,v 1.1 2003/04/26 18:39:26 fvdl Exp $ */ /*- @@ -375,7 +375,7 @@ cpu_init(struct cpu_info *ci) #ifdef MULTIPROCESSOR ci->ci_flags |= CPUF_RUNNING; - tlbflush(); + tlbflushg(); #endif } diff --git a/sys/arch/i386/i386/cpu.c b/sys/arch/i386/i386/cpu.c index 81b191a72b7..49111a58708 100644 --- a/sys/arch/i386/i386/cpu.c +++ b/sys/arch/i386/i386/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.37 2010/04/08 19:28:31 kettenis Exp $ */ +/* $OpenBSD: cpu.c,v 1.38 2010/04/16 17:44:00 kettenis Exp $ */ /* $NetBSD: cpu.c,v 1.1.2.7 2000/06/26 02:04:05 sommerfeld Exp $ */ /*- @@ -321,8 +321,10 @@ cpu_init(struct cpu_info *ci) if (cpu_feature & CPUID_PGE) lcr4(rcr4() | CR4_PGE); /* enable global TLB caching */ +#ifdef MULTIPROCESSOR ci->ci_flags |= CPUF_RUNNING; - tlbflush(); + tlbflushg(); +#endif /* * If we have FXSAVE/FXRESTOR, use them. |