-/* $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 $ */
/*
struct cpu_info *ci_next;
struct proc *ci_fpproc;
- int ci_number;
+ int ci_cpuid;
int ci_flags;
int ci_upaid;
#ifdef MULTIPROCESSOR
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);
-/* $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 $ */
/*
*/
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
-/* $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 $ */
/*
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");
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;
}
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;
}
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;
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;
}
-# $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 $
#
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
-/* $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 $ */
/*-
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;
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;
-/* $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 */
/*
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. */