diff options
author | Jack Steiner <steiner@sgi.com> | 2008-09-23 08:42:05 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-16 16:53:11 +0200 |
commit | 8da077d6f31da291ee3a7dd559671cb8ca48cbe2 (patch) | |
tree | da3ea11ad6cd877b492317559fd2ae2a7de813f9 /arch/x86 | |
parent | 5ffa4eb2224343ec3fbd492ffe71e28e797435b7 (diff) | |
download | kernel_samsung_espresso10-8da077d6f31da291ee3a7dd559671cb8ca48cbe2.zip kernel_samsung_espresso10-8da077d6f31da291ee3a7dd559671cb8ca48cbe2.tar.gz kernel_samsung_espresso10-8da077d6f31da291ee3a7dd559671cb8ca48cbe2.tar.bz2 |
x86, uv: fix ordering of calls to uv_system_init & uv_cpu_init
Fix problem caused by reordering of the calls to uv_cpu_init() &
uv_system_init. Originally, uv_cpu_init() was called AFTER uv_system_init.
This order was recently broken as a side-effect of other patches.
With this patch, initialization of cpu 0 is now done by the system_init
call.
Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/genx2apic_uv_x.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/arch/x86/kernel/genx2apic_uv_x.c b/arch/x86/kernel/genx2apic_uv_x.c index 33581d9..b689075 100644 --- a/arch/x86/kernel/genx2apic_uv_x.c +++ b/arch/x86/kernel/genx2apic_uv_x.c @@ -356,7 +356,22 @@ static __init void uv_rtc_init(void) sn_rtc_cycles_per_second = ticks_per_sec; } -static bool uv_system_inited; +/* + * Called on each cpu to initialize the per_cpu UV data area. + * ZZZ hotplug not supported yet + */ +void __cpuinit uv_cpu_init(void) +{ + /* CPU 0 initilization will be done via uv_system_init. */ + if (!uv_blade_info) + return; + + uv_blade_info[uv_numa_blade_id()].nr_online_cpus++; + + if (get_uv_system_type() == UV_NON_UNIQUE_APIC) + set_x2apic_extra_bits(uv_hub_info->pnode); +} + void __init uv_system_init(void) { @@ -448,21 +463,6 @@ void __init uv_system_init(void) map_mmr_high(max_pnode); map_config_high(max_pnode); map_mmioh_high(max_pnode); - uv_system_inited = true; -} -/* - * Called on each cpu to initialize the per_cpu UV data area. - * ZZZ hotplug not supported yet - */ -void __cpuinit uv_cpu_init(void) -{ - BUG_ON(!uv_system_inited); - - uv_blade_info[uv_numa_blade_id()].nr_online_cpus++; - - if (get_uv_system_type() == UV_NON_UNIQUE_APIC) - set_x2apic_extra_bits(uv_hub_info->pnode); + uv_cpu_init(); } - - |