From ba177d4ea002d0300fac4bfd910d5d94c1c94f3b Mon Sep 17 00:00:00 2001 From: mpi Date: Sun, 3 Dec 2017 10:55:50 +0000 Subject: [PATCH] Rename ci_number to ci_cpuid to match other archs. ok visa@, kettenis@, deraadt@ --- sys/arch/sparc64/include/cpu.h | 10 +++++----- sys/arch/sparc64/sparc64/cpu.c | 4 ++-- sys/arch/sparc64/sparc64/db_interface.c | 12 ++++++------ sys/arch/sparc64/sparc64/genassym.cf | 4 ++-- sys/arch/sparc64/sparc64/ipifuncs.c | 6 +++--- sys/arch/sparc64/sparc64/pmap.c | 4 ++-- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/sys/arch/sparc64/include/cpu.h b/sys/arch/sparc64/include/cpu.h index 931d9a4caa1..7ae179d752a 100644 --- a/sys/arch/sparc64/include/cpu.h +++ b/sys/arch/sparc64/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.91 2017/05/29 14:19:50 mpi Exp $ */ +/* $OpenBSD: cpu.h,v 1.92 2017/12/03 10:55:50 mpi Exp $ */ /* $NetBSD: cpu.h,v 1.28 2001/06/14 22:56:58 thorpej Exp $ */ /* @@ -113,7 +113,7 @@ struct cpu_info { struct cpu_info *ci_next; struct proc *ci_fpproc; - int ci_number; + int ci_cpuid; int ci_flags; int ci_upaid; #ifdef MULTIPROCESSOR @@ -174,13 +174,13 @@ extern struct cpu_info *cpus; register struct cpu_info *__curcpu asm ("g7"); #define curcpu() (__curcpu->ci_self) -#define cpu_number() (__curcpu->ci_number) +#define cpu_number() (__curcpu->ci_cpuid) -#define CPU_IS_PRIMARY(ci) ((ci)->ci_number == 0) +#define CPU_IS_PRIMARY(ci) ((ci)->ci_cpuid == 0) #define CPU_INFO_ITERATOR int #define CPU_INFO_FOREACH(cii, ci) \ for (cii = 0, ci = cpus; ci != NULL; ci = ci->ci_next) -#define CPU_INFO_UNIT(ci) ((ci)->ci_number) +#define CPU_INFO_UNIT(ci) ((ci)->ci_cpuid) #define MAXCPUS 256 void cpu_boot_secondary_processors(void); diff --git a/sys/arch/sparc64/sparc64/cpu.c b/sys/arch/sparc64/sparc64/cpu.c index 6e5792cf75d..c3f07c16bf9 100644 --- a/sys/arch/sparc64/sparc64/cpu.c +++ b/sys/arch/sparc64/sparc64/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.66 2017/05/25 03:19:39 dlg Exp $ */ +/* $OpenBSD: cpu.c,v 1.67 2017/12/03 10:55:50 mpi Exp $ */ /* $NetBSD: cpu.c,v 1.13 2001/05/26 21:27:15 chs Exp $ */ /* @@ -163,7 +163,7 @@ alloc_cpuinfo(struct mainbus_attach_args *ma) */ cpi->ci_next = NULL; cpi->ci_curproc = NULL; - cpi->ci_number = ncpus++; + cpi->ci_cpuid = ncpus++; cpi->ci_upaid = portid; cpi->ci_fpproc = NULL; #ifdef MULTIPROCESSOR diff --git a/sys/arch/sparc64/sparc64/db_interface.c b/sys/arch/sparc64/sparc64/db_interface.c index f578bd1a554..c62b7c330ea 100644 --- a/sys/arch/sparc64/sparc64/db_interface.c +++ b/sys/arch/sparc64/sparc64/db_interface.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_interface.c,v 1.48 2017/04/30 16:45:45 mpi Exp $ */ +/* $OpenBSD: db_interface.c,v 1.49 2017/12/03 10:55:50 mpi Exp $ */ /* $NetBSD: db_interface.c,v 1.61 2001/07/31 06:55:47 eeh Exp $ */ /* @@ -341,7 +341,7 @@ db_cpuinfo_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif) for (ci = cpus; ci != NULL; ci = ci->ci_next) { db_printf("%c%4d: ", (ci == curcpu()) ? '*' : ' ', - ci->ci_number); + ci->ci_cpuid); switch(ci->ci_ddb_paused) { case CI_DDB_RUNNING: db_printf("running\n"); @@ -373,7 +373,7 @@ db_startproc_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif) if (have_addr) { for (ci = cpus; ci != NULL; ci = ci->ci_next) { - if (addr == ci->ci_number) { + if (addr == ci->ci_cpuid) { db_startcpu(ci); break; } @@ -395,7 +395,7 @@ db_stopproc_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif) if (have_addr) { for (ci = cpus; ci != NULL; ci = ci->ci_next) { - if (addr == ci->ci_number) { + if (addr == ci->ci_cpuid) { db_stopcpu(ci); break; } @@ -417,7 +417,7 @@ db_ddbproc_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif) if (have_addr) { for (ci = cpus; ci != NULL; ci = ci->ci_next) { - if (addr == ci->ci_number && ci != curcpu()) { + if (addr == ci->ci_cpuid && ci != curcpu()) { db_stopcpu(ci); db_switch_to_cpu = ci; db_switch_cpu = 1; @@ -468,7 +468,7 @@ db_enter_ddb(void) if (ddb_active_cpu == cpu_number() && db_switch_cpu) { curcpu()->ci_ddb_paused = CI_DDB_SHOULDSTOP; db_switch_cpu = 0; - ddb_active_cpu = db_switch_to_cpu->ci_number; + ddb_active_cpu = db_switch_to_cpu->ci_cpuid; db_switch_to_cpu->ci_ddb_paused = CI_DDB_ENTERDDB; } diff --git a/sys/arch/sparc64/sparc64/genassym.cf b/sys/arch/sparc64/sparc64/genassym.cf index a5e0bb36548..1773514c2cd 100644 --- a/sys/arch/sparc64/sparc64/genassym.cf +++ b/sys/arch/sparc64/sparc64/genassym.cf @@ -1,4 +1,4 @@ -# $OpenBSD: genassym.cf,v 1.36 2016/10/08 05:42:38 guenther Exp $ +# $OpenBSD: genassym.cf,v 1.37 2017/12/03 10:55:50 mpi Exp $ # $NetBSD: genassym.cf,v 1.23 2001/08/08 00:09:30 eeh Exp $ # @@ -137,7 +137,7 @@ member ci_curproc member ci_cpcb member ci_next member ci_fpproc -member ci_number +member ci_cpuid member ci_upaid member ci_want_resched member ci_handled_intr_level diff --git a/sys/arch/sparc64/sparc64/ipifuncs.c b/sys/arch/sparc64/sparc64/ipifuncs.c index a7732fbed80..1ffeb666bf4 100644 --- a/sys/arch/sparc64/sparc64/ipifuncs.c +++ b/sys/arch/sparc64/sparc64/ipifuncs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipifuncs.c,v 1.16 2017/05/25 03:19:39 dlg Exp $ */ +/* $OpenBSD: ipifuncs.c,v 1.17 2017/12/03 10:55:50 mpi Exp $ */ /* $NetBSD: ipifuncs.c,v 1.8 2006/10/07 18:11:36 rjs Exp $ */ /*- @@ -164,7 +164,7 @@ sun4u_broadcast_ipi(void (*func)(void), u_int64_t arg0, u_int64_t arg1) struct cpu_info *ci; for (ci = cpus; ci != NULL; ci = ci->ci_next) { - if (ci->ci_number == cpu_number()) + if (ci->ci_cpuid == cpu_number()) continue; if ((ci->ci_flags & CPUF_RUNNING) == 0) continue; @@ -180,7 +180,7 @@ sun4v_broadcast_ipi(void (*func)(void), u_int64_t arg0, u_int64_t arg1) int err, i, ncpus = 0; for (ci = cpus; ci != NULL; ci = ci->ci_next) { - if (ci->ci_number == cpu_number()) + if (ci->ci_cpuid == cpu_number()) continue; if ((ci->ci_flags & CPUF_RUNNING) == 0) continue; diff --git a/sys/arch/sparc64/sparc64/pmap.c b/sys/arch/sparc64/sparc64/pmap.c index 0afbbab9e8b..2275a42545d 100644 --- a/sys/arch/sparc64/sparc64/pmap.c +++ b/sys/arch/sparc64/sparc64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.101 2017/05/27 09:03:22 kettenis Exp $ */ +/* $OpenBSD: pmap.c,v 1.102 2017/12/03 10:55:50 mpi Exp $ */ /* $NetBSD: pmap.c,v 1.107 2001/08/31 16:47:41 eeh Exp $ */ #undef NO_VCACHE /* Don't forget the locked TLB in dostart */ /* @@ -1202,7 +1202,7 @@ remap_data: cpus->ci_curproc = &proc0; cpus->ci_cpcb = (struct pcb *)u0[0]; /* Need better source */ cpus->ci_upaid = cpu_myid(); - cpus->ci_number = 0; + cpus->ci_cpuid = 0; cpus->ci_flags = CPUF_RUNNING; cpus->ci_fpproc = NULL; cpus->ci_spinup = main; /* Call main when we're running. */ -- 2.20.1