Re: Wierd /proc/cpuinfo with 2.4.11-pre4

From: Martin J. Bligh (Martin.Bligh@us.ibm.com)
Date: Fri Oct 05 2001 - 18:20:56 EST


> This will also fail if, for some reason "clustered_apic_mode" is set and
> you have less than 8 CPUs. What you really want is to have "max(8:NR_CPUS)"
> in the loop (or make the loop actually work with > 8 CPUs, which is probably
> the correct solution in the long run).

Nope, the cpu_online map should catch this. NR_CPUS is always 32
in SMP mode.

in get_cpuinfo ....

                if (!(cpu_online_map & (1<<n)))
                        continue;

I didn't notice that this would only work in SMP mode.

It's a horrible hack, but it's less horrible than corrupting memory randomly ;-)

M.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Oct 07 2001 - 21:00:40 EST