linux-mips
[Top] [All Lists]

Fwd: Re: Build breakage in latest -next

To: linux-mips@linux-mips.org
Subject: Fwd: Re: Build breakage in latest -next
From: Ralf Baechle <ralf@linux-mips.org>
Date: Thu, 31 Oct 2013 16:48:17 +0100
Cc: Jayachandran C <jchandra@broadcom.com>, Ganesan Ramalingam <ganesanr@broadcom.com>, John Crispin <blogic@openwrt.org>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.21 (2010-09-15)
Comments regarding Rob's build fix below appreciated.

Thanks,

  Ralf

Date: Tue, 29 Oct 2013 17:55:04 -0500
From: Rob Herring <rob.herring@calxeda.com>
Subject: Re: Build breakage in latest -next

On 10/29/2013 04:04 PM, Ralf Baechle wrote:
> nlm_xlp_defconfig fails with:
> 
>   LINK    vmlinux
>   LD      vmlinux.o
>   MODPOST vmlinux.o
>   GEN     .version
>   CHK     include/generated/compile.h
>   UPD     include/generated/compile.h
>   CC      init/version.o
>   LD      init/built-in.o
> arch/mips/built-in.o: In function `plat_mem_setup':
> (.init.text+0x5b0): undefined reference to `early_init_devtree'
> make[2]: *** [vmlinux] Error 1
> make[1]: *** [sub-make] Error 2
> make: *** [all] Error 2
> make: Leaving directory `/home/ralf/src/linux/obj/nlm_xlp-build'
> 
> It appears this was caused by f75813c0127bbef41ac3152f64a72ba212a5514c
> [mips: use early_init_dt_scan] which removes the early_init_devtree
> function but doesn't the call in arch/mips/netlogic/xlp/setup.c.

I could change this to a call to device_tree_init, but the way it was 
done results in scanning the DT twice. I would like to move the 
device_tree_init call to be earlier instead to avoid this. I think this 
should be functionally equivalent, but could use more eyes on it.

Rob

diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index c538d6e..f5e5b0a 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -602,6 +602,8 @@ static void __init arch_mem_init(char **cmdline_p)
 {
        extern void plat_mem_setup(void);
 
+       device_tree_init();
+
        /* call board setup routine */
        plat_mem_setup();
 
@@ -662,7 +664,6 @@ static void __init arch_mem_init(char **cmdline_p)
                                crashk_res.end - crashk_res.start + 1,
                                BOOTMEM_DEFAULT);
 #endif
-       device_tree_init();
        sparse_init();
        plat_swiotlb_setup();
        paging_init();
diff --git a/arch/mips/netlogic/xlp/setup.c b/arch/mips/netlogic/xlp/setup.c
index 76a7131..e8938b7 100644
--- a/arch/mips/netlogic/xlp/setup.c
+++ b/arch/mips/netlogic/xlp/setup.c
@@ -97,9 +97,6 @@ void __init plat_mem_setup(void)
        _machine_halt   = nlm_linux_exit;
        pm_power_off    = nlm_linux_exit;
 
-       /* memory and bootargs from DT */
-       early_init_devtree(initial_boot_params);
-
        if (boot_mem_map.nr_map == 0) {
                pr_info("Using DRAM BARs for memory map.\n");
                xlp_init_mem_from_bars();

<Prev in Thread] Current Thread [Next in Thread>
  • Fwd: Re: Build breakage in latest -next, Ralf Baechle <=