Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm Rename the cpu_id() define to cpu_idnum() so th...



details:   https://anonhg.NetBSD.org/src/rev/962d035c0797
branches:  trunk
changeset: 813298:962d035c0797
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jan 23 21:39:17 2016 +0000

description:
Rename the cpu_id() define to cpu_idnum() so that it does not conflict with
dtrace and friends.

diffstat:

 sys/arch/arm/arm/cpufunc.c       |  12 ++++++------
 sys/arch/arm/arm32/cpu.c         |   6 +++---
 sys/arch/arm/include/arm32/psl.h |   4 +++-
 sys/arch/arm/include/cpufunc.h   |   2 +-
 4 files changed, 13 insertions(+), 11 deletions(-)

diffs (111 lines):

diff -r b9b075d88094 -r 962d035c0797 sys/arch/arm/arm/cpufunc.c
--- a/sys/arch/arm/arm/cpufunc.c        Sat Jan 23 21:22:45 2016 +0000
+++ b/sys/arch/arm/arm/cpufunc.c        Sat Jan 23 21:39:17 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpufunc.c,v 1.159 2015/12/10 22:04:54 skrll Exp $      */
+/*     $NetBSD: cpufunc.c,v 1.160 2016/01/23 21:39:17 christos Exp $   */
 
 /*
  * arm7tdmi support code Copyright (c) 2001 John Fremlin
@@ -49,7 +49,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.159 2015/12/10 22:04:54 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.160 2016/01/23 21:39:17 christos Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_cpuoptions.h"
@@ -1573,7 +1573,7 @@
         * reserved ID register is encountered, the System Control
         * processor returns the value of the main ID register.
         */
-       if (ctype == cpu_id())
+       if (ctype == cpu_idnum())
                goto out;
 
 #if (ARM_MMU_V6 + ARM_MMU_V7) > 0
@@ -1587,7 +1587,7 @@
                        arm_cache_prefer_mask = PAGE_SIZE;
                }
 #ifdef CPU_CORTEX
-               if (CPU_ID_CORTEX_P(cpu_id())) {
+               if (CPU_ID_CORTEX_P(cpu_idnum())) {
                        arm_pcache.dcache_type = CACHE_TYPE_PIPT;
                } else
 #endif
@@ -1730,7 +1730,7 @@
 get_cachetype_table(void)
 {
        int i;
-       uint32_t cpuid = cpu_id();
+       uint32_t cpuid = cpu_idnum();
 
        for (i = 0; cachetab[i].ct_cpuid != 0; i++) {
                if (cachetab[i].ct_cpuid == (cpuid & CPU_ID_CPU_MASK)) {
@@ -3184,7 +3184,7 @@
        uint32_t sbz=0;
        uint32_t cpuid;
 
-       cpuid = cpu_id();
+       cpuid = cpu_idnum();
 
        cpuctrl =
                CPU_CONTROL_MMU_ENABLE  |
diff -r b9b075d88094 -r 962d035c0797 sys/arch/arm/arm32/cpu.c
--- a/sys/arch/arm/arm32/cpu.c  Sat Jan 23 21:22:45 2016 +0000
+++ b/sys/arch/arm/arm32/cpu.c  Sat Jan 23 21:39:17 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.c,v 1.111 2015/11/12 10:49:35 jmcneill Exp $       */
+/*     $NetBSD: cpu.c,v 1.112 2016/01/23 21:39:17 christos Exp $       */
 
 /*
  * Copyright (c) 1995 Mark Brinicombe.
@@ -46,7 +46,7 @@
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.111 2015/11/12 10:49:35 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.112 2016/01/23 21:39:17 christos Exp $");
 
 #include <sys/systm.h>
 #include <sys/conf.h>
@@ -89,7 +89,7 @@
 
                /* Get the CPU ID from coprocessor 15 */
 
-               ci->ci_arm_cpuid = cpu_id();
+               ci->ci_arm_cpuid = cpu_idnum();
                ci->ci_arm_cputype = ci->ci_arm_cpuid & CPU_ID_CPU_MASK;
                ci->ci_arm_cpurev = ci->ci_arm_cpuid & CPU_ID_REVISION_MASK;
        } else {
diff -r b9b075d88094 -r 962d035c0797 sys/arch/arm/include/arm32/psl.h
--- a/sys/arch/arm/include/arm32/psl.h  Sat Jan 23 21:22:45 2016 +0000
+++ b/sys/arch/arm/include/arm32/psl.h  Sat Jan 23 21:39:17 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: psl.h,v 1.20 2014/02/04 18:51:16 matt Exp $    */
+/*     $NetBSD: psl.h,v 1.21 2016/01/23 21:39:18 christos Exp $        */
 
 /*
  * Copyright (c) 1995 Mark Brinicombe.
@@ -66,6 +66,8 @@
 
 #ifdef _KERNEL
 #ifndef _LOCORE
+#include <sys/types.h>
+
 int raisespl   (int);
 int lowerspl   (int);
 void splx      (int);
diff -r b9b075d88094 -r 962d035c0797 sys/arch/arm/include/cpufunc.h
--- a/sys/arch/arm/include/cpufunc.h    Sat Jan 23 21:22:45 2016 +0000
+++ b/sys/arch/arm/include/cpufunc.h    Sat Jan 23 21:39:17 2016 +0000
@@ -169,7 +169,7 @@
 extern struct cpu_functions cpufuncs;
 extern u_int cputype;
 
-#define cpu_id()               cpufuncs.cf_id()
+#define cpu_idnum()            cpufuncs.cf_id()
 
 #define cpu_control(c, e)      cpufuncs.cf_control(c, e)
 #define cpu_domains(d)         cpufuncs.cf_domains(d)



Home | Main Index | Thread Index | Old Index