Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754773AbdCINVH (ORCPT ); Thu, 9 Mar 2017 08:21:07 -0500 Received: from bh-25.webhostbox.net ([208.91.199.152]:54236 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754086AbdCINVE (ORCPT ); Thu, 9 Mar 2017 08:21:04 -0500 Subject: Re: nios2 crash/hang in mainline due to 'lib: update LZ4 compressor module' To: Tobias Klauser References: <20170226210338.GA19476@roeck-us.net> <20170228155331.GC27998@distanz.ch> <58B5B934.5040807@codesourcery.com> <20170228181413.GC13455@roeck-us.net> <20170301185817.GA13543@bierbaron.springfield.local> <20170301194520.GA20160@roeck-us.net> <20170302163813.GE27998@distanz.ch> <1ad19c21-6f6e-4516-7df5-d3536df9f4ee@roeck-us.net> <20170307124609.GF27998@distanz.ch> Cc: Sven Schmidt <4sschmid@informatik.uni-hamburg.de>, Sandra Loosemore , Arnd Bergmann , Andrew Morton , linux-kernel@vger.kernel.org, Ley Foon Tan , nios2-dev@lists.rocketboards.org From: Guenter Roeck Message-ID: <4f4fe40b-1e2e-f0b9-37bc-4743fded439d@roeck-us.net> Date: Thu, 9 Mar 2017 05:20:51 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20170307124609.GF27998@distanz.ch> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated_sender: linux@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: linux@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: linux@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1087 Lines: 27 On 03/07/2017 04:46 AM, Tobias Klauser wrote: [ ... ] > > Linux version 4.11.0-rc1-dirty (tobiask@ziws08) (gcc version 7.0.1 20170226 (experimental) (GCC) ) #46 Tue Mar 7 13:40:53 CET 2017 > bootconsole [early0] enabled > Early console on uart16650 initialized at 0xf8001600 > OF: fdt: Error -11 processing FDT > Kernel panic - not syncing: setup_cpuinfo: No CPU found in devicetree! > > ---[ end Kernel panic - not syncing: setup_cpuinfo: No CPU found in devicetree! > > Looks like the in-memory device tree somehow gets corrupted. Not sure > yet why and how this is linked to the Kconfig options selected but at > least we now have a possibility to use debug messages earlier on. > I think I found the problem. In unflatten_and_copy_device_tree(), with added debug information: OF: fdt: initial_boot_params=c861e400, dt=c861f000 size=28874 (0x70ca) ... and then initial_boot_params is copied to dt, which results in corrupted fdt since the memory overlaps. Looks like the initial_boot_params memory is not reserved and (re-)allocated by early_init_dt_alloc_memory_arch(). Guenter