Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2768155rda; Wed, 25 Oct 2023 11:41:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF0Em0tt/zikAXwYKz4lchDR/6qiyJSTCpZWlFLQR1ZVFHpECJKTghTrtCbS/tWCZ22muOK X-Received: by 2002:a05:690c:dcd:b0:59f:69ab:22f2 with SMTP id db13-20020a05690c0dcd00b0059f69ab22f2mr18739589ywb.40.1698259278128; Wed, 25 Oct 2023 11:41:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698259278; cv=none; d=google.com; s=arc-20160816; b=UO2MJE6bmJ8UeCj9hqoBZwPxxjVbS535Ul3Qrp7VcZBmgpbVhc5LfVguH8wL9LyX+k TSTHAEZpiYa1qC4F2Lb/gGOEbzdfPQMaRNs0o8ARWs7nycjNaw5Hz9JFS8+gGH4QHmOw qtZEIDsD50m4NBT9n+LS6zAc1V/QTQv/Zq7BSmTiPVvN6x1J1MP3sZ10fe5E5epeP8sb dOn08LAbBEeEm7r7or4HsMBO4vuyR8npTY0hfSPj96orVdg2T0+4eGqfGJzUraykqVw5 ZhjY5xPHQyijm8dUMUUqng4d7hZo8cSNZxdOkuwy60ESxXOjPcgmxOH/D7E/JR25iIwp KErQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:sender:dkim-signature; bh=i/57dGnw0hmLxzIRIxELl5cyuqqUZrzWlBe94Hmzyj0=; fh=oUqv02eGRsA8oGd5Iv3J0fXz3s3m4MobnGBYAqLgUpw=; b=VoeSbnqC6eMKvwC2LHyWjEQ/zxJJPy5LtAdoUI15rDIJ90CS2luDc3TL4id2ce6T3w dCVuBfY/yO7F/l4/SBP4/tkv4138RSieJgdgJd/WZWEpgXI3kbun6LkSeVQYxmBWYQ3/ VIaVDCQXnqmFulpiikNTRpcROVzC/dNnXUEWqC5ep/dqsMAQsoQNIDVCJOQFUya+NOO7 pM4sxoC13BCvAGCW5lICmF5ON4806KpQoZkA5HFJ335Xqq1HCAcNtAW5ZOF6bZl5UsKm UcbjLUgCFeq8T7wavlv24fobG1hal0jQBAgz5jtnrTH5ZBkYUoXaXdcC6nWQwBQeYY+P pRPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=cGOWcMPM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id d140-20020a0ddb92000000b005a7bfed398fsi11299925ywe.48.2023.10.25.11.41.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 11:41:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=cGOWcMPM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 9F03980490A8; Wed, 25 Oct 2023 11:41:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234854AbjJYSkX (ORCPT + 99 others); Wed, 25 Oct 2023 14:40:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235068AbjJYSkK (ORCPT ); Wed, 25 Oct 2023 14:40:10 -0400 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18E3C1B5; Wed, 25 Oct 2023 11:39:42 -0700 (PDT) Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1c9d407bb15so40865ad.0; Wed, 25 Oct 2023 11:39:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698259181; x=1698863981; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:sender :from:to:cc:subject:date:message-id:reply-to; bh=i/57dGnw0hmLxzIRIxELl5cyuqqUZrzWlBe94Hmzyj0=; b=cGOWcMPMZINR93HyzJzqCQtxG6tAfy+8Wnm3tJyafC2M2BhLp4FhKiouPD79TVBPE+ Vx5fKIsl1fwiZVGQ3sWu75s+YV+jI3KimFQrhGjGYYQ0LhPPIIIkApW+CWHNuGuGcHgp cP0sKoWZCKn5a81Jckzv72D3KKiZwsXhmHNDha6L0nhyjkPFLMT8GEXOSLHIuAIhvAJY jrb32jow3buVMpnppVglhmcgoSqCqPhM10nJsoqVOH4RYxHT3RflL8Hm8GLImm4ZFoFD y3eob0rsM6SKXJCbBmzH4F7X20uk5sg8rcFrMD+/mKlg7tk+ZFIhvHWgc2DFVhqrcwdo Ay/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698259181; x=1698863981; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=i/57dGnw0hmLxzIRIxELl5cyuqqUZrzWlBe94Hmzyj0=; b=uirKhd5l0t0Yf7quNPJ/6+8IV+k346SB9UQHVfaxC+HpIlOYk8toneL2u1vW8V2ILV jdekYRfR3hLV+ak1n/HTIi8MFYlNM11YuEVaobwe1rxIINZBntokeX3kS3RRRBWTg8nW DT3+O0qsSPAQCPYXbm6T3X/pkhokuida19hMajoHKBJZXOGGhz7xa7QyLeOsMxLIs/lJ DO5eMnv+BCxru/fYxjDg1BtTxkX+b8uO3hZyEBSJ3m+3IpBshrqY/ICv3spTHNCvkdls DY33cD5WFlLZWrBPJniUj3VUBD0Rq7ecdDejrdA6le3jL0fkmhZDqq0+7oG73uFabgeH F8Sw== X-Gm-Message-State: AOJu0YxcKtEdYIIl4HdaTo1bAtttbxHaI52YKFZXxTJgD7LlHOFZkiVZ HDM/2yPtZD+qbeS+dVnAEkc= X-Received: by 2002:a17:902:bf4b:b0:1c9:b338:8073 with SMTP id u11-20020a170902bf4b00b001c9b3388073mr14245811pls.15.1698259181123; Wed, 25 Oct 2023 11:39:41 -0700 (PDT) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id q9-20020a170902dac900b001b9c960ffeasm9482408plx.47.2023.10.25.11.39.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Oct 2023 11:39:40 -0700 (PDT) Sender: Guenter Roeck Message-ID: <7d7a5a15-3349-adce-02cd-82b6cb4bebde@roeck-us.net> Date: Wed, 25 Oct 2023 11:39:38 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Content-Language: en-US To: Geert Uytterhoeven , Pavel Machek , Wolfram Sang , Ulf Hansson Cc: Greg Kroah-Hartman , niklas.soderlund+renesas@ragnatech.se, yoshihiro.shimoda.uh@renesas.com, biju.das.jz@bp.renesas.com, Chris.Paterson2@renesas.com, stable@vger.kernel.org, patches@lists.linux.dev, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, akpm@linux-foundation.org, shuah@kernel.org, patches@kernelci.org, lkft-triage@lists.linaro.org, jonathanh@nvidia.com, f.fainelli@gmail.com, sudipm.mukherjee@gmail.com, srw@sladewatkins.net, rwarsow@gmx.de, conor@kernel.org, linux-reneas-soc@vger.kernel.org, Linux MMC List References: <20231009130126.697995596@linuxfoundation.org> <2023101057-runny-pellet-8952@gregkh> From: Guenter Roeck Subject: Re: renesas_sdhi problems in 5.10-stable was Re: [PATCH 5.10 000/226] 5.10.198-rc1 review In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 25 Oct 2023 11:41:02 -0700 (PDT) On 10/25/23 10:05, Geert Uytterhoeven wrote: > On Wed, Oct 25, 2023 at 2:35 PM Geert Uytterhoeven wrote: >> On Wed, Oct 25, 2023 at 12:53 PM Geert Uytterhoeven >> wrote: >>> On Wed, Oct 25, 2023 at 12:47 PM Geert Uytterhoeven >>> wrote: >>>> On Tue, Oct 24, 2023 at 9:22 PM Pavel Machek wrote: >>>>> But we still have failures on Renesas with 5.10.199-rc2: >>>>> >>>>> https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/pipelines/1047368849 >>>>> >>>>> And they still happed during MMC init: >>>>> >>>>> 2.638013] renesas_sdhi_internal_dmac ee100000.mmc: Got CD GPIO >>>>> [ 2.638846] INFO: trying to register non-static key. >>>>> [ 2.644192] ledtrig-cpu: registered to indicate activity on CPUs >>>>> [ 2.649066] The code is fine but needs lockdep annotation, or maybe >>>>> [ 2.649069] you didn't initialize this object before use? >>>>> [ 2.649071] turning off the locking correctness validator. >>>>> [ 2.649080] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.10.199-rc2-arm64-renesas-ge31b6513c43d #1 >>>>> [ 2.649082] Hardware name: HopeRun HiHope RZ/G2M with sub board (DT) >>>>> [ 2.649086] Call trace: >>>>> [ 2.655106] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping .... >>>>> [ 2.661354] dump_backtrace+0x0/0x194 >>>>> [ 2.661361] show_stack+0x14/0x20 >>>>> [ 2.667430] usbcore: registered new interface driver usbhid >>>>> [ 2.672230] dump_stack+0xe8/0x130 >>>>> [ 2.672238] register_lock_class+0x480/0x514 >>>>> [ 2.672244] __lock_acquire+0x74/0x20ec >>>>> [ 2.681113] usbhid: USB HID core driver >>>>> [ 2.687450] lock_acquire+0x218/0x350 >>>>> [ 2.687456] _raw_spin_lock+0x58/0x80 >>>>> [ 2.687464] tmio_mmc_irq+0x410/0x9ac >>>>> [ 2.688556] renesas_sdhi_internal_dmac ee160000.mmc: mmc0 base at 0x00000000ee160000, max clock rate 200 MHz >>>>> [ 2.744936] __handle_irq_event_percpu+0xbc/0x340 >>>>> [ 2.749635] handle_irq_event+0x60/0x100 >>>>> [ 2.753553] handle_fasteoi_irq+0xa0/0x1ec >>>>> [ 2.757644] __handle_domain_irq+0x7c/0xdc >>>>> [ 2.761736] efi_header_end+0x4c/0xd0 >>>>> [ 2.765393] el1_irq+0xcc/0x180 >>>>> [ 2.768530] arch_cpu_idle+0x14/0x2c >>>>> [ 2.772100] default_idle_call+0x58/0xe4 >>>>> [ 2.776019] do_idle+0x244/0x2c0 >>>>> [ 2.779242] cpu_startup_entry+0x20/0x6c >>>>> [ 2.783160] rest_init+0x164/0x28c >>>>> [ 2.786561] arch_call_rest_init+0xc/0x14 >>>>> [ 2.790565] start_kernel+0x4c4/0x4f8 >>>>> [ 2.794233] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000014 >>>>> [ 2.803011] Mem abort info: >>>>> >>>>> from https://lava.ciplatform.org/scheduler/job/1025535 >>>>> from >>>>> https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/jobs/5360973735 . >>>>> >>>>> Is there something else missing? >>>> >>>> I don't have a HopeRun HiHope RZ/G2M, but both v5.10.198 and v5.10.199 >>>> seem to work fine on Salvator-XS with R-Car H3 ES2.0 and Salvator-X >>>> with R-Car M3-W ES1.0, using a config based on latest renesas_defconfig. >>> >>> Sorry, I looked at the wrong log on R-Car M3-W. >>> I do see the issue with v5.10.198, but not with v5.10.199. >> >> It seems to be an intermittent issue. Investigating... > > After spending too much time on bisecting, the bad guy turns out to > be commit 6d3745bbc3341d3b ("mmc: renesas_sdhi: register irqs before > registering controller") in v5.10.198. > > Adding debug information shows the lock is mmc_host.lock. > > It is definitely initialized: > > renesas_sdhi_probe() > { > ... > tmio_mmc_host_alloc() > mmc_alloc_host > spin_lock_init(&host->lock); > ... > devm_request_irq() > -> tmio_mmc_irq > tmio_mmc_cmd_irq() > spin_lock(&host->lock); > ... > } > > That leaves us with a missing lockdep annotation? > Is it possible that the lock initialization is overwritten ? I seem to recall a recent case where this happens. Also, there is spin_lock_init(&_host->lock); in tmio_mmc_host_probe(), and tmio_mmc_host_probe() is called after devm_request_irq(). Also, how would lockdep annotation help with "Unable to handle kernel NULL pointer dereference at virtual address 0000000000000014" in the log above ? Guenter