From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E0FAC433EF for ; Wed, 15 Jun 2022 16:29:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343951AbiFOQ3r (ORCPT ); Wed, 15 Jun 2022 12:29:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234917AbiFOQ3q (ORCPT ); Wed, 15 Jun 2022 12:29:46 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 356023A721 for ; Wed, 15 Jun 2022 09:29:45 -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 1E47B153B; Wed, 15 Jun 2022 09:29:45 -0700 (PDT) Received: from e120937-lin (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BFE0A3F7F5; Wed, 15 Jun 2022 09:29:43 -0700 (PDT) Date: Wed, 15 Jun 2022 17:29:41 +0100 From: Cristian Marussi To: Florian Fainelli Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, sudeep.holla@arm.com, james.quinlan@broadcom.com, Jonathan.Cameron@huawei.com, etienne.carriere@linaro.org, vincent.guittot@linaro.org, souvik.chakravarty@arm.com Subject: Re: [PATCH 11/22] firmware: arm_scmi: Add SCMIv3.1 extended names protocols support Message-ID: References: <20220330150551.2573938-1-cristian.marussi@arm.com> <20220330150551.2573938-12-cristian.marussi@arm.com> <6f865d7f-fde8-d923-3c7e-d12bfbc370a6@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 15, 2022 at 09:10:03AM -0700, Florian Fainelli wrote: > On 6/15/22 02:40, Cristian Marussi wrote: > > On Wed, Jun 15, 2022 at 09:18:03AM +0100, Cristian Marussi wrote: > > > On Wed, Jun 15, 2022 at 05:45:11AM +0200, Florian Fainelli wrote: > > > > > > > > > > > > On 3/30/2022 5:05 PM, Cristian Marussi wrote: > > > > > Using the common protocol helper implementation add support for all new > > > > > SCMIv3.1 extended names commands related to all protocols with the > > > > > exception of SENSOR_AXIS_GET_NAME. > > > > > > > > > > Signed-off-by: Cristian Marussi > > > > > > > > This causes the following splat on a platform where regulators fail to > > > > initialize: > > > > > > > > > > Hi Florian, > > > > > > thanks for the report. > > > > > > It seems a memory error while allocating so it was not meant to be > > > solved by the fixes, anyway, I've never seen this splat in my testing > > > and at first sight I cannot see anything wrong in the devm_k* calls > > > inside scmi_voltage_protocol_init...is there any particular config in > > > your setup ? > > > > > > Moreover, the WARNING line 5402 seems to match v5.19-rc1 and it has > > > slightly changed with -rc-1, so I'll try rebasing on that at first and > > > see if I can reproduce the issue locally. > > > > > > > I just re-tested the series rebased on v519-rc1 plus fixes and I cannot > > reproduce in my setup with a few (~9) good and bad voltage domains. > > > > How many voltage domains are advertised by the platform in your setup ? > > There are 11 voltage regulators on this platform, and of course, now that I > am trying to reproduce the splat I reported I just cannot anymore... I will > let you know if there is anything that needs to be done. Thanks for being > responsive as usual! ... you're welcome... I'm trying to figure out where an abnormal mem request could happen... can you try adding this (for brutal debugging) when you try ? (...just to rule out funny fw replies.... :D) Thanks, Cristian --->8---- diff --git a/drivers/firmware/arm_scmi/voltage.c b/drivers/firmware/arm_scmi/voltage.c index 895741b66f5a..fd841292df5c 100644 --- a/drivers/firmware/arm_scmi/voltage.c +++ b/drivers/firmware/arm_scmi/voltage.c @@ -108,6 +108,9 @@ static int scmi_init_voltage_levels(struct device *dev, return -EINVAL; } + dev_info(dev, "num_returned:%d num_remaining:%d\n", + num_returned, num_remaining); + v->levels_uv = devm_kcalloc(dev, num_levels, sizeof(u32), GFP_KERNEL); if (!v->levels_uv) return -ENOMEM; > -- > Florian From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EC41AC43334 for ; Wed, 15 Jun 2022 16:32:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+rAhyiDLMNOSUHRgvmUk2CrgYklV/SGn4Qb4QTAFgU8=; b=j3Aw1NvEjq6WpD WOJ0QIe2uqakq1lpc5VLMxBf0zV2SSOTOV2HEncExr9WwBBkYCLQglBT0NlStt7zBtQNBciDdmvL7 4geL9751syJ6TaTq2etQoSOpZltKz8RWjs3xxqSVDuFPwtL9y7fC+6IsHE5lMabUKdYmpQ+O5bzL4 smHfWiK0DQkfw8RiJiJ9vevzdd2Ia3SNzUrej/ZTDF8msRRHCEnokQ5WCBwUbxSqSvd0buiuoyWK5 yo2c2IiyBKXGSIYej+ZcCwmLxOjA6qo2Bt/iKLyP3WWCHJwhGAK/8v1v/pGn4W+R/PAg8Pj1u6nUy s2urkfl07rvYIOhdxbfg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1VvZ-00FR3T-3u; Wed, 15 Jun 2022 16:31:33 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1Vtr-00FQJo-7T for linux-arm-kernel@lists.infradead.org; Wed, 15 Jun 2022 16:29:48 +0000 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 1E47B153B; Wed, 15 Jun 2022 09:29:45 -0700 (PDT) Received: from e120937-lin (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BFE0A3F7F5; Wed, 15 Jun 2022 09:29:43 -0700 (PDT) Date: Wed, 15 Jun 2022 17:29:41 +0100 From: Cristian Marussi To: Florian Fainelli Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, sudeep.holla@arm.com, james.quinlan@broadcom.com, Jonathan.Cameron@huawei.com, etienne.carriere@linaro.org, vincent.guittot@linaro.org, souvik.chakravarty@arm.com Subject: Re: [PATCH 11/22] firmware: arm_scmi: Add SCMIv3.1 extended names protocols support Message-ID: References: <20220330150551.2573938-1-cristian.marussi@arm.com> <20220330150551.2573938-12-cristian.marussi@arm.com> <6f865d7f-fde8-d923-3c7e-d12bfbc370a6@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220615_092947_374019_D35CB17E X-CRM114-Status: GOOD ( 32.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jun 15, 2022 at 09:10:03AM -0700, Florian Fainelli wrote: > On 6/15/22 02:40, Cristian Marussi wrote: > > On Wed, Jun 15, 2022 at 09:18:03AM +0100, Cristian Marussi wrote: > > > On Wed, Jun 15, 2022 at 05:45:11AM +0200, Florian Fainelli wrote: > > > > > > > > > > > > On 3/30/2022 5:05 PM, Cristian Marussi wrote: > > > > > Using the common protocol helper implementation add support for all new > > > > > SCMIv3.1 extended names commands related to all protocols with the > > > > > exception of SENSOR_AXIS_GET_NAME. > > > > > > > > > > Signed-off-by: Cristian Marussi > > > > > > > > This causes the following splat on a platform where regulators fail to > > > > initialize: > > > > > > > > > > Hi Florian, > > > > > > thanks for the report. > > > > > > It seems a memory error while allocating so it was not meant to be > > > solved by the fixes, anyway, I've never seen this splat in my testing > > > and at first sight I cannot see anything wrong in the devm_k* calls > > > inside scmi_voltage_protocol_init...is there any particular config in > > > your setup ? > > > > > > Moreover, the WARNING line 5402 seems to match v5.19-rc1 and it has > > > slightly changed with -rc-1, so I'll try rebasing on that at first and > > > see if I can reproduce the issue locally. > > > > > > > I just re-tested the series rebased on v519-rc1 plus fixes and I cannot > > reproduce in my setup with a few (~9) good and bad voltage domains. > > > > How many voltage domains are advertised by the platform in your setup ? > > There are 11 voltage regulators on this platform, and of course, now that I > am trying to reproduce the splat I reported I just cannot anymore... I will > let you know if there is anything that needs to be done. Thanks for being > responsive as usual! ... you're welcome... I'm trying to figure out where an abnormal mem request could happen... can you try adding this (for brutal debugging) when you try ? (...just to rule out funny fw replies.... :D) Thanks, Cristian --->8---- diff --git a/drivers/firmware/arm_scmi/voltage.c b/drivers/firmware/arm_scmi/voltage.c index 895741b66f5a..fd841292df5c 100644 --- a/drivers/firmware/arm_scmi/voltage.c +++ b/drivers/firmware/arm_scmi/voltage.c @@ -108,6 +108,9 @@ static int scmi_init_voltage_levels(struct device *dev, return -EINVAL; } + dev_info(dev, "num_returned:%d num_remaining:%d\n", + num_returned, num_remaining); + v->levels_uv = devm_kcalloc(dev, num_levels, sizeof(u32), GFP_KERNEL); if (!v->levels_uv) return -ENOMEM; > -- > Florian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel