[PATCH] Register sysfs file for hotplugged new node
When new node becomes enable by hot-add, new sysfs file must be created for new node. So, if new node is enabled by add_memory(), register_one_node() is called to create it. In addition, I386's arch_register_node() and a part of register_nodes() of powerpc are consolidated to register_one_node() as a generic_code(). This is tested by Tiger4(IPF) with node hot-plug emulation. Signed-off-by: Keiichiro Tokunaga <tokuanga.keiich@jp.fujitsu.com> Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
1f04bbd2d3
commit
0fc44159bf
@@ -38,7 +38,7 @@ int arch_register_cpu(int num){
|
||||
#ifdef CONFIG_NUMA
|
||||
int node = cpu_to_node(num);
|
||||
if (node_online(node))
|
||||
parent = &node_devices[node].node;
|
||||
parent = &node_devices[parent_node(node)];
|
||||
#endif /* CONFIG_NUMA */
|
||||
|
||||
/*
|
||||
@@ -61,7 +61,7 @@ void arch_unregister_cpu(int num) {
|
||||
#ifdef CONFIG_NUMA
|
||||
int node = cpu_to_node(num);
|
||||
if (node_online(node))
|
||||
parent = &node_devices[node].node;
|
||||
parent = &node_devices[parent_node(node)];
|
||||
#endif /* CONFIG_NUMA */
|
||||
|
||||
return unregister_cpu(&cpu_devices[num].cpu, parent);
|
||||
@@ -74,16 +74,13 @@ EXPORT_SYMBOL(arch_unregister_cpu);
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
#include <linux/mmzone.h>
|
||||
#include <asm/node.h>
|
||||
|
||||
struct i386_node node_devices[MAX_NUMNODES];
|
||||
|
||||
static int __init topology_init(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for_each_online_node(i)
|
||||
arch_register_node(i);
|
||||
register_one_node(i);
|
||||
|
||||
for_each_present_cpu(i)
|
||||
arch_register_cpu(i);
|
||||
|
Reference in New Issue
Block a user