Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch rename the global variable "cpu" to "cputype" to av...
details: https://anonhg.NetBSD.org/src/rev/2137fa1c147f
branches: trunk
changeset: 779760:2137fa1c147f
user: chs <chs%NetBSD.org@localhost>
date: Sat Jun 16 17:30:18 2012 +0000
description:
rename the global variable "cpu" to "cputype" to avoid conflicting with
dtrace, which wants to use "cpu" as a local variable.
diffstat:
sys/arch/amd64/amd64/locore.S | 6 +++---
sys/arch/i386/i386/locore.S | 18 +++++++++---------
sys/arch/x86/include/cpu.h | 4 ++--
sys/arch/x86/x86/identcpu.c | 10 +++++-----
4 files changed, 19 insertions(+), 19 deletions(-)
diffs (154 lines):
diff -r 1e5c1fbab715 -r 2137fa1c147f sys/arch/amd64/amd64/locore.S
--- a/sys/arch/amd64/amd64/locore.S Sat Jun 16 17:02:33 2012 +0000
+++ b/sys/arch/amd64/amd64/locore.S Sat Jun 16 17:30:18 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.S,v 1.68 2012/04/19 18:00:34 jym Exp $ */
+/* $NetBSD: locore.S,v 1.69 2012/06/16 17:30:19 chs Exp $ */
/*
* Copyright-o-rama!
@@ -236,9 +236,9 @@
.globl _C_LABEL(bootinfo),_C_LABEL(atdevbase)
.globl _C_LABEL(PDPpaddr)
.globl _C_LABEL(biosbasemem),_C_LABEL(biosextmem)
- .globl _C_LABEL(gdtstore),_C_LABEL(cpu)
+ .globl _C_LABEL(gdtstore),_C_LABEL(cputype)
-_C_LABEL(cpu): .long 0 # are we 386, 386sx, or 486,
+_C_LABEL(cputype): .long 0 # are we 386, 386sx, or 486,
# or Pentium, or..
_C_LABEL(cpu_id): .long 0 # saved from `cpuid' instruction
_C_LABEL(cpuid_level): .long -1 # max. level accepted by 'cpuid'
diff -r 1e5c1fbab715 -r 2137fa1c147f sys/arch/i386/i386/locore.S
--- a/sys/arch/i386/i386/locore.S Sat Jun 16 17:02:33 2012 +0000
+++ b/sys/arch/i386/i386/locore.S Sat Jun 16 17:30:18 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.S,v 1.99 2012/04/19 18:07:05 jym Exp $ */
+/* $NetBSD: locore.S,v 1.100 2012/06/16 17:30:19 chs Exp $ */
/*
* Copyright-o-rama!
@@ -129,7 +129,7 @@
*/
#include <machine/asm.h>
-__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.99 2012/04/19 18:07:05 jym Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.100 2012/06/16 17:30:19 chs Exp $");
#include "opt_compat_oldboot.h"
#include "opt_ddb.h"
@@ -196,7 +196,7 @@
*/
.data
- .globl _C_LABEL(cpu)
+ .globl _C_LABEL(cputype)
.globl _C_LABEL(cpuid_level)
.globl _C_LABEL(esym)
.globl _C_LABEL(eblob)
@@ -229,7 +229,7 @@
.long 0
#endif
-_C_LABEL(cpu): .long 0 # are we 80486, Pentium, or..
+_C_LABEL(cputype): .long 0 # are we 80486, Pentium, or..
_C_LABEL(cpuid_level): .long 0
_C_LABEL(atdevbase): .long 0 # location of start of iomem in virtual
_C_LABEL(lwp0uarea): .long 0
@@ -346,11 +346,11 @@
* Don't try cpuid, as Nx586s reportedly don't support the
* PSL_ID bit.
*/
- movl $CPU_NX586,RELOC(cpu)
+ movl $CPU_NX586,RELOC(cputype)
jmp 2f
is386:
- movl $CPU_386,RELOC(cpu)
+ movl $CPU_386,RELOC(cputype)
jmp 2f
try486: /* Try to toggle identification flag; does not exist on early 486s. */
@@ -369,7 +369,7 @@
testl %eax,%eax
jnz try586
-is486: movl $CPU_486,RELOC(cpu)
+is486: movl $CPU_486,RELOC(cputype)
/*
* Check Cyrix CPU
* Cyrix CPUs do not change the undefined flags following
@@ -387,7 +387,7 @@
popfl
jmp 2f
trycyrix486:
- movl $CPU_6x86,RELOC(cpu) # set CPU type
+ movl $CPU_6x86,RELOC(cputype) # set CPU type
/*
* Check for Cyrix 486 CPU by seeing if the flags change during a
* divide. This is documented in the Cx486SLC/e SMM Programmer's
@@ -405,7 +405,7 @@
xorl %ecx,%eax # are the flags different?
testl $0x8d5,%eax # only check C|PF|AF|Z|N|V
jne 2f # yes; must be Cyrix 6x86 CPU
- movl $CPU_486DLC,RELOC(cpu) # set CPU type
+ movl $CPU_486DLC,RELOC(cputype) # set CPU type
#ifndef CYRIX_CACHE_WORKS
/* Disable caching of the ISA hole only. */
diff -r 1e5c1fbab715 -r 2137fa1c147f sys/arch/x86/include/cpu.h
--- a/sys/arch/x86/include/cpu.h Sat Jun 16 17:02:33 2012 +0000
+++ b/sys/arch/x86/include/cpu.h Sat Jun 16 17:30:18 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.50 2012/04/20 22:23:24 rmind Exp $ */
+/* $NetBSD: cpu.h,v 1.51 2012/06/16 17:30:18 chs Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -360,7 +360,7 @@
extern int biosbasemem;
extern int biosextmem;
-extern int cpu;
+extern int cputype;
extern int cpuid_level;
extern int cpu_class;
extern char cpu_brand_string[];
diff -r 1e5c1fbab715 -r 2137fa1c147f sys/arch/x86/x86/identcpu.c
--- a/sys/arch/x86/x86/identcpu.c Sat Jun 16 17:02:33 2012 +0000
+++ b/sys/arch/x86/x86/identcpu.c Sat Jun 16 17:30:18 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: identcpu.c,v 1.31 2012/04/30 00:08:03 christos Exp $ */
+/* $NetBSD: identcpu.c,v 1.32 2012/06/16 17:30:19 chs Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.31 2012/04/30 00:08:03 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.32 2012/06/16 17:30:19 chs Exp $");
#include "opt_xen.h"
@@ -613,8 +613,8 @@
uint32_t miscbytes;
uint32_t brand[12];
- cpu_vendor = i386_nocpuid_cpus[cpu << 1];
- cpu_class = i386_nocpuid_cpus[(cpu << 1) + 1];
+ cpu_vendor = i386_nocpuid_cpus[cputype << 1];
+ cpu_class = i386_nocpuid_cpus[(cputype << 1) + 1];
if (cpuid_level < 0)
return;
@@ -767,7 +767,7 @@
if (cpu_class == CPUCLASS_386) {
panic("NetBSD requires an 80486DX or later processor");
}
- if (cpu == CPU_486DLC) {
+ if (cputype == CPU_486DLC) {
aprint_error("WARNING: BUGGY CYRIX CACHE\n");
}
Home |
Main Index |
Thread Index |
Old Index