diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-11-22 05:42:53 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-11-22 05:42:53 +0000 |
commit | 87eb0efadd1a61e4eb4cb8047fede2761f8d64aa (patch) | |
tree | 62458c44147be00095951e00e663977865309e70 /sys/arch/m88k | |
parent | e8353e196053d5e0d60661bd58803b3a1f69fe96 (diff) |
Move the cmmu lock to 88200-specific code. 88110 MP code will use ipis
and will not require such a lock.
Diffstat (limited to 'sys/arch/m88k')
-rw-r--r-- | sys/arch/m88k/include/cmmu.h | 21 | ||||
-rw-r--r-- | sys/arch/m88k/m88k/m8820x_machdep.c | 15 | ||||
-rw-r--r-- | sys/arch/m88k/m88k/m88k_machdep.c | 3 |
3 files changed, 16 insertions, 23 deletions
diff --git a/sys/arch/m88k/include/cmmu.h b/sys/arch/m88k/include/cmmu.h index f0bf7c31982..e21d3dfc644 100644 --- a/sys/arch/m88k/include/cmmu.h +++ b/sys/arch/m88k/include/cmmu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cmmu.h,v 1.17 2007/02/11 12:49:35 miod Exp $ */ +/* $OpenBSD: cmmu.h,v 1.18 2007/11/22 05:42:48 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1992 Carnegie Mellon University @@ -33,25 +33,6 @@ */ #if defined(_KERNEL) && !defined(_LOCORE) -#ifdef MULTIPROCESSOR -/* - * This lock protects the cmmu SAR and SCR's; other ports - * can be accessed without locking it. - * - * May be used from "db_interface.c". - */ -extern __cpu_simple_lock_t cmmu_cpu_lock; - -#define CMMU_LOCK __cpu_simple_lock(&cmmu_cpu_lock) -#define CMMU_UNLOCK __cpu_simple_unlock(&cmmu_cpu_lock) - -#else - -#define CMMU_LOCK do { /* nothing */ } while (0) -#define CMMU_UNLOCK do { /* nothing */ } while (0) - -#endif /* MULTIPROCESSOR */ - /* machine dependent cmmu function pointer structure */ struct cmmu_p { cpuid_t (*init)(void); diff --git a/sys/arch/m88k/m88k/m8820x_machdep.c b/sys/arch/m88k/m88k/m8820x_machdep.c index f6fe89996fc..54275cb2072 100644 --- a/sys/arch/m88k/m88k/m8820x_machdep.c +++ b/sys/arch/m88k/m88k/m8820x_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m8820x_machdep.c,v 1.30 2007/11/14 23:12:46 miod Exp $ */ +/* $OpenBSD: m8820x_machdep.c,v 1.31 2007/11/22 05:42:50 miod Exp $ */ /* * Copyright (c) 2004, Miodrag Vallat. * @@ -126,6 +126,19 @@ struct cmmu_p cmmu8820x = { #endif }; +#ifdef MULTIPROCESSOR +/* + * This lock protects the cmmu SAR and SCR's; other ports + * can be accessed without locking it. + */ +__cpu_simple_lock_t cmmu_cpu_lock = __SIMPLELOCK_UNLOCKED; +#define CMMU_LOCK __cpu_simple_lock(&cmmu_cpu_lock) +#define CMMU_UNLOCK __cpu_simple_unlock(&cmmu_cpu_lock) +#else +#define CMMU_LOCK do { /* nothing */ } while (0) +#define CMMU_UNLOCK do { /* nothing */ } while (0) +#endif /* MULTIPROCESSOR */ + /* * Systems with more than 2 CMMUs per CPU use programmable split schemes. * diff --git a/sys/arch/m88k/m88k/m88k_machdep.c b/sys/arch/m88k/m88k/m88k_machdep.c index 4f276442de9..cf81fd6ad1e 100644 --- a/sys/arch/m88k/m88k/m88k_machdep.c +++ b/sys/arch/m88k/m88k/m88k_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m88k_machdep.c,v 1.33 2007/11/20 21:47:12 miod Exp $ */ +/* $OpenBSD: m88k_machdep.c,v 1.34 2007/11/22 05:42:50 miod Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -92,7 +92,6 @@ void vector_init(m88k_exception_vector_area *, u_int32_t *); */ #ifdef MULTIPROCESSOR -__cpu_simple_lock_t cmmu_cpu_lock = __SIMPLELOCK_UNLOCKED; cpuid_t master_cpu; #endif |