diff options
author | attilio <attilio@FreeBSD.org> | 2011-05-13 19:56:58 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2011-05-13 19:56:58 +0000 |
commit | a79fdc81aa4d25507b90e10fedbc38d5ad84ba4a (patch) | |
tree | d2889bf496fba4f4f14a81f1881c272545fd637f /sys/mips/sibyte | |
parent | dcae8c96267648ce6ae3191f642d5ddd62d0b319 (diff) | |
download | FreeBSD-src-a79fdc81aa4d25507b90e10fedbc38d5ad84ba4a.zip FreeBSD-src-a79fdc81aa4d25507b90e10fedbc38d5ad84ba4a.tar.gz |
Fix a brain-o in platform_cpu_mask() by just specifying a possible
cpuset_t to be copied, rather than return the array.
I can't rely anymore on this being a simple int/long object.
Reported by: art
Diffstat (limited to 'sys/mips/sibyte')
-rw-r--r-- | sys/mips/sibyte/sb_scd.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/mips/sibyte/sb_scd.c b/sys/mips/sibyte/sb_scd.c index f2035d8..50b9987 100644 --- a/sys/mips/sibyte/sb_scd.c +++ b/sys/mips/sibyte/sb_scd.c @@ -243,17 +243,15 @@ sb_clear_mailbox(int cpu, uint64_t val) sb_store64(regaddr, val); } -cpuset_t -platform_cpu_mask(void) +void +platform_cpu_mask(cpuset_t *mask) { - cpuset_t cpumask; int i, s; - CPU_ZERO(&cpumask); + CPU_ZERO(mask); s = SYSREV_NUM_PROCESSORS(sb_read_sysrev()); for (i = 0; i < s; i++) - CPU_SET(i, &cpumask); - return (cpumask); + CPU_SET(i, mask); } #endif /* SMP */ |