diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2008-10-10 08:05:46 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2008-10-10 08:05:46 +0000 |
commit | f6566fc21328024e33b60c477810acc6cafa1237 (patch) | |
tree | d192668d70b0609199d8d9d6d4ce7f73eecec920 /sys/arch | |
parent | 61cd21820a73ea490eb1e9d0b44e9ae52e9bec0a (diff) |
Define MAXCPUS on all architectures.
For now, sparc64 is arbitrarily set to 256 (only architecture that didn't have
a practical limit in the code on the number of cpus).
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/alpha/include/cpu.h | 4 | ||||
-rw-r--r-- | sys/arch/arm/include/cpu.h | 3 | ||||
-rw-r--r-- | sys/arch/hppa/include/cpu.h | 4 | ||||
-rw-r--r-- | sys/arch/hppa64/include/cpu.h | 3 | ||||
-rw-r--r-- | sys/arch/m68k/include/cpu.h | 3 | ||||
-rw-r--r-- | sys/arch/m88k/include/cpu.h | 3 | ||||
-rw-r--r-- | sys/arch/mips64/include/cpu.h | 3 | ||||
-rw-r--r-- | sys/arch/powerpc/include/cpu.h | 4 | ||||
-rw-r--r-- | sys/arch/sh/include/cpu.h | 3 | ||||
-rw-r--r-- | sys/arch/sparc/sparc/cpuvar.h | 3 | ||||
-rw-r--r-- | sys/arch/sparc64/include/cpu.h | 4 | ||||
-rw-r--r-- | sys/arch/vax/include/cpu.h | 3 |
12 files changed, 27 insertions, 13 deletions
diff --git a/sys/arch/alpha/include/cpu.h b/sys/arch/alpha/include/cpu.h index 9e393ffc3d6..dbb7668c2fb 100644 --- a/sys/arch/alpha/include/cpu.h +++ b/sys/arch/alpha/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.33 2008/07/18 23:43:31 art Exp $ */ +/* $OpenBSD: cpu.h,v 1.34 2008/10/10 08:05:45 art Exp $ */ /* $NetBSD: cpu.h,v 1.45 2000/08/21 02:03:12 thorpej Exp $ */ /*- @@ -218,6 +218,8 @@ void fpusave_proc(struct proc *, int); #define CPU_INFO_FOREACH(cii, ci) for (cii = 0, ci = curcpu(); \ ci != NULL; ci = ci->ci_next) +#define MAXCPUS ALPHA_MAXPROCS + #if defined(MULTIPROCESSOR) extern __volatile u_long cpus_running; extern __volatile u_long cpus_paused; diff --git a/sys/arch/arm/include/cpu.h b/sys/arch/arm/include/cpu.h index 9f721f1670d..8c1b3d9f57d 100644 --- a/sys/arch/arm/include/cpu.h +++ b/sys/arch/arm/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.20 2008/10/09 08:43:43 art Exp $ */ +/* $OpenBSD: cpu.h,v 1.21 2008/10/10 08:05:45 art Exp $ */ /* $NetBSD: cpu.h,v 1.34 2003/06/23 11:01:08 martin Exp $ */ /* @@ -227,6 +227,7 @@ extern struct cpu_info cpu_info_store; #define CPU_INFO_FOREACH(cii, ci) \ for (cii = 0, ci = curcpu(); ci != NULL; ci = NULL) #define CPU_INFO_UNIT(ci) 0 +#define MAXCPUS 1 #endif #ifdef __PROG32 diff --git a/sys/arch/hppa/include/cpu.h b/sys/arch/hppa/include/cpu.h index d7fcba4b38c..4ba1aedc6c9 100644 --- a/sys/arch/hppa/include/cpu.h +++ b/sys/arch/hppa/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.56 2008/10/09 08:43:43 art Exp $ */ +/* $OpenBSD: cpu.h,v 1.57 2008/10/10 08:05:45 art Exp $ */ /* * Copyright (c) 2000-2004 Michael Shalayeff @@ -82,7 +82,7 @@ extern struct cpu_info cpu_info_primary; #define CPU_INFO_FOREACH(cii, ci) \ for (cii = 0, ci = curcpu(); ci != NULL; ci = NULL) #define CPU_INFO_UNIT(ci) 0 - +#define MAXCPUS 1 #define cpu_number() 0 /* types */ diff --git a/sys/arch/hppa64/include/cpu.h b/sys/arch/hppa64/include/cpu.h index b34705b425f..38deb57665e 100644 --- a/sys/arch/hppa64/include/cpu.h +++ b/sys/arch/hppa64/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.12 2008/07/18 23:43:31 art Exp $ */ +/* $OpenBSD: cpu.h,v 1.13 2008/10/10 08:05:45 art Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -143,6 +143,7 @@ struct cpu_info *curcpu(void); #define CPU_INFO_FOREACH(cii,ci) \ for (cii = 0, ci = curcpu(); ci != NULL; ci = ci->ci_next) #define CPU_INFO_UNIT(ci) ((ci)->ci_number) +#define MAXCPUS 1 #ifdef DIAGNOSTIC void splassert_fail(int, int, const char *); diff --git a/sys/arch/m68k/include/cpu.h b/sys/arch/m68k/include/cpu.h index 47d9342a649..929a253d075 100644 --- a/sys/arch/m68k/include/cpu.h +++ b/sys/arch/m68k/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.19 2008/10/09 08:43:43 art Exp $ */ +/* $OpenBSD: cpu.h,v 1.20 2008/10/10 08:05:45 art Exp $ */ /* $NetBSD: cpu.h,v 1.3 1997/02/02 06:56:57 thorpej Exp $ */ /* @@ -84,6 +84,7 @@ extern struct cpu_info cpu_info_store; #define CPU_INFO_FOREACH(cii, ci) \ for (cii = 0, ci = curcpu(); ci != NULL; ci = NULL) #define CPU_INFO_UNIT(ci) 0 +#define MAXCPUS 1 #define cpu_number() 0 diff --git a/sys/arch/m88k/include/cpu.h b/sys/arch/m88k/include/cpu.h index 2e196920d8f..ab69b03559c 100644 --- a/sys/arch/m88k/include/cpu.h +++ b/sys/arch/m88k/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.35 2008/07/18 23:43:31 art Exp $ */ +/* $OpenBSD: cpu.h,v 1.36 2008/10/10 08:05:45 art Exp $ */ /* * Copyright (c) 1996 Nivas Madhur * Copyright (c) 1992, 1993 @@ -136,6 +136,7 @@ extern struct cpu_info m88k_cpus[MAX_CPUS]; for ((cii) = 0; (cii) < MAX_CPUS; (cii)++) \ if (((ci) = &m88k_cpus[cii])->ci_flags & CIF_ALIVE) #define CPU_INFO_UNIT(ci) ((ci)->ci_cpuid) +#define MAXCPUS MAX_CPUS #if defined(MULTIPROCESSOR) diff --git a/sys/arch/mips64/include/cpu.h b/sys/arch/mips64/include/cpu.h index be6846f83e8..9c5a9cd6942 100644 --- a/sys/arch/mips64/include/cpu.h +++ b/sys/arch/mips64/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.26 2008/10/09 08:43:43 art Exp $ */ +/* $OpenBSD: cpu.h,v 1.27 2008/10/10 08:05:45 art Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -385,6 +385,7 @@ extern struct cpu_info cpu_info_primary; #define CPU_INFO_FOREACH(cii, ci) \ for (cii = 0, ci = curcpu(); ci != NULL; ci = NULL) #define CPU_INFO_UNIT(ci) 0 +#define MAXCPUS 1 #define cpu_number() 0 diff --git a/sys/arch/powerpc/include/cpu.h b/sys/arch/powerpc/include/cpu.h index 2553e3b0183..b14490768a1 100644 --- a/sys/arch/powerpc/include/cpu.h +++ b/sys/arch/powerpc/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.39 2008/09/16 04:20:42 drahn Exp $ */ +/* $OpenBSD: cpu.h,v 1.40 2008/10/10 08:05:45 art Exp $ */ /* $NetBSD: cpu.h,v 1.1 1996/09/30 16:34:21 ws Exp $ */ /* @@ -130,6 +130,8 @@ void cpu_boot_secondary_processors(void); #endif +#define MAXCPUS PPC_MAXPROCS + extern struct cpu_info cpu_info[PPC_MAXPROCS]; #define CLKF_USERMODE(frame) (((frame)->srr1 & PSL_PR) != 0) diff --git a/sys/arch/sh/include/cpu.h b/sys/arch/sh/include/cpu.h index 33424e76146..519b51d1c2d 100644 --- a/sys/arch/sh/include/cpu.h +++ b/sys/arch/sh/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.15 2008/10/09 08:43:43 art Exp $ */ +/* $OpenBSD: cpu.h,v 1.16 2008/10/10 08:05:45 art Exp $ */ /* $NetBSD: cpu.h,v 1.41 2006/01/21 04:24:12 uwe Exp $ */ /*- @@ -69,6 +69,7 @@ extern struct cpu_info cpu_info_store; #define CPU_INFO_FOREACH(cii, ci) \ for (cii = 0, ci = curcpu(); ci != NULL; ci = NULL) #define CPU_INFO_UNIT(ci) 0 +#define MAXCPUS 1 /* diff --git a/sys/arch/sparc/sparc/cpuvar.h b/sys/arch/sparc/sparc/cpuvar.h index a818d7f54c4..250e884f819 100644 --- a/sys/arch/sparc/sparc/cpuvar.h +++ b/sys/arch/sparc/sparc/cpuvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpuvar.h,v 1.13 2008/10/09 08:43:43 art Exp $ */ +/* $OpenBSD: cpuvar.h,v 1.14 2008/10/10 08:05:45 art Exp $ */ /* $NetBSD: cpuvar.h,v 1.4 1997/07/06 21:14:25 pk Exp $ */ /* @@ -88,6 +88,7 @@ struct cpu_info { #define CPU_INFO_FOREACH(cii, ci) \ for (cii = 0, ci = curcpu(); ci != NULL; ci = ci->ci_next) #define CPU_INFO_UNIT(ci) ((ci)->ci_softc->dv.dv_unit) +#define MAXCPUS 1 /* * The cpu_softc structure. This structure maintains information about one diff --git a/sys/arch/sparc64/include/cpu.h b/sys/arch/sparc64/include/cpu.h index 09cb7914810..1178403d9e2 100644 --- a/sys/arch/sparc64/include/cpu.h +++ b/sys/arch/sparc64/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.67 2008/10/09 08:43:43 art Exp $ */ +/* $OpenBSD: cpu.h,v 1.68 2008/10/10 08:05:45 art Exp $ */ /* $NetBSD: cpu.h,v 1.28 2001/06/14 22:56:58 thorpej Exp $ */ /* @@ -175,6 +175,7 @@ curcpu(void) #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 MAXCPUS 256 void cpu_boot_secondary_processors(void); @@ -193,6 +194,7 @@ void smp_signotify(struct proc *); #define CPU_INFO_FOREACH(cii, ci) \ for (cii = 0, ci = curcpu(); ci != NULL; ci = NULL) #define CPU_INFO_UNIT(ci) 0 +#define MAXCPUS 1 #endif diff --git a/sys/arch/vax/include/cpu.h b/sys/arch/vax/include/cpu.h index b8820ac7cc5..27525a2ccaf 100644 --- a/sys/arch/vax/include/cpu.h +++ b/sys/arch/vax/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.30 2008/10/09 08:43:43 art Exp $ */ +/* $OpenBSD: cpu.h,v 1.31 2008/10/10 08:05:45 art Exp $ */ /* $NetBSD: cpu.h,v 1.41 1999/10/21 20:01:36 ragge Exp $ */ /* @@ -64,6 +64,7 @@ extern struct cpu_info cpu_info_store; #define CPU_INFO_FOREACH(cii, ci) \ for (cii = 0, ci = curcpu(); ci != NULL; ci = NULL) #define CPU_INFO_UNIT(ci) 0 +#define MAXCPUS 1 struct clockframe { int pc; |