You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[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
@@ -304,23 +304,12 @@ static struct notifier_block sysfs_cpu_nb = {
|
||||
/* NUMA stuff */
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
static struct node node_devices[MAX_NUMNODES];
|
||||
|
||||
static void register_nodes(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < MAX_NUMNODES; i++) {
|
||||
if (node_online(i)) {
|
||||
int p_node = parent_node(i);
|
||||
struct node *parent = NULL;
|
||||
|
||||
if (p_node != i)
|
||||
parent = &node_devices[p_node];
|
||||
|
||||
register_node(&node_devices[i], i, parent);
|
||||
}
|
||||
}
|
||||
for (i = 0; i < MAX_NUMNODES; i++)
|
||||
register_one_node(i);
|
||||
}
|
||||
|
||||
int sysfs_add_device_to_node(struct sys_device *dev, int nid)
|
||||
|
||||
Reference in New Issue
Block a user