public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Wang Chen <wangchen@cn.fujitsu.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	tglx@linutronix.de, wangchen@cn.fujitsu.com, mingo@elte.hu,
	penguin-kernel@i-love.sakura.ne.jp
Subject: [tip:x86/mm] x86: early_ioremap_init(), use __fix_to_virt(), because we are sure it's safe
Date: Wed, 25 Mar 2009 13:09:29 GMT	[thread overview]
Message-ID: <tip-9f4f25c86ff2233dd98d4bd6968afb1ca66558a0@git.kernel.org> (raw)
In-Reply-To: <49C9FFEA.7060908@cn.fujitsu.com>

Commit-ID:  9f4f25c86ff2233dd98d4bd6968afb1ca66558a0
Gitweb:     http://git.kernel.org/tip/9f4f25c86ff2233dd98d4bd6968afb1ca66558a0
Author:     Wang Chen <wangchen@cn.fujitsu.com>
AuthorDate: Wed, 25 Mar 2009 14:07:11 +0100
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 25 Mar 2009 14:07:11 +0100

x86: early_ioremap_init(), use __fix_to_virt(), because we are sure it's safe

Tetsuo Handa reported this link bug:

 |  arch/x86/mm/built-in.o(.init.text+0x1831): In function `early_ioremap_init':
 |  : undefined reference to `__this_fixmap_does_not_exist'
 |  make: *** [.tmp_vmlinux1] Error 1

Commit:8827247ffcc9e880cbe4705655065cf011265157 used a variable (which
would be optimized to constant) as fix_to_virt()'s parameter.
It's depended on gcc's optimization and fails on old gcc. (Tetsuo used gcc 3.3)

We can use __fix_to_vir() instead, because we know it's safe and
don't need link time error reporting.

Reported-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Cc: sfr@canb.auug.org.au
LKML-Reference: <49C9FFEA.7060908@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
 arch/x86/mm/ioremap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
index 83ed74a..0dfa09d 100644
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -516,7 +516,7 @@ void __init early_ioremap_init(void)
 		printk(KERN_INFO "early_ioremap_init()\n");
 
 	for (i = 0; i < FIX_BTMAPS_SLOTS; i++)
-		slot_virt[i] = fix_to_virt(FIX_BTMAP_BEGIN - NR_FIX_BTMAPS*i);
+		slot_virt[i] = __fix_to_virt(FIX_BTMAP_BEGIN - NR_FIX_BTMAPS*i);
 
 	pmd = early_ioremap_pmd(fix_to_virt(FIX_BTMAP_BEGIN));
 	memset(bm_pte, 0, sizeof(bm_pte));

      parent reply	other threads:[~2009-03-25 13:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-25  3:24 linux-next-20090324: undefined reference to `__this_fixmap_does_not_exist\' Tetsuo Handa
2009-03-25  4:58 ` Wang Chen
2009-03-25  8:52   ` Wang Chen
2009-03-25  9:56     ` Wang Chen
2009-03-25 11:40       ` linux-next-20090324: undefined reference to `__this_fixmap_does_not_exist' Tetsuo Handa
2009-03-25 13:09       ` Wang Chen [this message]

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=tip-9f4f25c86ff2233dd98d4bd6968afb1ca66558a0@git.kernel.org \
    --to=wangchen@cn.fujitsu.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=tglx@linutronix.de \
    /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