From 2ba7bed49c85e62bfa4f8bf03611bf26d86456a4 Mon Sep 17 00:00:00 2001 From: Jaswinder Singh Rajput Date: Sat, 21 Mar 2009 16:55:24 +0530 Subject: [PATCH] --- yaml --- r: 138804 b: refs/heads/master c: 271eb5c588e5d0a41eca6e118b6927af3f0f04b9 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/apic/io_apic.c | 9 +++------ trunk/arch/x86/kernel/topology.c | 14 ++++++++------ 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/[refs] b/[refs] index 2e3d56524a89..9067319d4b61 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 04c93ce4991fce731dab346d03964504339347db +refs/heads/master: 271eb5c588e5d0a41eca6e118b6927af3f0f04b9 diff --git a/trunk/arch/x86/kernel/apic/io_apic.c b/trunk/arch/x86/kernel/apic/io_apic.c index d882c03604ee..42cdc78427a2 100644 --- a/trunk/arch/x86/kernel/apic/io_apic.c +++ b/trunk/arch/x86/kernel/apic/io_apic.c @@ -4130,12 +4130,9 @@ static int __init ioapic_insert_resources(void) struct resource *r = ioapic_resources; if (!r) { - if (nr_ioapics > 0) { - printk(KERN_ERR - "IO APIC resources couldn't be allocated.\n"); - return -1; - } - return 0; + printk(KERN_ERR + "IO APIC resources could be not be allocated.\n"); + return -1; } for (i = 0; i < nr_ioapics; i++) { diff --git a/trunk/arch/x86/kernel/topology.c b/trunk/arch/x86/kernel/topology.c index 0fcc95a354f7..7e4515957a1c 100644 --- a/trunk/arch/x86/kernel/topology.c +++ b/trunk/arch/x86/kernel/topology.c @@ -25,10 +25,10 @@ * * Send feedback to */ -#include -#include #include #include +#include +#include #include static DEFINE_PER_CPU(struct x86_cpu, cpu_devices); @@ -47,6 +47,7 @@ int __ref arch_register_cpu(int num) */ if (num) per_cpu(cpu_devices, num).cpu.hotpluggable = 1; + return register_cpu(&per_cpu(cpu_devices, num).cpu, num); } EXPORT_SYMBOL(arch_register_cpu); @@ -56,12 +57,13 @@ void arch_unregister_cpu(int num) unregister_cpu(&per_cpu(cpu_devices, num).cpu); } EXPORT_SYMBOL(arch_unregister_cpu); -#else +#else /* CONFIG_HOTPLUG_CPU */ + static int __init arch_register_cpu(int num) { return register_cpu(&per_cpu(cpu_devices, num).cpu, num); } -#endif /*CONFIG_HOTPLUG_CPU*/ +#endif /* CONFIG_HOTPLUG_CPU */ static int __init topology_init(void) { @@ -70,11 +72,11 @@ static int __init topology_init(void) #ifdef CONFIG_NUMA for_each_online_node(i) register_one_node(i); -#endif /* CONFIG_NUMA */ +#endif for_each_present_cpu(i) arch_register_cpu(i); + return 0; } - subsys_initcall(topology_init);