summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/sys
diff options
context:
space:
mode:
authorjohnlev <none@none>2006-09-13 11:29:23 -0700
committerjohnlev <none@none>2006-09-13 11:29:23 -0700
commite824d57f8160a27ac5e650005c7a4f037109c2be (patch)
tree0377a5089265cc3a883aea1b1d36228d73671239 /usr/src/uts/common/sys
parentc62a497d57b723da895936c9a5d3b193efe0a3e2 (diff)
downloadillumos-joyent-e824d57f8160a27ac5e650005c7a4f037109c2be.tar.gz
6338238 DWARF parser can't handle anon struct/union
6415645 cpu_t hack isn't working as expected 6441836 ctffindmod.sh still talks about ia64 6458224 genassym could handle blank lines better --HG-- rename : usr/src/tools/ctf/cvt/st_bugs.c => usr/src/tools/ctf/cvt/fixup_tdescs.c
Diffstat (limited to 'usr/src/uts/common/sys')
-rw-r--r--usr/src/uts/common/sys/chip.h2
-rw-r--r--usr/src/uts/common/sys/cpupart.h27
-rw-r--r--usr/src/uts/common/sys/cpuvar.h19
-rw-r--r--usr/src/uts/common/sys/squeue_impl.h26
4 files changed, 52 insertions, 22 deletions
diff --git a/usr/src/uts/common/sys/chip.h b/usr/src/uts/common/sys/chip.h
index 9dd952bbe4..8889756884 100644
--- a/usr/src/uts/common/sys/chip.h
+++ b/usr/src/uts/common/sys/chip.h
@@ -170,7 +170,7 @@ extern int chip_set_isnull(chip_set_t *);
}
#define CHIP_IN_CPUPART(chp, cp) \
- (CHIP_SET_TEST((cp)->cp_chipset, (chp)->chip_seqid))
+ (CHIP_SET_TEST((cp)->cp_mach->mc_chipset, (chp)->chip_seqid))
#endif /* _MACHDEP */
diff --git a/usr/src/uts/common/sys/cpupart.h b/usr/src/uts/common/sys/cpupart.h
index bd5c85aff5..0a74d17379 100644
--- a/usr/src/uts/common/sys/cpupart.h
+++ b/usr/src/uts/common/sys/cpupart.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -58,6 +57,17 @@ typedef int cpupartid_t;
#define CP_ALL 0 /* return all cpu partitions */
#define CP_NONEMPTY 1 /* return only non-empty ones */
+#if defined(_MACHDEP)
+struct mach_cpupart {
+ cpuset_t mc_haltset;
+ chip_set_t mc_chipset;
+};
+
+extern struct mach_cpupart cp_default_mach;
+#else
+struct mach_cpupart;
+#endif
+
typedef struct cpupart {
disp_t cp_kp_queue; /* partition-wide kpreempt queue */
cpupartid_t cp_id; /* partition ID */
@@ -92,13 +102,8 @@ typedef struct cpupart {
uint_t cp_attr; /* bitmask of attributes */
lgrp_gen_t cp_gen; /* generation number */
lgrp_id_t cp_lgrp_hint; /* last home lgroup chosen */
-#if defined(_MACHDEP)
- /*
- * These guarded members must reside at the end of the structure
- */
- cpuset_t cp_haltset; /* bitmask of halted cpus */
- chip_set_t cp_chipset; /* set of chips spanned by this part */
-#endif /* _MACHDEP */
+
+ struct mach_cpupart *cp_mach; /* mach-specific */
} cpupart_t;
typedef struct cpupart_kstat {
diff --git a/usr/src/uts/common/sys/cpuvar.h b/usr/src/uts/common/sys/cpuvar.h
index 29b9880a02..f413431b0d 100644
--- a/usr/src/uts/common/sys/cpuvar.h
+++ b/usr/src/uts/common/sys/cpuvar.h
@@ -82,6 +82,11 @@ struct nvlist;
/*
* Per-CPU data.
+ *
+ * Be careful adding new members: if they are not the same in all modules (e.g.
+ * change size depending on a #define), CTF uniquification can fail to work
+ * properly. Furthermore, this is transitive in that it applies recursively to
+ * all types pointed to by cpu_t.
*/
typedef struct cpu {
processorid_t cpu_id; /* CPU number */
@@ -206,14 +211,16 @@ typedef struct cpu {
struct cpu_physid *cpu_physid; /* physical associations */
-#if (defined(_KERNEL) || defined(_KMEMUSER)) && defined(_MACHDEP)
/*
- * XXX - needs to be fixed. Structure size should not change.
- * probably needs to be a pointer to an opaque structure.
- * XXX - this is OK as long as cpu structs aren't in an array.
- * A user program will either read the first part,
- * which is machine-independent, or read the whole thing.
+ * New members must be added /before/ this member, as the CTF tools
+ * rely on this being the last field before cpu_m, so they can
+ * correctly calculate the offset when synthetically adding the cpu_m
+ * member in objects that do not have it. This fixup is required for
+ * uniquification to work correctly.
*/
+ uintptr_t cpu_m_pad;
+
+#if (defined(_KERNEL) || defined(_KMEMUSER)) && defined(_MACHDEP)
struct machcpu cpu_m; /* per architecture info */
#endif
} cpu_t;
diff --git a/usr/src/uts/common/sys/squeue_impl.h b/usr/src/uts/common/sys/squeue_impl.h
index 25b12408da..54870c067c 100644
--- a/usr/src/uts/common/sys/squeue_impl.h
+++ b/usr/src/uts/common/sys/squeue_impl.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -37,6 +36,25 @@ extern "C" {
#define SQ_NAMELEN 31
+/*
+ * SQUEUE_DEBUG: If defined as 1, special code is compiled in which records
+ * additional information aiding debugging is recorded in squeue.
+ *
+ * SQUEUE_PROFILE: If defined as 1, special code is compiled in which collects
+ * various squeue statistics and exports them as kstats.
+ *
+ * Ideally we would like both SQUEUE_DEBUG and SQUEUE_PROFILE to be always set,
+ * but it affects performance, so they are enabled on DEBUG kernels and disabled
+ * on non-DEBUG by default.
+ */
+#ifdef DEBUG
+#define SQUEUE_DEBUG 1
+#define SQUEUE_PROFILE 1
+#else
+#define SQUEUE_DEBUG 0
+#define SQUEUE_PROFILE 0
+#endif
+
typedef struct sqstat_s {
uint_t sq_max_qlen;
uint_t sq_npackets_worker;