]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86: early_ioremap_init(), use __fix_to_virt(), because we are sure it's safe
authorWang Chen <wangchen@cn.fujitsu.com>
Wed, 25 Mar 2009 13:07:11 +0000 (14:07 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 25 Mar 2009 13:07:11 +0000 (14:07 +0100)
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

index 83ed74affba9f9ac1cd0c484104835ba53356493..0dfa09d69e80236ee47a94d6de8e7f8b8f0663c3 100644 (file)
@@ -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));