Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1561633iog; Tue, 14 Jun 2022 08:26:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxW/tGRv/XpnrAFpXBMG9le4eR8OGZzAbne+GGzAoAGZDuuxMluQqtnetNOIcepwWawQf8b X-Received: by 2002:a63:1b26:0:b0:3fd:8db8:9602 with SMTP id b38-20020a631b26000000b003fd8db89602mr5038187pgb.239.1655220381641; Tue, 14 Jun 2022 08:26:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655220381; cv=none; d=google.com; s=arc-20160816; b=Umf3vAali4cI3wh+Fw2fTyGM/dDeuVsR69ucqIyxjXWPPuZZ86dgQTS5Lqbkq1913i uyic/DMVGxp1PrSrcSmxV69jZu3lriqIwb5qhqdaIK/2gGnFkQs+TCafgGIuJzoVYdVM Aqn2Swqk5Dx6/CFWLovXCq6riXImpMVwBqMJR0yoYiHDyPHTKBqnn4amYxJow/iGQHNH 1Sq67R0r4Lu/Su6Nh4UXuw/Zx15KHOSqfTHzb8HZmoZ7SbhLcmdhwmUfN5yJUSGQ/Ebj sboOet3mL0B5GBJBDtM1d0/k+8GjhI9xtJzoVeuBiRNs7Tk12IrttuTuRPeytlImFd6E 42qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:to:from:date; bh=AmgbZfBvcAgDs9qWoCrjbxBIg7ej8RcnXPEmWBUHwHk=; b=PEyEyWr1YY1fo1NOwUp9Wex034wqYvmRVKL6EBZvATc/aqhkYAOcUffc2ZZEjX4/a/ vLTeU7YVWOHyDQkQrSA3ODTdbq/6ZhmSs0cVzZyLFk/03o34/lEzYh/B9nsPJoQck/7g +gcQFuwalNN6t8GB0RiOTaB+8i2m00cPRC4SDE3ubAA/1N3s3VxXsJ5OEx7xAGndX2s1 O7jvwbCkRuVDrpQqlp3ngt+hbv0aSgiiwnuYEZVyPAfOhyt1QThJMfo0gQLf4l4Hyxmi atk9HZ9vGUlf1qUCdsRpSViMPsd8BP4DyTcAGD1K1RuYkVtO0IUZQrvFZxmSreJdMLHv 8AdA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e17-20020a17090a4a1100b001e2d210b8ecsi12412670pjh.188.2022.06.14.08.26.08; Tue, 14 Jun 2022 08:26:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343909AbiFNOxz (ORCPT + 99 others); Tue, 14 Jun 2022 10:53:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344821AbiFNOxg (ORCPT ); Tue, 14 Jun 2022 10:53:36 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id F0D822124B; Tue, 14 Jun 2022 07:53:34 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 94CA71650; Tue, 14 Jun 2022 07:53:34 -0700 (PDT) Received: from monolith.localdoman (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2D4D43F66F; Tue, 14 Jun 2022 07:53:31 -0700 (PDT) Date: Tue, 14 Jun 2022 15:53:53 +0100 From: Alexandru Elisei To: sunjunchao2870@gmail.com, jack@suse.cz, viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, pmladek@suse.com, senozhatsky@chromium.org, rostedt@goodmis.org, john.ogness@linutronix.de, keescook@chromium.org, anton@enomsg.org, ccross@android.com, tony.luck@intel.com, heiko@sntech.de, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, maco@android.com, hch@lst.de, gregkh@linuxfoundation.org, jirislaby@kernel.org, suzuki.poulose@arm.com Subject: Re: [BUG] rockpro64 board hangs in console_init() after commit 10e14073107d Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org (+Suzuki) Hi, I was able to boot the board after applying this patch from Suzuki [1]. [1] https://lore.kernel.org/all/20220614124618.2830569-1-suzuki.poulose@arm.com/ Thanks, Alex On Mon, Jun 13, 2022 at 05:54:35PM +0100, Alexandru Elisei wrote: > Hi, > > (Apologies for the long To: list, I've added everyone that > scripts/get_maintainer.pl listed for fs/{fs-writeback,inode}.c, for the > rockchip boards, for printk.c and for the tty layer) > > When booting a kernel built from tag v5.19-rc2, my rockpro64-v2 hangs at > boot with this log: > > [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034] > [ 0.000000] Linux version 5.19.0-rc2 (alex@redacted) (aarch64-linux-gnu-gcc (GCC) 12.1.0, GNU ld (GNU Binutils) 2.38) #90 SMP PREEMPT Mon Jun 13 17:13:12 BST 2022 > [ 0.000000] Machine model: Pine64 RockPro64 v2.0 > [ 0.000000] efi: UEFI not found. > [ 0.000000] earlycon: uart0 at MMIO32 0x00000000ff1a0000 (options '1500000n8') > [ 0.000000] printk: bootconsole [uart0] enabled > [ 0.000000] NUMA: No NUMA configuration found > [ 0.000000] NUMA: Faking a node at [mem 0x0000000000200000-0x00000000f7ffffff] > [ 0.000000] NUMA: NODE_DATA [mem 0xf77dc140-0xf77ddfff] > [ 0.000000] Zone ranges: > [ 0.000000] DMA [mem 0x0000000000200000-0x00000000f7ffffff] > [ 0.000000] DMA32 empty > [ 0.000000] Normal empty > [ 0.000000] Movable zone start for each node > [ 0.000000] Early memory node ranges > [ 0.000000] node 0: [mem 0x0000000000200000-0x00000000f7ffffff] > [ 0.000000] Initmem setup node 0 [mem 0x0000000000200000-0x00000000f7ffffff] > [ 0.000000] On node 0, zone DMA: 512 pages in unavailable ranges > [ 0.000000] cma: Reserved 32 MiB at 0x00000000f0000000 > [ 0.000000] psci: probing for conduit method from DT. > [ 0.000000] psci: PSCIv1.1 detected in firmware. > [ 0.000000] psci: Using standard PSCI v0.2 function IDs > [ 0.000000] psci: MIGRATE_INFO_TYPE not supported. > [ 0.000000] psci: SMC Calling Convention v1.2 > [ 0.000000] percpu: Embedded 20 pages/cpu s41768 r8192 d31960 u81920 > [ 0.000000] Detected VIPT I-cache on CPU0 > [ 0.000000] CPU features: detected: GIC system register CPU interface > [ 0.000000] CPU features: detected: ARM erratum 845719 > [ 0.000000] Fallback order for Node 0: 0 > [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 999432 > [ 0.000000] Policy zone: DMA > [ 0.000000] Kernel command line: root=PARTUUID=7f4aab92-69d8-47f3-be10-624da40a71f9 rw earlycon rootwait > [ 0.000000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes, linear) > [ 0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes, linear) > [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off > [ 0.000000] Memory: 3915796K/4061184K available (15552K kernel code, 2758K rwdata, 8668K rodata, 6336K init, 564K bss, 112620K reserved, 32768K cma-reserved) > [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=6, Nodes=1 > [ 0.000000] rcu: Preemptible hierarchical RCU implementation. > [ 0.000000] rcu: RCU event tracing is enabled. > [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=6. > [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies. > [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=6 > [ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0 > [ 0.000000] GICv3: GIC: Using split EOI/Deactivate mode > [ 0.000000] GICv3: 256 SPIs implemented > [ 0.000000] GICv3: 0 Extended SPIs implemented > [ 0.000000] Root IRQ handler: gic_handle_irq > [ 0.000000] GICv3: GICv3 features: 16 PPIs > [ 0.000000] GICv3: CPU0: found redistributor 0 region 0:0x00000000fef00000 > [ 0.000000] ITS [mem 0xfee20000-0xfee3ffff] > [ 0.000000] ITS@0x00000000fee20000: allocated 65536 Devices @480000 (flat, esz 8, psz 64K, shr 0) > [ 0.000000] ITS: using cache flushing for cmd queue > [ 0.000000] GICv3: using LPI property table @0x0000000000440000 > [ 0.000000] GIC: using cache flushing for LPI property table > [ 0.000000] GICv3: CPU0: using allocated LPI pending table @0x0000000000450000 > [ 0.000000] GICv3: GIC: PPI partition interrupt-partition-0[0] { /cpus/cpu@0[0] /cpus/cpu@1[1] /cpus/cpu@2[2] /cpus/cpu@3[3] } > [ 0.000000] GICv3: GIC: PPI partition interrupt-partition-1[1] { /cpus/cpu@100[4] /cpus/cpu@101[5] } > [ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention. > [ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys). > [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns > [ 0.000001] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns > [ 0.005107] Console: colour dummy device 80x25 > [ 0.005549] printk: console [tty0] enabled > [ 0.005956] printk: bootconsole [uart0] disabled > > Config can be found at [1] (expires after 6 months). I've also built the > kernel with gcc 10.3.1 [2] (aarch64-none-linux-gnu), same issue. > > I've bisected the build failure to commit 10e14073107d ("writeback: Fix > inode->i_io_list not be protected by inode->i_lock error"); I've confirmed > that that commit is responsible by successfully booting the board with a > kernel built from v5.19-rc2 + the above commit reverted. > > I tried to do some investigating, it seems that the kernel is stuck at > printk.c::console_init() -> drivers/tty/vt/vt.c::con_init() -> > printk.c::register_console() -> unregister_console() -> console_lock(). > This has been determined by adding pr_info statements. > > I've booted a kernel compiled with CONFIG_PROVE_LOCKING=y, as the offending > commit fiddles with locks, but no splat was produced that would explain the > hang. I've also tried to boot a v5,19-rc2 kernel on my odroid-c4, the board > is booting just fine, so I'm guessing it only affects of subset of arm64 > boards. > > [1] https://pastebin.com/MfDrKyKd > [2] https://developer.arm.com/downloads/-/gnu-a > > Thanks, > Alex > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel