mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rakib Mullick <rakib.mullick@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	LKML <linux-kernel@vger.kernel.org>,
	x86@kernel.org
Subject: [PATCH] x86: Call __va() to get trampoline_base.
Date: Fri, 4 Dec 2009 22:26:02 +0600	[thread overview]
Message-ID: <b9df5fa10912040826s52e82f2cpd53604835be50c27@mail.gmail.com> (raw)

 x86, tboot: Call __va() to get trampoline_base.

 Do not pass trampoline_base as parameter of virt_to_phys.
Because trampoline_base is in .cpuinit.data section, but its
called from non-cpuinit function. So use __va(TRAMPOLINE_BASE)
instead of trampoline_base, which helps to fix section mismatch.

We were warned by the following warning:

  LD      arch/x86/kernel/built-in.o
WARNING: arch/x86/kernel/built-in.o(.text+0x13c5f): Section mismatch
in reference from the function tboot_setup_sleep() to the variable
.cpuinit.data:trampoline_base
The function tboot_setup_sleep() references
the variable __cpuinitdata trampoline_base.
This is often because tboot_setup_sleep lacks a __cpuinitdata
annotation or the annotation of trampoline_base is wrong.

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

--- linus/arch/x86/kernel/tboot.c	2009-12-04 17:22:57.000000000 +0600
+++ rakib/arch/x86/kernel/tboot.c	2009-12-04 17:19:09.000000000 +0600
@@ -191,7 +191,7 @@ static int tboot_setup_sleep(void)

 #ifdef CONFIG_X86_TRAMPOLINE
 	/* AP trampoline code */
-	add_mac_region(virt_to_phys(trampoline_base), TRAMPOLINE_SIZE);
+	add_mac_region(virt_to_phys(__va(TRAMPOLINE_BASE)), TRAMPOLINE_SIZE);
 #endif

 	/* kernel code + data + bss */

             reply	other threads:[~2009-12-04 16:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-04 16:26 Rakib Mullick [this message]
2009-12-05  1:25 ` H. Peter Anvin

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=b9df5fa10912040826s52e82f2cpd53604835be50c27@mail.gmail.com \
    --to=rakib.mullick@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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®