aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/pcpu.h
diff options
context:
space:
mode:
authorAttilio Rao <attilio@FreeBSD.org>2011-05-27 15:50:14 +0000
committerAttilio Rao <attilio@FreeBSD.org>2011-05-27 15:50:14 +0000
commitd5880f9cdfac5af5b1b92212097d71d3e0ddf459 (patch)
tree68f6ee4e9db6eec8c42d7d11015ac86f5fc6e7df /sys/sys/pcpu.h
parent7fcdc9a26f71a2fc89e0c83bcf9ebb4338ca2f60 (diff)
downloadsrc-d5880f9cdfac5af5b1b92212097d71d3e0ddf459.tar.gz
src-d5880f9cdfac5af5b1b92212097d71d3e0ddf459.zip
In the near future cpuset_t objects in struct pcpu will be axed out, but
as long as this does not happen, we need to fix interfaces to userland in order to not break run-time accesses to the structure. Reviwed by: kib Tested by: pluknet
Notes
Notes: svn path=/projects/largeSMP/; revision=222360
Diffstat (limited to 'sys/sys/pcpu.h')
-rw-r--r--sys/sys/pcpu.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/sys/pcpu.h b/sys/sys/pcpu.h
index 1b7f24f39117..752d2dfbec0c 100644
--- a/sys/sys/pcpu.h
+++ b/sys/sys/pcpu.h
@@ -163,8 +163,6 @@ struct pcpu {
uint64_t pc_switchtime; /* cpu_ticks() at last csw */
int pc_switchticks; /* `ticks' at last csw */
u_int pc_cpuid; /* This cpu number */
- cpuset_t pc_cpumask; /* This cpu mask */
- cpuset_t pc_other_cpus; /* Mask of all other cpus */
SLIST_ENTRY(pcpu) pc_allcpu;
struct lock_list_entry *pc_spinlocks;
#ifdef KTR
@@ -198,6 +196,18 @@ struct pcpu {
* if only to make kernel debugging easier.
*/
PCPU_MD_FIELDS;
+
+ /*
+ * XXX
+ * For the time being, keep the cpuset_t objects as the very last
+ * members of the structure.
+ * They are actually tagged to be removed soon, but as long as this
+ * does not happen, it is necessary to find a way to implement
+ * easilly interfaces to userland and leaving them last makes that
+ * possible.
+ */
+ cpuset_t pc_cpumask; /* This cpu mask */
+ cpuset_t pc_other_cpus; /* Mask of all other cpus */
} __aligned(CACHE_LINE_SIZE);
#ifdef _KERNEL