x86: fix section mismatch warning - uv_cpu_init

WARNING: vmlinux.o(.cpuinit.text+0x3cc4): Section mismatch in reference from the function uv_cpu_init() to the function .init.text:uv_system_init()
The function __cpuinit uv_cpu_init() references
a function __init uv_system_init().
If uv_system_init is only used by uv_cpu_init then
annotate uv_system_init with a matching annotation.

uv_system_init was ment to be called only once, so do it from codepath
(native_smp_prepare_cpus) which is called once, right before activation
of other cpus (smp_init).

Note: old code relied on uv_node_to_blade being initialized to 0,
but it'a not initialized from anywhere.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Acked-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by Marcin Slusarz and committed by Ingo Molnar c4bd1fda 3a6ddd5f

+10 -3
+5 -3
arch/x86/kernel/genx2apic_uv_x.c
··· 293 293 sn_rtc_cycles_per_second = ticks_per_sec; 294 294 } 295 295 296 - static __init void uv_system_init(void) 296 + static bool uv_system_inited; 297 + 298 + void __init uv_system_init(void) 297 299 { 298 300 union uvh_si_addr_map_config_u m_n_config; 299 301 union uvh_node_id_u node_id; ··· 385 383 map_mmr_high(max_pnode); 386 384 map_config_high(max_pnode); 387 385 map_mmioh_high(max_pnode); 386 + uv_system_inited = true; 388 387 } 389 388 390 389 /* ··· 394 391 */ 395 392 void __cpuinit uv_cpu_init(void) 396 393 { 397 - if (!uv_node_to_blade) 398 - uv_system_init(); 394 + BUG_ON(!uv_system_inited); 399 395 400 396 uv_blade_info[uv_numa_blade_id()].nr_online_cpus++; 401 397
+3
arch/x86/kernel/smpboot.c
··· 1221 1221 printk(KERN_INFO "CPU%d: ", 0); 1222 1222 print_cpu_info(&cpu_data(0)); 1223 1223 setup_boot_clock(); 1224 + 1225 + if (is_uv_system()) 1226 + uv_system_init(); 1224 1227 out: 1225 1228 preempt_enable(); 1226 1229 }
+1
include/asm-x86/genapic_32.h
··· 118 118 #define get_uv_system_type() UV_NONE 119 119 #define is_uv_system() 0 120 120 #define uv_wakeup_secondary(a, b) 1 121 + #define uv_system_init() do {} while (0) 121 122 122 123 123 124 #endif
+1
include/asm-x86/genapic_64.h
··· 42 42 extern struct genapic apic_x2apic_uv_x; 43 43 DECLARE_PER_CPU(int, x2apic_extra_bits); 44 44 extern void uv_cpu_init(void); 45 + extern void uv_system_init(void); 45 46 extern int uv_wakeup_secondary(int phys_apicid, unsigned int start_rip); 46 47 47 48 extern void setup_apic_routing(void);