diff options
author | attilio <attilio@FreeBSD.org> | 2011-05-13 16:42:05 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2011-05-13 16:42:05 +0000 |
commit | dcae8c96267648ce6ae3191f642d5ddd62d0b319 (patch) | |
tree | c08d4dee0bf7768439f6baa6b5051733407a8280 /sys/mips/sibyte | |
parent | a0db972f622c3a9dd2d45cdd27cc47dd31961dbb (diff) | |
download | FreeBSD-src-dcae8c96267648ce6ae3191f642d5ddd62d0b319.zip FreeBSD-src-dcae8c96267648ce6ae3191f642d5ddd62d0b319.tar.gz |
Add the cpuset_t conversion for mips.
Diffstat (limited to 'sys/mips/sibyte')
-rw-r--r-- | sys/mips/sibyte/sb_scd.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/mips/sibyte/sb_scd.c b/sys/mips/sibyte/sb_scd.c index e5ac23c..f2035d8 100644 --- a/sys/mips/sibyte/sb_scd.c +++ b/sys/mips/sibyte/sb_scd.c @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include <sys/systm.h> #include <sys/module.h> #include <sys/bus.h> +#include <sys/cpuset.h> #include <machine/resource.h> #include <machine/hwfunc.h> @@ -242,11 +243,17 @@ sb_clear_mailbox(int cpu, uint64_t val) sb_store64(regaddr, val); } -cpumask_t +cpuset_t platform_cpu_mask(void) { - - return (~0U >> (32 - SYSREV_NUM_PROCESSORS(sb_read_sysrev()))); + cpuset_t cpumask; + int i, s; + + CPU_ZERO(&cpumask); + s = SYSREV_NUM_PROCESSORS(sb_read_sysrev()); + for (i = 0; i < s; i++) + CPU_SET(i, &cpumask); + return (cpumask); } #endif /* SMP */ |