Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Default PCU_UNIT_COUNT to 0. If 0, don't compile the co...
details: https://anonhg.NetBSD.org/src/rev/fe2752f27b30
branches: trunk
changeset: 762343:fe2752f27b30
user: matt <matt%NetBSD.org@localhost>
date: Sat Feb 19 20:19:54 2011 +0000
description:
Default PCU_UNIT_COUNT to 0. If 0, don't compile the contents of subr_pcu.c
and don't include the pcu related members into struct lwp.
diffstat:
sys/conf/files | 4 ++--
sys/kern/subr_pcu.c | 8 ++++++--
sys/sys/lwp.h | 4 +++-
sys/sys/pcu.h | 6 +++---
4 files changed, 14 insertions(+), 8 deletions(-)
diffs (93 lines):
diff -r c94788e8012f -r fe2752f27b30 sys/conf/files
--- a/sys/conf/files Sat Feb 19 20:07:02 2011 +0000
+++ b/sys/conf/files Sat Feb 19 20:19:54 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files,v 1.1000 2011/02/18 22:49:03 rmind Exp $
+# $NetBSD: files,v 1.1001 2011/02/19 20:19:54 matt Exp $
# @(#)files.newconf 7.5 (Berkeley) 5/10/93
version 20100430
@@ -1533,7 +1533,7 @@
file kern/subr_lwp_specificdata.c
file kern/subr_once.c
file kern/subr_optstr.c
-file kern/subr_pcu.c pcu
+file kern/subr_pcu.c
file kern/subr_percpu.c
file kern/subr_pool.c
file kern/subr_prf.c
diff -r c94788e8012f -r fe2752f27b30 sys/kern/subr_pcu.c
--- a/sys/kern/subr_pcu.c Sat Feb 19 20:07:02 2011 +0000
+++ b/sys/kern/subr_pcu.c Sat Feb 19 20:19:54 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_pcu.c,v 1.2 2011/02/17 18:44:54 matt Exp $ */
+/* $NetBSD: subr_pcu.c,v 1.3 2011/02/19 20:19:54 matt Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_pcu.c,v 1.2 2011/02/17 18:44:54 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_pcu.c,v 1.3 2011/02/19 20:19:54 matt Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@@ -65,6 +65,8 @@
#include <sys/pcu.h>
#include <sys/xcall.h>
+#if PCU_UNIT_COUNT > 0
+
#define PCU_SAVE 0x01 /* Save PCU state to the LWP. */
#define PCU_RELEASE 0x02 /* Release PCU state on the CPU. */
@@ -256,3 +258,5 @@
return l->l_pcu_used & (1 << id);
}
+
+#endif /* PCU_UNIT_COUNT > 0 */
diff -r c94788e8012f -r fe2752f27b30 sys/sys/lwp.h
--- a/sys/sys/lwp.h Sat Feb 19 20:07:02 2011 +0000
+++ b/sys/sys/lwp.h Sat Feb 19 20:19:54 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lwp.h,v 1.147 2011/02/19 00:22:50 jakllsch Exp $ */
+/* $NetBSD: lwp.h,v 1.148 2011/02/19 20:19:54 matt Exp $ */
/*-
* Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010
@@ -125,8 +125,10 @@
callout_t l_timeout_ch; /* !: callout for tsleep */
u_int l_emap_gen; /* !: emap generation number */
+#if PCU_UNIT_COUNT > 0
struct cpu_info * volatile l_pcu_cpu[PCU_UNIT_COUNT];
uint32_t l_pcu_used;
+#endif
/* Process level and global state, misc. */
LIST_ENTRY(lwp) l_list; /* a: entry on list of all LWPs */
diff -r c94788e8012f -r fe2752f27b30 sys/sys/pcu.h
--- a/sys/sys/pcu.h Sat Feb 19 20:07:02 2011 +0000
+++ b/sys/sys/pcu.h Sat Feb 19 20:19:54 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pcu.h,v 1.3 2011/02/17 19:58:34 rmind Exp $ */
+/* $NetBSD: pcu.h,v 1.4 2011/02/19 20:19:54 matt Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -33,10 +33,10 @@
#define _SYS_PCU_H_
/*
- * Default: one PCU for MD.
+ * Default: no PCU for MD.
*/
#ifndef PCU_UNIT_COUNT
-#define PCU_UNIT_COUNT 1
+#define PCU_UNIT_COUNT 0
#endif
#if defined(_KERNEL)
Home |
Main Index |
Thread Index |
Old Index