From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753171AbbJOMNj (ORCPT ); Thu, 15 Oct 2015 08:13:39 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:49987 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752483AbbJOMNh (ORCPT ); Thu, 15 Oct 2015 08:13:37 -0400 From: Arnd Bergmann To: Huan Wang Cc: "linux-arm-kernel@lists.infradead.org" , Jin Jason , Russell King - ARM Linux , Fabio Estevam , "linux-kernel@vger.kernel.org" , "shawnguo@kernel.org" Subject: Re: [PATCH v4] ARM: configs: Add Freescale LS1021A defconfig Date: Thu, 15 Oct 2015 14:12:57 +0200 Message-ID: <5073362.oArWDzYkxD@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: <1442480614-32345-1-git-send-email-b18965@freescale.com> <5232654.e6dagm53H4@wuerfel> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:MApEmyuiB0NiDScgoDFEPjo296IukYTpDgCUob50Wq0pLptWbts YL1tyLO+bmV1j4afbME8g+PECBOBv2pNtE0U8GIReRX+UgwGZ0zDN0JCn3PiqstLPlbrka4 Q1dFlA0E8bo76GCXBQX9/TSyDITelpLZUabyfgf4vnFJwhYpWyWsTlgRzeRfSN4aNcPQcfj 5f93N+lwFGxiY1mu+IAwg== X-UI-Out-Filterresults: notjunk:1;V01:K0:ClcC9Zb6JXQ=:LGYNl1O/H5J6jH4DiKG9Gk wXMIEJWvtiSkmT+MmTotzZbLIEsPhUywCAikBMqHjF0U+EguGFABPsHGw65DKBFWwBk518Fs1 Xjdta5LWFWtC+gtESH/Uuiy6PShzbMHaBDlb91JQx1rQr8DfOsRaMw3CvFjHi6pWsJcuA8H0i 3yo2TmLp+AKw/r94drlxk81+DGtyFTQse7fgqnVBuCQT1650MhdOG6B6GEbybiwUuHUzvCz9j +hXU23rTgcRKD330bEMbd/sUHJzu1cA39hkxr14GvtyHeom8txZujGav60Zu9MaxyiFIDbALA xX7yOi8LBqgNrJu10YYc7D1cEyol3fkxNMNP3+5ZTVcjIkZzw2EbIwO0Ut+m3Z1nkLbUI9y+6 vY+w4yl1R4nhj0GXVjmwZd+PPUzxX+AbeKpnLACzRFkySPmXeQ7UwWCHz45p4tVWJkQB1LIAx AbWATq8PyA5+zoNmNDUQ1xKurqXSwXcLpAGciZPN7YksJU175n6KZ3xvqF/E1z2J842vHK2p9 MkYQdwjbpWrU8GqEyGUMQ/NJtk0cFZmmyhaSOr7+sPKWIrjjbNUWDa5E/gUd0fVuRSXQUDI7S PE0F87JrYDhzDjqP4HGPrj4mMkxBAoQ1oBcbOZQSF9Zj+OFZEiSiu72s5MpZW4YKfApb7jyua iDc8HSRHD2tC/2l4MiGK9X5EwrUJK9xtxDajhH414oULD00LgAmViVojUBMiJ7BmPK47Dsdef RZeLNhMmiccgG/8L Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 15 October 2015 02:11:57 Huan Wang wrote: > > On Wednesday 14 October 2015 10:18:47 Huan Wang wrote: > > > > On Thursday 24 September 2015 07:27:10 Huan Wang wrote: > > > > > > On Fri, Sep 18, 2015 at 4:38 AM, Huan Wang wrote: > > > > > Any suggestion? Thanks. > > > > > > > > Try enabling DEBUG_LL for your platform to get some debug output, if > > > > you still don't get any helpful messages, try also inserting > > > > > > > > printascii(__func__); > > > > > > > > statements in the early boot process to see how far you get before the hang. > > > > > > > [Alison Wang] ls1021a uses duart as the default serial port, not lpuart. So > 8250/16550 serial driver is used. Let me explain my debug process in detail. Ah, I see. > When CONFIG_VMSPLIT_2G is used, I could boot up the whole kernel and get the > print message " Booting Linux on physical CPU 0xf00" after "Starting kernel" > as below. > > Starting kernel ... > [ 0.000000] Booting Linux on physical CPU 0xf00 > ..... > > But when CONFIG_VMSPLIT_3G is used, I couldn't get print message " Booting Linux > on physical CPU 0xf00". It only hangs at "Starting kernel ...". > > Moreover, I add some asm code in __turn_mmu_on to print some simple characters, and > I could get the print characters when CONFIG_VMSPLIT_3G is used. So I guess there > is something wrong with the page tables. Ok. What I was suggesting above though was to try to pinpoint exactly where it goes wrong. You have verified that it does not crash before the page tables are enabled, but that is very early. You have also shown that the kernel crashes before the point at which the 'Booting Linux on physical CPU 0xf00' message is printed to the kernel, but that is *much* later: setup_arch() calls parse_early_param(), which in turn sets up early_console_write(). This means the 'Booting Linux on physical CPU 0xf00' is still stuck in the log buffer and you may have crashed someone inbetween. If you can call printascii(), you can try to do that just after enabling the page tables to see if that was the problem like you suspect, or otherwise add more printascii() statements between __turn_mmu_on and parse_early_param() to pinpoint the exact code that breaks. Arnd