summaryrefslogtreecommitdiffstats
path: root/sys/mips/rmi
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2011-05-13 19:56:58 +0000
committerattilio <attilio@FreeBSD.org>2011-05-13 19:56:58 +0000
commita79fdc81aa4d25507b90e10fedbc38d5ad84ba4a (patch)
treed2889bf496fba4f4f14a81f1881c272545fd637f /sys/mips/rmi
parentdcae8c96267648ce6ae3191f642d5ddd62d0b319 (diff)
downloadFreeBSD-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/rmi')
-rw-r--r--sys/mips/rmi/xlr_machdep.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/mips/rmi/xlr_machdep.c b/sys/mips/rmi/xlr_machdep.c
index 7181a5c..836c605 100644
--- a/sys/mips/rmi/xlr_machdep.c
+++ b/sys/mips/rmi/xlr_machdep.c
@@ -614,17 +614,15 @@ platform_processor_id(void)
return (xlr_hwtid_to_cpuid[xlr_cpu_id()]);
}
-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 = xlr_ncores * xlr_threads_per_core;
for (i = 0; i < s; i++)
- CPU_SET(i, &cpumask);
- return (cpumask);
+ CPU_SET(i, mask);
}
struct cpu_group *
OpenPOWER on IntegriCloud