summaryrefslogtreecommitdiffstats
path: root/sys/sys/pcpu.h
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2011-05-27 15:50:14 +0000
committerattilio <attilio@FreeBSD.org>2011-05-27 15:50:14 +0000
commit9a75ededfbf8db715ecf5af60beb219e832c77da (patch)
tree68f6ee4e9db6eec8c42d7d11015ac86f5fc6e7df /sys/sys/pcpu.h
parent867c6223e7e4f6682389d40926782fd537ffc3ad (diff)
downloadFreeBSD-src-9a75ededfbf8db715ecf5af60beb219e832c77da.zip
FreeBSD-src-9a75ededfbf8db715ecf5af60beb219e832c77da.tar.gz
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
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 1b7f24f..752d2df 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
OpenPOWER on IntegriCloud