mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rakib Mullick <rakib.mullick@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: mingo@elte.hu, LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH -mm] x86/mm: Fix section mismatch
Date: Fri, 13 Feb 2009 20:24:11 +0600	[thread overview]
Message-ID: <b9df5fa10902130624r5690b37bv404c528a90e5d112@mail.gmail.com> (raw)

 Impact: Fix section mismatch.

Currently pat_init calls pat_disable which is annoted with __cpuinit.
Thus requires pat_init to be
annoted with __cpuinit, otherwise causes the following warning.

 LD      arch/x86/mm/built-in.o
WARNING: arch/x86/mm/built-in.o(.text+0x1fff): Section mismatch in
reference from the function pat_init() to the function
.cpuinit.text:pat_disable()
The function pat_init() references
the function __cpuinit pat_disable().
This is often because pat_init lacks a __cpuinit
annotation or the annotation of pat_disable is wrong.

After annotating pat_init with __cpuinit, it generates the following
warning when CONFIG_x86_PAT=n.

 MODPOST vmlinux.o
WARNING: vmlinux.o(.text+0xd48b): Section mismatch in reference from
the function generic_set_all() to the function
.cpuinit.text:pat_init()
The function generic_set_all() references
the function __cpuinit pat_init().
This is often because generic_set_all lacks a __cpuinit
annotation or the annotation of pat_init is wrong.

This patch fixes the above warnings.

---
Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>

--- linus/arch/x86/mm/pat.c	2009-02-13 11:23:25.000000000 +0600
+++ rakib/arch/x86/mm/pat.c	2009-02-13 11:21:49.000000000 +0600
@@ -76,7 +76,7 @@ enum {

 #define PAT(x, y)	((u64)PAT_ ## y << ((x)*8))

-void pat_init(void)
+void __cpuinit pat_init(void)
 {
 	u64 pat;

---
--- linus/arch/x86/kernel/cpu/mtrr/generic.c	2009-02-13 10:24:25.000000000 +0600
+++ rakib/arch/x86/kernel/cpu/mtrr/generic.c	2009-02-13 12:47:55.000000000 +0600
@@ -543,7 +543,7 @@ static void post_set(void) __releases(se
 	spin_unlock(&set_atomicity_lock);
 }

-static void generic_set_all(void)
+static void __cpuinit generic_set_all(void)
 {
 	unsigned long mask, count;
 	unsigned long flags;

                 reply	other threads:[~2009-02-13 14:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=b9df5fa10902130624r5690b37bv404c528a90e5d112@mail.gmail.com \
    --to=rakib.mullick@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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

all inboxes | Powered by JetHome®