summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorkjell <kjell@openbsd.org>2005-05-28 09:48:54 +0000
committerkjell <kjell@openbsd.org>2005-05-28 09:48:54 +0000
commit111d3af83a9291f98ae2cadbfbc6d29bb1e064ad (patch)
treee3bae21fc85ff13e8dbc2ecbda445fcde1342d5f /sys
parentsupport decapsulation of 802.11 data frames (diff)
downloadwireguard-openbsd-111d3af83a9291f98ae2cadbfbc6d29bb1e064ad.tar.xz
wireguard-openbsd-111d3af83a9291f98ae2cadbfbc6d29bb1e064ad.zip
move variable declaration inside #ifdef I386_686, etc.
Prompting from Chris Cappuccio.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/i386/i386/machdep.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index eb330a9b357..8da55c9d703 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.318 2005/05/27 10:41:11 kjell Exp $ */
+/* $OpenBSD: machdep.c,v 1.319 2005/05/28 09:48:54 kjell Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -1145,12 +1145,12 @@ winchip_cpu_setup(struct cpu_info *ci)
void
cyrix3_cpu_setup(struct cpu_info *ci)
{
+#if defined(I686_CPU)
int model, step;
model = (ci->ci_signature >> 4) & 15;
step = ci->ci_signature & 15;
-#if defined(I686_CPU)
u_int64_t msreg;
u_int32_t regs[4];
unsigned int val;
@@ -1413,8 +1413,6 @@ amd_family6_setup(struct cpu_info *ci)
void
intel686_common_cpu_setup(struct cpu_info *ci)
{
- int model = (ci->ci_signature >> 4) & 15;
- int step = ci->ci_signature & 15;
/*
* Make sure SYSENTER is disabled.
@@ -1423,6 +1421,9 @@ intel686_common_cpu_setup(struct cpu_info *ci)
wrmsr(MSR_SYSENTER_CS, 0);
#if !defined(SMALL_KERNEL) && defined(I686_CPU)
+ int model = (ci->ci_signature >> 4) & 15;
+ int step = ci->ci_signature & 15;
+
if (cpu_ecxfeature & CPUIDECX_EST) {
if (rdmsr(MSR_MISC_ENABLE) & (1 << 16))
est_init(ci->ci_dev.dv_xname);