Skip to content

Commit

Permalink
x86_64: fix link warning between for .text and .init.text
Browse files Browse the repository at this point in the history
WARNING: arch/x86_64/kernel/built-in.o(.text+0xace9): Section mismatch: reference to .init.text: (between 'get_mtrr_state' and 'mtrr_wrmsr')
WARNING: arch/x86_64/kernel/built-in.o(.text+0xad09): Section mismatch: reference to .init.text: (between 'get_mtrr_state' and 'mtrr_wrmsr')
WARNING: arch/x86_64/kernel/built-in.o(.text+0xad38): Section mismatch: reference to .init.text: (between 'get_mtrr_state' and 'mtrr_wrmsr')
WARNING: drivers/built-in.o(.text+0x3a680): Section mismatch: reference to .init.text:acpi_map_pxm_to_node (between 'acpi_get_node' and 'acpi_lock_ac_dir')

AK: also marked mtrr_bp_init __init to avoid some more warnings

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Acked-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
yhlu authored and Linus Torvalds committed Jun 20, 2007
1 parent 018d2ad commit bf8c481
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions arch/i386/kernel/cpu/mtrr/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static int mtrr_show;
module_param_named(show, mtrr_show, bool, 0);

/* Get the MSR pair relating to a var range */
static void __init
static void
get_mtrr_var_range(unsigned int index, struct mtrr_var_range *vr)
{
rdmsr(MTRRphysBase_MSR(index), vr->base_lo, vr->base_hi);
Expand All @@ -68,7 +68,7 @@ void mtrr_save_fixed_ranges(void *info)
get_fixed_ranges(mtrr_state.fixed_ranges);
}

static void __cpuinit print_fixed(unsigned base, unsigned step, const mtrr_type*types)
static void print_fixed(unsigned base, unsigned step, const mtrr_type*types)
{
unsigned i;

Expand Down
2 changes: 1 addition & 1 deletion arch/i386/kernel/cpu/mtrr/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ static struct sysdev_driver mtrr_sysdev_driver = {
* initialized (i.e. before smp_init()).
*
*/
void mtrr_bp_init(void)
__init void mtrr_bp_init(void)
{
init_ifs();

Expand Down

0 comments on commit bf8c481

Please sign in to comment.