Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp403213ybv; Thu, 13 Feb 2020 02:41:12 -0800 (PST) X-Google-Smtp-Source: APXvYqx/mXqO28oHZAwgflXx4BBEhRC31il7arfgXPvwpkZWPi48lVKkE1wttB9zqELT6WhuQ9+m X-Received: by 2002:aca:fd94:: with SMTP id b142mr2357968oii.11.1581590472354; Thu, 13 Feb 2020 02:41:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581590472; cv=none; d=google.com; s=arc-20160816; b=w8hF1mI2KtHEsDZmjIgbVZpZgb9fs1aAf8t/PMZyktyIFQEunk8C/ZqcfkI6hwQ3zV M+sRFI9yIHdRtiD+LfmOXu3ifkPMxdCcPa3x6Za5H3cEAschf0p/cDa0EG9ffH9XQCh8 UjAdCiAbU2yoYoqy79svfkuzuqqPGmvHW83FUGorH0MwYJSWJn28TrJH0ewIHT4gCJz4 izZo59K+uVEwFKDyqkzoCM9xCytz+T/EfX83yxBefTnR51Y859brYKAh6WkrvZ84OG+n luLjp8qhaZEu9mbdMljMptDKdwn0oydl+mMP2iCyfBzctYmT+UJZJHRmcQ1CepIZGKZe HNTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=KX/Bf+44urcJ+M7SRbj0cLc9DnYSDfuYYz2j2RUtDIo=; b=bnY7eZ/IvcDzW8TFX/5Hlw697VkLQCB5lpVhk91eHh0QtcpjiSThh6lR5ijBmyJTcK w/i2bYgaB8YWKqat7aTSvOTpyzEvLdF22hBRDrycoDgRHGBGd/M3wjmHk4ePsu2VO8T/ Jkm3aP/uktgkNXv3uEUhsDHzivD8Za2WxmGlg1Zx/fFM0Xct3Ry66hYupPJYPbDWKC4C SJ1YlOyb6fgNEI+zQvFl9GprntnO7VPqa+gzPciVLnwlAKXKV3sOiGqezhQNI/nIa8TQ k42eBepHXErvCwXRMAkhLgjVzSpFeAOgiTVM1XLeNQUeLXRTug5jDqvrE13QdbcNReGW 698A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=sZorrvgN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 24si858386oip.248.2020.02.13.02.40.59; Thu, 13 Feb 2020 02:41:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=sZorrvgN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729572AbgBMKkZ (ORCPT + 99 others); Thu, 13 Feb 2020 05:40:25 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:16332 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729428AbgBMKkY (ORCPT ); Thu, 13 Feb 2020 05:40:24 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 48JChP5r4pz9vCQf; Thu, 13 Feb 2020 11:40:21 +0100 (CET) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=sZorrvgN; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id eq5fshwkQBVW; Thu, 13 Feb 2020 11:40:21 +0100 (CET) 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 48JChP4myJz9vCQZ; Thu, 13 Feb 2020 11:40:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1581590421; bh=KX/Bf+44urcJ+M7SRbj0cLc9DnYSDfuYYz2j2RUtDIo=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=sZorrvgNZs/DTsuS53wt8WvSgGCpj97AGtw1XpGSHVpVxMGjMzmpEBKxu2D4v07OX zVfw60DRealJF3FMpiR4gDj5eDvU9Yi8ivuXuDeG1IU4FxoIfg9u+TgmmioEpVIhge IF44jXccQd+bLWpv4KaEi9/5sZa7uw9YEFMscOZA= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id C9EA58B83E; Thu, 13 Feb 2020 11:40:22 +0100 (CET) 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 N2rjANNu6E0L; Thu, 13 Feb 2020 11:40:22 +0100 (CET) Received: from pc16570vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 369BF8B835; Thu, 13 Feb 2020 11:40:22 +0100 (CET) Subject: Re: [Regression 5.6-rc1][Bisected b6231ea2b3c6] Powerpc 8xx doesn't boot anymore To: Rasmus Villemoes , Li Yang , Qiang Zhao , Greg Kroah-Hartman Cc: "linuxppc-dev@lists.ozlabs.org" , Scott Wood , linux-arm-kernel@lists.infradead.org, LKML References: <0d45fa64-51ee-0052-cb34-58c770c5b3ce@c-s.fr> From: Christophe Leroy Message-ID: Date: Thu, 13 Feb 2020 10:40:21 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/13/2020 07:45 AM, Rasmus Villemoes wrote: > On 12/02/2020 15.24, Christophe Leroy wrote: >> Hi Rasmus, >> >> Kernel 5.6-rc1 silently fails on boot. >> >> I bisected the problem to commit b6231ea2b3c6 ("soc: fsl: qe: drop >> broken lazy call of cpm_muram_init()") >> >> I get a bad_page_fault() for an access at address 8 in >> cpm_muram_alloc_common(), called from cpm_uart_console_setup() via >> cpm_uart_allocbuf() > > Sorry about that. But I'm afraid I don't see what I could have done > differently - the patch series, including b6231ea2b3c6, has been in > -next since 20191210, both you and ppc-dev were cc'ed on the entire > series (last revision sent November 28). And I've been dogfooding the > patches on both arm- and ppc-derived boards ever since (but obviously > only for a few cpus). Yes, this patch series should have ringed a bell in my head, looks like I'm the one who introduced this 4 years ago through commit 4d486e008379 ("soc/fsl/qe: fix Oops on CPM1 (and likely CPM2)") But I had completely forgotten that patch until I did some git blame this morning on this lazy call. > >> Reverting the guilty commit on top of 5.6-rc1 is not trivial. >> >> In your commit text you explain that cpm_muram_init() is called via >> subsys_initcall. But console init is done before that, so it cannot work. > > No, but neither did the code I removed seem to work - how does doing > spin_lock_init on a held spinlock, and then unlocking it, work? Is > everything-spinlock always a no-op in your configuration? And even so, > I'd think a GFP_KERNEL allocation under spin_lock_irqsave() would > trigger some splat somewhere? > > Please note I'm not claiming my patch is not at fault, it clearly is, I > just want to try to understand how I could have been wrong about the > "nobody can have been relying on it" part. > It seems spin_lock_init() does just nothing. spin_lock_irqsave() just disable IRQs and increases preempt_count. spin_lock_irqrestore() restore IRQ state, decreace preempt_count and call preempt_schedule if preempt_count reaches 0. Maybe with some debugging options like DEBUG_ATOMIC_SLEEP could detect it ? >> Do you have a fix for that ? > > Not right now, but I'll have a look. It's true that the patch probably > doesn't revert cleanly, but it shouldn't be hard to add back those few > lines in the appropriate spot, with a big fat comment that this does > something very fishy (at least as a temporary measure if we don't find a > proper solution soonish). > Thanks Christophe