]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[MIPS] setup.c: use __pa_symbol() where needed
authorFranck Bui-Huu <vagabon.xyz@gmail.com>
Thu, 19 Oct 2006 11:20:03 +0000 (13:20 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 30 Nov 2006 01:14:41 +0000 (01:14 +0000)
It should fix the broken code in resource_init() too.

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/setup.c

index 715451a9d5d637cb5006e00ae332b60220f15abc..b52cc9763763c6c17fe4c4694e871cbb74360962 100644 (file)
@@ -260,7 +260,7 @@ static void __init bootmem_init(void)
         * of usable memory.
         */
        reserved_end = init_initrd();
-       reserved_end = PFN_UP(__pa(max(reserved_end, (unsigned long)&_end)));
+       reserved_end = PFN_UP(max(__pa(reserved_end), __pa_symbol(&_end)));
 
        /*
         * Find the highest page frame number we have available.
@@ -432,10 +432,10 @@ static void __init resource_init(void)
        if (UNCAC_BASE != IO_BASE)
                return;
 
-       code_resource.start = virt_to_phys(&_text);
-       code_resource.end = virt_to_phys(&_etext) - 1;
-       data_resource.start = virt_to_phys(&_etext);
-       data_resource.end = virt_to_phys(&_edata) - 1;
+       code_resource.start = __pa_symbol(&_text);
+       code_resource.end = __pa_symbol(&_etext) - 1;
+       data_resource.start = __pa_symbol(&_etext);
+       data_resource.end = __pa_symbol(&_edata) - 1;
 
        /*
         * Request address space for all standard RAM.