mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jan Beulich" <jbeulich@novell.com>
To: <yhlu.kernel@gmail.com>, "Andi Kleen" <ak@suse.de>
Cc: <torvalds@osdl.org>, <linux-kernel@vger.kernel.org>,
	<patches@x86-64.org>
Subject: Re: [patches] [PATCH for 2.6.22] [10/10] x86_64: fix link warningbetween for .text and .init.text
Date: Wed, 20 Jun 2007 13:02:49 +0100	[thread overview]
Message-ID: <46793389.76E4.0078.0@novell.com> (raw)
In-Reply-To: <20070620102339.2812014ACF@wotan.suse.de>

This is the right way I think. With mtrr_bp_init being __init, get_mtrr_state
can then also be __init, making the other two changes unnecessary. I had
submitted a patch to that effect about a week ago. Beyond that patch, as
I now looked at this again, it would seem to me that print_fixed can then in
fact also be __init (rather than being __cpuinit).

Jan

>>> Andi Kleen <ak@suse.de> 20.06.07 12:23 >>>

From: "Yinghai Lu" <yhlu.kernel@gmail.com>

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>

---
 arch/i386/kernel/cpu/mtrr/generic.c |    4 ++--
 arch/i386/kernel/cpu/mtrr/main.c    |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

Index: linux/arch/i386/kernel/cpu/mtrr/generic.c
===================================================================
--- linux.orig/arch/i386/kernel/cpu/mtrr/generic.c
+++ linux/arch/i386/kernel/cpu/mtrr/generic.c
@@ -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);
@@ -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;
 
Index: linux/arch/i386/kernel/cpu/mtrr/main.c
===================================================================
--- linux.orig/arch/i386/kernel/cpu/mtrr/main.c
+++ linux/arch/i386/kernel/cpu/mtrr/main.c
@@ -644,7 +644,7 @@ static struct sysdev_driver mtrr_sysdev_
  * initialized (i.e. before smp_init()).
  * 
  */
-void mtrr_bp_init(void)
+__init void mtrr_bp_init(void)
 {
 	init_ifs();
 

_______________________________________________
patches mailing list
patches@x86-64.org 
https://www.x86-64.org/mailman/listinfo/patches 



  reply	other threads:[~2007-06-20 12:02 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-20 10:23 [PATCH for 2.6.22] [0/10] X86 late bug fixes for 2.6.22 Andi Kleen
2007-06-20 10:23 ` [PATCH for 2.6.22] [1/10] i386: bug in i386 MTRR initialization Andi Kleen
2007-06-20 21:16   ` Linus Torvalds
2007-06-20 10:23 ` [PATCH for 2.6.22] [2/10] x86_64: Fix readahead/sync_file_range/fadvise64 compat calls Andi Kleen
2007-06-20 10:23 ` [PATCH for 2.6.22] [3/10] x86_64: Fix eventd/timerfd syscalls Andi Kleen
2007-06-20 10:23 ` [PATCH for 2.6.22] [4/10] x86: Disable DAC on VIA bridges Andi Kleen
2007-06-20 10:23 ` [PATCH for 2.6.22] [5/10] x86_64: Quieten Atari keyboard warnings in Kconfig Andi Kleen
2007-06-20 12:31   ` Roman Zippel
2007-06-20 10:23 ` [PATCH for 2.6.22] [6/10] x86: Only make Macintosh drivers default on Macs Andi Kleen
2007-06-21 17:36   ` Olaf Hering
2007-06-21 17:52     ` Olaf Hering
2007-06-22  6:45       ` Andi Kleen
2007-06-21 17:58     ` Will Schmidt
2007-06-21 18:26       ` Linus Torvalds
2007-06-21 18:54         ` Olaf Hering
2007-06-21 21:09           ` Will Schmidt
2007-06-20 10:23 ` [PATCH for 2.6.22] [7/10] x86: Disable KPROBES with DEBUG_RODATA for now Andi Kleen
2007-06-20 10:23 ` [PATCH for 2.6.22] [8/10] x86: change_page_attr bandaids Andi Kleen
2007-06-20 10:23 ` [PATCH for 2.6.22] [9/10] i386: Disable alternative() patching after boot with DEBUG_RODATA Andi Kleen
2007-06-20 11:55   ` [patches] [PATCH for 2.6.22] [9/10] i386: Disable alternative()patching after boot with DEBUG_RO Jan Beulich
2007-06-20 12:27     ` Andi Kleen
2007-06-20 10:23 ` [PATCH for 2.6.22] [10/10] x86_64: fix link warning between for .text and .init.text Andi Kleen
2007-06-20 12:02   ` Jan Beulich [this message]
2007-06-20 12:30     ` [patches] [PATCH for 2.6.22] [10/10] x86_64: fix link warningbetween " Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46793389.76E4.0078.0@novell.com \
    --to=jbeulich@novell.com \
    --cc=ak@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@x86-64.org \
    --cc=torvalds@osdl.org \
    --cc=yhlu.kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome