Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a888cebe authored by Ashok Raj's avatar Ashok Raj Committed by Linus Torvalds
Browse files

[PATCH] x86_64: create sysfs entries for cpu only for present cpus



Need to create sysfs only for cpus that are present.  Without which we see
NR_CPUS entries created when we have CONFIG_HOTPLUG and CONFIG_HOTPLUG_CPU
enabled.

Signed-off-by: default avatarAshok Raj <ashok.raj@intel.com>
Acked-by: default avatarAndi Kleen <ak@muc.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 0c2b9d5c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ static int __init topology_init(void)
	for_each_online_node(i)
		arch_register_node(i);

	for_each_cpu(i)
	for_each_present_cpu(i)
		arch_register_cpu(i);
	return 0;
}
@@ -87,7 +87,7 @@ static int __init topology_init(void)
{
	int i;

	for_each_cpu(i)
	for_each_present_cpu(i)
		arch_register_cpu(i);
	return 0;
}