Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp802979iog; Wed, 15 Jun 2022 12:41:31 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sIG0aAGNcksBzC3jFfHhguNqy+e+6FN/UOpRjrc8OAclbNfTteGsfM6PkEk4yS/+qW2YOu X-Received: by 2002:a17:906:6d98:b0:715:76eb:9e33 with SMTP id h24-20020a1709066d9800b0071576eb9e33mr1201872ejt.729.1655322090805; Wed, 15 Jun 2022 12:41:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655322090; cv=none; d=google.com; s=arc-20160816; b=NVN0BBdfnd+rifs7Ec4+7fZedocK55GX3A2z/uk9u/oUnacNgOFAfaOm8b9R3eIG1r h0vDcYfQUy9BNX9Ls5xsgwZvVlqfw7GYVnhb86Ux8UgaZRMYPtUvCe2EdFit0hI1VwKJ GDSEGxWduUCQo6tqElDJiSoTICUYTp6/evjhBVRPOSdr4m+B3/UobaQldfBe+1w5+upa 5hrlLQ3JW9mnzKBmPpTfcn9PfObFy/8qjJelYaxMB0fMTCSPz1MrF+NuABe68VXN5Zop gvMVlh/GhnYJw68iumStAgJFPWunon5mbixCqlwHV9Qnh4zZfIJ5dmmlABVeXRM3HZus RTVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=+7ap878U9WJiqZiLJtB8+WDoIVBGF2CyyeANmhqBwmc=; b=O+kOBihkraR9IAj5Hyk/FZ816ghrJkLPgdkjnlW7IPl6KDdksDA7063gnV035bU4oB q3/MvfUVeC7ZG76hk8nKr8n+n0YfAqHUItQTSbFV0NdRe3iL6SiIfXazuaj2yd6toA03 BRwM6rqYFSk5rb8O+Bedw15oaODNmFpcScIdB42oBiSE/KP6qm1kgKc4zx+NcR0AcnMS OVO0TbUCgKEO9Gdo+Ikp7LifsCUCGJywU2hyGrPXLVJ8N9lG4kd6fdJ5FhtRbGpqFY4v 7DjFJ4KM2OZQOZRNvVjm526Dh267nUE9xqOZDIiZZg8kRhy93wfioPFr292wy+HvoOVm nz+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KtA+QsE4; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m7-20020a056402510700b0042aa9beb66dsi40516edd.417.2022.06.15.12.41.05; Wed, 15 Jun 2022 12:41:30 -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; dkim=pass header.i=@linaro.org header.s=google header.b=KtA+QsE4; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346230AbiFOT0Z (ORCPT + 99 others); Wed, 15 Jun 2022 15:26:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345719AbiFOT0X (ORCPT ); Wed, 15 Jun 2022 15:26:23 -0400 Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3508846651 for ; Wed, 15 Jun 2022 12:26:22 -0700 (PDT) Received: by mail-yb1-xb31.google.com with SMTP id t1so22272985ybd.2 for ; Wed, 15 Jun 2022 12:26:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+7ap878U9WJiqZiLJtB8+WDoIVBGF2CyyeANmhqBwmc=; b=KtA+QsE4mywVenk5Gy1ER0/poJuM4+WHV2wmlEIamfsUNz3E2CsoWt3w0Iyctc7xJZ x7KBpuIuC1qg7FsAwX7Vhwx6S5DExH4A8OQn4MVmzx5fD4HUKu+tt/AYxmc1pYXf0dHo F+kMNtE3HrY3F+iYbkNSP6exnXcLXMXDKgqkk5X44eFrGHqgney3cPXC6Ax9vnHi756j t+E076K7D4yVrNA155k1K3Ke/v7Mb90yeD3jbz0rGTDAFDZZwJxmRjCY5TbEoYqU5UKe RLt4TRmayzVNLcEll4soeaPO2Y7Iqy7HMbxYAdBL5sawr/b4CEjnlsjf43KZcI0Pukyb Yg4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+7ap878U9WJiqZiLJtB8+WDoIVBGF2CyyeANmhqBwmc=; b=c9p84IWoJfCS474p+QL75pjzl3EbK+aQlqFexRuvbx4o939QXuREa1P0abFkgco/AH bxaX7nHpO34PIJ5Qt4BK2zONjwxf3StiJMsbgfX0oa8TnRKvzSyCYa4FObuUmNdfMazF KYZoKn0l+OGcii1hiKE4fyk036Ee2H8vCWNqwvBpeICF3YbvYhyG4Wr7B9ENLyX0y0bJ tfUgmpZdssFN9sSvhRZPIjX8bYhumOcIoeq+K4oDpnnkfSLSR+33L1sHHmfQsaJkqwAD 5YY1/afl9y+VRk0qrcvWbHE/F9fz8Gl+LPUbeWOxzjiT0WpXpEYyno2+arqax0DlDFKJ 1W0Q== X-Gm-Message-State: AJIora9Ogw31d+NPvo3/yZlfSqsMr68B8SnXR+f3+itz9/Scp8NR2LT1 gAvruuOwFJaWf7o4HvXV/IFmjnvT9Q60jY94lnTH4w== X-Received: by 2002:a25:b51:0:b0:663:4ff1:d20d with SMTP id 78-20020a250b51000000b006634ff1d20dmr1499507ybl.608.1655321181295; Wed, 15 Jun 2022 12:26:21 -0700 (PDT) MIME-Version: 1.0 References: <20220615052503.6dvtnuq2ai45pmro@vireshk-i7> In-Reply-To: <20220615052503.6dvtnuq2ai45pmro@vireshk-i7> From: Naresh Kamboju Date: Thu, 16 Jun 2022 00:56:10 +0530 Message-ID: Subject: Re: [next] arm64: db410c: WARNING: CPU: 0 PID: 1 at drivers/opp/core.c:2265 dev_pm_opp_clear_config+0x174/0x17c To: Viresh Kumar Cc: open list , Linux-Next Mailing List , regressions@lists.linux.dev, "Rafael J. Wysocki" , Linux PM , Bjorn Andersson , Nicolas Dechesne Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Hi Viresh, On Wed, 15 Jun 2022 at 10:55, Viresh Kumar wrote: > > On 15-06-22, 02:49, Naresh Kamboju wrote: > > Following kernel crash reported while booting arm64 db410c board with > > Linux next-20220614 [1] kfence enabled on this kernel. > > > > Reported-by: Linux Kernel Functional Testing > > > > Boot log: > > --------- > > [ 0.850420] WARNING: CPU: 0 PID: 1 at drivers/opp/core.c:2265 > > A print like this normally comes when we hit a WARN or something. > > Here is the line 2265 from above tag > > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/opp/core.c?h=next-20220614#n2265 > > which doesn't have any such WARNs there. I wonder where exactly we hit the WARN > here and why it isn't showing up properly. > > > dev_pm_opp_clear_config+0x174/0x17c > > [ 0.850447] Modules linked in: > > [ 0.850459] CPU: 0 PID: 1 Comm: swapper/0 Not tainted > > 5.19.0-rc1-next-20220610 #1 > > [ 0.850470] Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT) > > [ 0.850477] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) > > [ 0.850489] pc : dev_pm_opp_clear_config+0x174/0x17c > > [ 0.850501] lr : dt_cpufreq_probe+0x1e4/0x4a0 > > [ 0.850513] sp : ffff80000802bb00 > > [ 0.850518] x29: ffff80000802bb00 x28: ffff80000ada1c30 x27: 0000000000000000 > > [ 0.850538] x26: 00000000fffffdfb x25: ffff00000311f410 x24: ffff00000389ec90 > > [ 0.850557] x23: ffff80000a9eea98 x22: ffff80000a9eed00 x21: ffff80000ada1b68 > > [ 0.850576] x20: ffff00000389ec80 x19: ffff00003fc41308 x18: ffffffffffffffff > > [ 0.850595] x17: ffff800009f21700 x16: ffff8000080955c0 x15: ffff0000031c2a1c > > [ 0.850614] x14: 0000000000000001 x13: 0a6b636f6c632064 x12: 6e69662074276e64 > > [ 0.850632] x11: 0000000000000040 x10: 0000000000000020 x9 : ffff800009006964 > > [ 0.850650] x8 : 0000000000000020 x7 : ffffffffffffffff x6 : 0000000000000000 > > [ 0.850668] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000000 > > [ 0.850686] x2 : 0000000000000004 x1 : 0000000000000000 x0 : 0000000000000000 > > [ 0.850704] Call trace: > > [ 0.850708] dev_pm_opp_clear_config+0x174/0x17c > > [ 0.850722] platform_probe+0x74/0xf0 > > Nevertheless, I see one place from where such a WARN can be hit, which can be > fixed with: > > diff --git a/drivers/opp/core.c b/drivers/opp/core.c > index 58eae9de4b91..c3d4058d33fc 100644 > --- a/drivers/opp/core.c > +++ b/drivers/opp/core.c > @@ -2437,7 +2437,7 @@ EXPORT_SYMBOL_GPL(dev_pm_opp_set_config); > */ > void dev_pm_opp_clear_config(struct opp_table *opp_table) > { > - if (WARN_ON(!opp_table)) > + if (!opp_table) > return; > > _opp_detach_genpd(opp_table); > > Not sure it fixes the issue you reported here though. > > Can you run the tests for my branch once, it has the updated fix as well. As per your suggestion, I have tested [1] this tree and branch and it worked. The reported kernel warning has been fixed. Thank you. Tested-by: Linux Kernel Functional Testing > > git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git opp/linux-next > > -- > viresh [1] https://lkft.validation.linaro.org/scheduler/job/5179605 -- Linaro LKFT https://lkft.linaro.org