Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp566281pxb; Wed, 8 Sep 2021 07:30:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0Fo7D/lGZ1BrMlRigOpKt0gSZ8JB49lzSgJnLaUVz85txF1tvRUd6p8IaDpIKZxWpNyTF X-Received: by 2002:a05:6e02:12ac:: with SMTP id f12mr147687ilr.50.1631111410410; Wed, 08 Sep 2021 07:30:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631111410; cv=none; d=google.com; s=arc-20160816; b=qNi7KO3+kyUaaogVh/bbNdHCd3kUU7DSh9CClMqVXZCHRzoi+/V+EwWtPSdWPWG7fA zGAbXOLj25yBSP5Cgvn/fCAA/S9Gn4HEty7q/3O/yszhUNMpHrMLgSH3hWvUFn9CJKGF /4qnrEMfX3UHYkUn3HQQO3sFPXLtFZiCUTmG8S691r3L5epUGxYSeV4uORbVcSq4TuEo 8DV3mF5sIFBRsuULZhiWyLmRgw6jF2ePmwdBxywtVFxWshTgx4I4XwD/m5lmp433E6Q/ lrcltA2+TdxEWPNUFbfr/pDBI90/+Xu3/QewvAA8k2C70kiMY+BdrSXCqP9NL4epIpXw ro0Q== 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=9JsbZFov3ICA1qL8d4cvHPqqFkw1nktPj+U8ihCKcfQ=; b=TtYDwWfhqHPfcYmJyOX3dyD5/z7NWrn/0kjCJFEraDfvdBS5kDih9b3dVMJygtAxlU JLbibCDOuR9RdsOA49IBY4rGVMHwJGY/UE4V/7YHHZeauVzvstqZ47NZmHVDQopXYKJC +FQBBw41HpAZtTEzJdmeOHw3NhjLQKnV3JpF/AQAGRWevunnjkwgECwasHOnha9OL6Dc jxnRy9Tt9FY2SZxiiooLvh75Gz3/kJ947pRhz5B6v1mi1bucNFQweVt/TC09bo1OS9Cy 5ibF+x/+1Mp21G5uC3nKeICwLhclHFmxXry1UG/QAHpwqt0zdIHsM+b41VIssS159FqW cElQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=SMbyDKS0; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z9si2619729ile.172.2021.09.08.07.29.57; Wed, 08 Sep 2021 07:30:10 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=SMbyDKS0; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351917AbhIHOaF (ORCPT + 99 others); Wed, 8 Sep 2021 10:30:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233240AbhIHOaF (ORCPT ); Wed, 8 Sep 2021 10:30:05 -0400 Received: from mail-qk1-x735.google.com (mail-qk1-x735.google.com [IPv6:2607:f8b0:4864:20::735]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B89FC061575; Wed, 8 Sep 2021 07:28:57 -0700 (PDT) Received: by mail-qk1-x735.google.com with SMTP id a10so2445231qka.12; Wed, 08 Sep 2021 07:28:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9JsbZFov3ICA1qL8d4cvHPqqFkw1nktPj+U8ihCKcfQ=; b=SMbyDKS0tyCPh3sRgkXSo8sy9lxXBeGPl4CSVFaL53so0tMM65EaAGcsprznttdtJ7 DI+acugQs/siaaFdiwgu/yOt8+EVQ6iuCoabLnNvlQ+9riCa10ZwsnRUH+aB0SDAMZ+H c3RV5hMf8WgTTxNnG+fO7Poxr24lQl83hN3PbhUeHSPCPnDM4YsRpB1qgyRd6UUcEzt8 xS2dG11Dh0INd96NgYDK1ZxyexMpKawTxRIcNp4NK3IuBflG1aj6v5dOW0Trsz1wzl74 Y3Cyc6KsZdJ3bBJoWXVMfFYlFrr9NXg9xR4eBClJMiTu7pG7nBI4ilU7YANFYYCkXnv1 Yv9g== 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=9JsbZFov3ICA1qL8d4cvHPqqFkw1nktPj+U8ihCKcfQ=; b=O6K4/1K807C+/zm0KDbaFh+e4aUSh1kZLwdlFodpJ16TQzONHZzKWEtPWPMoIclEJ8 tRtEYoZx3HkXaH3QZoP/CuUgiNDiviYxHnwsp3VKbmn0VIzDmHUww5mtbVANe0xitHyD 4eLDAcBEX3ZCUwRQf6FusarhrG2vndubFOmHbNxbiunU3J04XGXMmcSnWfVzz3Rv23FX kOVbQKK9zjfbEZaNfamJ9NjsAVe21+Uhggmxkn4HErcDAY3t8jPz6aNKvNL23nN/28EG hXEGy68A1qCc+4wW1Q3MyoSKNsQEXAEGqHObBAYGImZ9NRhFiP5ZqEvUsTOp9PoFiMwJ KEsg== X-Gm-Message-State: AOAM531XkRzYHHvyXFqhYajLJohJR1klkCy2yDkjMd/SmJ9v+x08Uc/k +mA0yS9G0h2U7sm0cjrmeq/p16kvNo2tovtzq1kumx/8rzpS4w== X-Received: by 2002:a37:bfc6:: with SMTP id p189mr3874345qkf.33.1631111336296; Wed, 08 Sep 2021 07:28:56 -0700 (PDT) MIME-Version: 1.0 References: <20210518175153.3176764-1-robimarko@gmail.com> <162483884998.3259633.3733659727822681631@swboyd.mtv.corp.google.com> In-Reply-To: <162483884998.3259633.3733659727822681631@swboyd.mtv.corp.google.com> From: Robert Marko Date: Wed, 8 Sep 2021 16:28:45 +0200 Message-ID: Subject: Re: [PATCH] clk: qcom: ipq8074: fix PCI-E clock oops To: Stephen Boyd Cc: agross@kernel.org, Bjorn Andersson , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, open list , Michael Turquette , sivaprak@codeaurora.org, speriaka@codeaurora.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 28 Jun 2021 at 02:07, Stephen Boyd wrote: > > Quoting Robert Marko (2021-05-18 10:51:53) > > Fix PCI-E clock related kernel oops that are causes by missing > > parent_names. > > > > Without the use of parent_names kernel will panic on > > clk_core_get_parent_by_index() due to a NULL pointer. > > > > Without this earlycon is needed to even catch the OOPS as it will reset > > the board before serial is initialized. > > Can you share the oops message here in the commit text? > > > > > Fixes: f0cfcf1ade20 ("clk: qcom: ipq8074: Add missing clocks for pcie") > > Signed-off-by: Robert Marko > > --- > > drivers/clk/qcom/gcc-ipq8074.c | 11 +++++------ > > 1 file changed, 5 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/clk/qcom/gcc-ipq8074.c b/drivers/clk/qcom/gcc-ipq8074.c > > index 0c619ed35c82..8d8b1717a203 100644 > > --- a/drivers/clk/qcom/gcc-ipq8074.c > > +++ b/drivers/clk/qcom/gcc-ipq8074.c > > @@ -4357,8 +4357,7 @@ static struct clk_rcg2 pcie0_rchng_clk_src = { > > .parent_map = gcc_xo_gpll0_map, > > .clkr.hw.init = &(struct clk_init_data){ > > .name = "pcie0_rchng_clk_src", > > - .parent_hws = (const struct clk_hw *[]) { > > - &gpll0.clkr.hw }, > > + .parent_names = gcc_xo_gpll0, > > This seems to imply that we need to have two parents but we didn't > realize that was the case. Ouch! Please use a struct clk_parent_data > array and then use the firmware name for XO and the clk_hw pointer for > gpll0. > > > .num_parents = 2, > > .ops = &clk_rcg2_ops, > > }, > > @@ -4372,8 +4371,8 @@ static struct clk_branch gcc_pcie0_rchng_clk = { > > .enable_mask = BIT(1), > > .hw.init = &(struct clk_init_data){ > > .name = "gcc_pcie0_rchng_clk", > > - .parent_hws = (const struct clk_hw *[]){ > > - &pcie0_rchng_clk_src.clkr.hw, > > + .parent_names = (const char *[]){ > > + "pcie0_rchng_clk_src", > > }, > > .num_parents = 1, > > .flags = CLK_SET_RATE_PARENT, > > @@ -4390,8 +4389,8 @@ static struct clk_branch gcc_pcie0_axi_s_bridge_clk = { > > .enable_mask = BIT(0), > > .hw.init = &(struct clk_init_data){ > > .name = "gcc_pcie0_axi_s_bridge_clk", > > - .parent_hws = (const struct clk_hw *[]){ > > - &pcie0_axi_clk_src.clkr.hw, > > + .parent_names = (const char *[]){ > > + "pcie0_axi_clk_src" > > These two hunks can be dropped. Hi Stephen, sorry for the really late reply. Essentially it looks this is not necessary in the newer kernels, I tested again with 5.14 and newer and I don't have a panic anymore. I was hitting the issue with 5.10 kernel. Regards, Robert