Module: xenomai-forge
Branch: master
Commit: c04f509e276a734f7e64a34794e0fe2685f03bdc
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=c04f509e276a734f7e64a34794e0fe2685f03bdc

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Wed Oct  3 23:33:39 2012 +0200

hal/generic: restrict supported CPU set to online CPUs

---

 kernel/cobalt/arch/generic/hal.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/cobalt/arch/generic/hal.c b/kernel/cobalt/arch/generic/hal.c
index acd99ed..b9e5ec9 100644
--- a/kernel/cobalt/arch/generic/hal.c
+++ b/kernel/cobalt/arch/generic/hal.c
@@ -200,7 +200,7 @@ int rthal_init(void)
        {
                int cpu;
                cpus_clear(rthal_archdata.supported_cpus);
-               for (cpu = 0; cpu < BITS_PER_LONG; cpu++)
+               for (cpu = 0; cpu < num_online_cpus(); cpu++)
                        if (supported_cpus_arg & (1 << cpu))
                                cpu_set(cpu, rthal_archdata.supported_cpus);
        }


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to