x86: silence section mismatch warning - get_local_pda

Take out part of get_local_pda referencing __init function (free_bootmem)
to new (static) function marked as __ref. It's safe to do because free_bootmem
is called before __init sections are dropped.

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

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by Marcin Slusarz and committed by Ingo Molnar d19fbfdf c6a92a25

+9 -2
+9 -2
arch/x86/kernel/smpboot.c
··· 756 756 } 757 757 758 758 #ifdef CONFIG_X86_64 759 + 760 + /* __ref because it's safe to call free_bootmem when after_bootmem == 0. */ 761 + static void __ref free_bootmem_pda(struct x8664_pda *oldpda) 762 + { 763 + if (!after_bootmem) 764 + free_bootmem((unsigned long)oldpda, sizeof(*oldpda)); 765 + } 766 + 759 767 /* 760 768 * Allocate node local memory for the AP pda. 761 769 * ··· 792 784 793 785 if (oldpda) { 794 786 memcpy(newpda, oldpda, size); 795 - if (!after_bootmem) 796 - free_bootmem((unsigned long)oldpda, size); 787 + free_bootmem_pda(oldpda); 797 788 } 798 789 799 790 newpda->in_bootmem = 0;