Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mips/include use 32bit __cpuset_t in o32 kernels
details: https://anonhg.NetBSD.org/src/rev/4bcbf654764f
branches: trunk
changeset: 336986:4bcbf654764f
user: macallan <macallan%NetBSD.org@localhost>
date: Sun Mar 29 12:00:02 2015 +0000
description:
use 32bit __cpuset_t in o32 kernels
ok matt@
diffstat:
sys/arch/mips/include/cpuset.h | 9 +++++++--
sys/arch/mips/include/types.h | 8 ++++++--
2 files changed, 13 insertions(+), 4 deletions(-)
diffs (50 lines):
diff -r 7d7fcafe8f6c -r 4bcbf654764f sys/arch/mips/include/cpuset.h
--- a/sys/arch/mips/include/cpuset.h Sun Mar 29 10:55:11 2015 +0000
+++ b/sys/arch/mips/include/cpuset.h Sun Mar 29 12:00:02 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpuset.h,v 1.2 2011/02/20 07:45:47 matt Exp $ */
+/* $NetBSD: cpuset.h,v 1.3 2015/03/29 12:00:02 macallan Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -33,10 +33,15 @@
#define CPUSET_SINGLE(cpu) ((__cpuset_t)1 << (cpu))
+#if defined(__mips_o32)
+#define CPUSET_ADD(set, cpu) atomic_or_32(&(set), CPUSET_SINGLE(cpu))
+#define CPUSET_DEL(set, cpu) atomic_and_32(&(set), ~CPUSET_SINGLE(cpu))
+#define CPUSET_SUB(set1, set2) atomic_and_32(&(set1), ~(set2))
+#else
#define CPUSET_ADD(set, cpu) atomic_or_64(&(set), CPUSET_SINGLE(cpu))
#define CPUSET_DEL(set, cpu) atomic_and_64(&(set), ~CPUSET_SINGLE(cpu))
#define CPUSET_SUB(set1, set2) atomic_and_64(&(set1), ~(set2))
-
+#endif
#define CPUSET_EXCEPT(set, cpu) ((set) & ~CPUSET_SINGLE(cpu))
#define CPUSET_HAS_P(set, cpu) ((set) & CPUSET_SINGLE(cpu))
diff -r 7d7fcafe8f6c -r 4bcbf654764f sys/arch/mips/include/types.h
--- a/sys/arch/mips/include/types.h Sun Mar 29 10:55:11 2015 +0000
+++ b/sys/arch/mips/include/types.h Sun Mar 29 12:00:02 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.54 2014/01/04 00:10:03 dsl Exp $ */
+/* $NetBSD: types.h,v 1.55 2015/03/29 12:00:02 macallan Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -131,9 +131,13 @@
#define PCU_UNIT_COUNT 2
#endif
+#if defined(__mips_o32)
+typedef __uint32_t __cpuset_t;
+#define __CPUSET_MAXNUMCPU 32
+#else
typedef __uint64_t __cpuset_t;
#define __CPUSET_MAXNUMCPU 64
-
+#endif
typedef volatile unsigned int __cpu_simple_lock_t;
#define __SIMPLELOCK_LOCKED 1
Home |
Main Index |
Thread Index |
Old Index