diff options
Diffstat (limited to 'arch/i386/kernel/topology.c')
-rw-r--r-- | arch/i386/kernel/topology.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/arch/i386/kernel/topology.c b/arch/i386/kernel/topology.c index 1eecc2e1bd4b..e2e281d4bcc8 100644 --- a/arch/i386/kernel/topology.c +++ b/arch/i386/kernel/topology.c | |||
@@ -32,15 +32,8 @@ | |||
32 | 32 | ||
33 | static struct i386_cpu cpu_devices[NR_CPUS]; | 33 | static struct i386_cpu cpu_devices[NR_CPUS]; |
34 | 34 | ||
35 | int arch_register_cpu(int num){ | 35 | int arch_register_cpu(int num) |
36 | struct node *parent = NULL; | 36 | { |
37 | |||
38 | #ifdef CONFIG_NUMA | ||
39 | int node = cpu_to_node(num); | ||
40 | if (node_online(node)) | ||
41 | parent = &node_devices[parent_node(node)]; | ||
42 | #endif /* CONFIG_NUMA */ | ||
43 | |||
44 | /* | 37 | /* |
45 | * CPU0 cannot be offlined due to several | 38 | * CPU0 cannot be offlined due to several |
46 | * restrictions and assumptions in kernel. This basically | 39 | * restrictions and assumptions in kernel. This basically |
@@ -50,21 +43,13 @@ int arch_register_cpu(int num){ | |||
50 | if (!num) | 43 | if (!num) |
51 | cpu_devices[num].cpu.no_control = 1; | 44 | cpu_devices[num].cpu.no_control = 1; |
52 | 45 | ||
53 | return register_cpu(&cpu_devices[num].cpu, num, parent); | 46 | return register_cpu(&cpu_devices[num].cpu, num); |
54 | } | 47 | } |
55 | 48 | ||
56 | #ifdef CONFIG_HOTPLUG_CPU | 49 | #ifdef CONFIG_HOTPLUG_CPU |
57 | 50 | ||
58 | void arch_unregister_cpu(int num) { | 51 | void arch_unregister_cpu(int num) { |
59 | struct node *parent = NULL; | 52 | return unregister_cpu(&cpu_devices[num].cpu); |
60 | |||
61 | #ifdef CONFIG_NUMA | ||
62 | int node = cpu_to_node(num); | ||
63 | if (node_online(node)) | ||
64 | parent = &node_devices[parent_node(node)]; | ||
65 | #endif /* CONFIG_NUMA */ | ||
66 | |||
67 | return unregister_cpu(&cpu_devices[num].cpu, parent); | ||
68 | } | 53 | } |
69 | EXPORT_SYMBOL(arch_register_cpu); | 54 | EXPORT_SYMBOL(arch_register_cpu); |
70 | EXPORT_SYMBOL(arch_unregister_cpu); | 55 | EXPORT_SYMBOL(arch_unregister_cpu); |