Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp72623pxy; Tue, 27 Apr 2021 23:09:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7BLK1IEjSmHi4Qb+rUirMASVcuNisgxCoa0QPbTFVrFyy3RGDLjSdC8iDFQe92kOHzRha X-Received: by 2002:a05:6402:270a:: with SMTP id y10mr8902007edd.387.1619590191409; Tue, 27 Apr 2021 23:09:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619590191; cv=none; d=google.com; s=arc-20160816; b=RRTTTcY93A61bjLkbryIc1SuQ4XT4/YNLO+OawlOAx9yROGM5HkFRjoGs9uKpODlwO d5l+ZOnXByST8vin23IVPSXWMqjD/H8CzMSAkz+vnIzhrhUQgy20TWUR1Mw0yYO2YY/i ajtaFBniZUTUSb1L0kogE9ujce3K2cRYUhsRETId5HjepObkyxPXaWnFEBfGh6uR8M+/ TfQ4sQmlzJOpxHsTHugr371/zYYlkgDd4NK+cSRaPEY1B3KsayFOdB9RJoL2S6DPyzE7 u69HedWKQRW/JzEmOfrOI871sOIgz+hvrxLL/YQs3Bq4QTI65tpAcgCIxTE3NNf1OXQW eXzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=uUIcBrvjKY5JrZVlm2e+S0AE6qdnuTR5KHJ0Ma6W89M=; b=gmIIxlenaJiEymc2h34wyxAvc01yJvBHbOtLKj+5DK3w85VA1KWwdlK6WV+UG+5JeJ xfCPv6Ti1XWT9gocbLIeO8PRtQ7VbHk7Ygc4+w5qFAdpEs8bJuA/qnVAItHZMCnu5+CT Hxslf0QcmNkakSgBLdzEhgMl7Cd1Yx/OUY236mrCqO2VVn5XAFl8G3JVJCW3RR9igpRe FzH6bFdsyZvjJc85LdI77i1+Z25LHsK3yacUNsxoFSiXIryZyFMvSxWls9yp4ntGGhjG zlHiCoq25xPR1MXLSdu0jKsoMTPZK35mYzW3p5YW9JpBknNM8mH9c9o3aBoewWVMJS1u 6hHg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n7si4604481edy.165.2021.04.27.23.09.27; Tue, 27 Apr 2021 23:09:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235859AbhD1GJJ (ORCPT + 99 others); Wed, 28 Apr 2021 02:09:09 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:14737 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235869AbhD1GJF (ORCPT ); Wed, 28 Apr 2021 02:09:05 -0400 Received: from localhost (mailhub3.si.c-s.fr [192.168.12.233]) by localhost (Postfix) with ESMTP id 4FVSqQ5srxz9tFg; Wed, 28 Apr 2021 08:08:18 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MhY9mgrBk-PK; Wed, 28 Apr 2021 08:08:18 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 4FVSqQ4w9Lz9tFZ; Wed, 28 Apr 2021 08:08:18 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 8C25D8B799; Wed, 28 Apr 2021 08:08:18 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id 4OQ0zrISaDns; Wed, 28 Apr 2021 08:08:18 +0200 (CEST) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 09DF78B76B; Wed, 28 Apr 2021 08:08:17 +0200 (CEST) Subject: Re: PPC476 hangs during tlb flush after calling /init in crash kernel with linux 5.4+ To: Eddie James , linuxppc-dev@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org, benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au, npiggin@gmail.com, miltonm@us.ibm.com References: <2f7587b1986d597a63169567124438325cbedfd7.camel@linux.ibm.com> From: Christophe Leroy Message-ID: <711a9a60-264b-9b86-6772-6585622a5bd4@csgroup.eu> Date: Wed, 28 Apr 2021 08:08:17 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <2f7587b1986d597a63169567124438325cbedfd7.camel@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 28/04/2021 à 00:42, Eddie James a écrit : > On Tue, 2021-04-27 at 19:26 +0200, Christophe Leroy wrote: >> Hi Eddies, >> >> Le 27/04/2021 à 19:03, Eddie James a écrit : >>> Hi all, >>> >>> I'm having a problem in simulation and hardware where my PPC476 >>> processor stops executing instructions after callling /init. In my >>> case >>> this is a bash script. The code descends to flush the TLB, and >>> somewhere in the loop in _tlbil_pid, the PC goes to >>> InstructionTLBError47x but does not go any further. This only >>> occurs in >>> the crash kernel environment, which is using the same kernel, >>> initramfs, and init script as the main kernel, which executed fine. >>> I >>> do not see this problem with linux 4.19 or 3.10. I do see it with >>> 5.4 >>> and 5.10. I see a fair amount of refactoring in the PPC memory >>> management area between 4.19 and 5.4. Can anyone point me in a >>> direction to debug this further? My stack trace is below as I can >>> run >>> gdb in simulation. >> >> Can you bisect to pin point the culprit commit ? > > Hi, thanks for your prompt reply. > > Good idea! I have bisected to: > > commit 9e849f231c3c72d4c3c1b07c9cd19ae789da0420 (b8-bad, > refs/bisect/bad) > Author: Christophe Leroy > Date: Thu Feb 21 19:08:40 2019 +0000 > > powerpc/mm/32s: use generic mmu_mapin_ram() for all blocks. > > Now that mmu_mapin_ram() is able to handle other blocks > than the one starting at 0, the WII can use it for all > its blocks. > > Signed-off-by: Christophe Leroy > Signed-off-by: Michael Ellerman > > I also confirmed that reverting this commit resolves the issue in 5.4+. > > Now, I don't understand why this is problematic or what is really > happening... Reverting is probably not the desired solution. > Can you provide the 'dmesg' or a dump of the logs printed by the kernel at boottime ? The difference with this commit is that if there are several memblocks, all get mapped. Maybe your target doesn't like it. You are talking about simulation, are you using QEMU ? If yes can you provide details so that I can try and reproduce the issue ? Thanks Christophe