Skip to content

Commit

Permalink
arch/tile: make glibc's sysconf(_SC_NPROCESSORS_CONF) work correctly
Browse files Browse the repository at this point in the history
glibc assumes that it can count /sys/devices/system/cpu/cpu* to get
the number of configured cpus.  For this to be valid on tile, we need
to generate a "cpu" entry for all cpus, including the ones that are
not currently allocated for Linux's use.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
  • Loading branch information
Chris Metcalf committed Nov 24, 2010
1 parent b03a6c4 commit 4d658d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/tile/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ static int __init topology_init(void)
for_each_online_node(i)
register_one_node(i);

for_each_present_cpu(i)
for (i = 0; i < smp_height * smp_width; ++i)
register_cpu(&cpu_devices[i], i);

return 0;
Expand Down

0 comments on commit 4d658d1

Please sign in to comment.