Re: Wierd /proc/cpuinfo with 2.4.11-pre4

Martin J. Bligh
2001-10-05T23:25:16Z

> 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.