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 X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1FA20C433DF for ; Fri, 16 Oct 2020 11:12:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A85E221775 for ; Fri, 16 Oct 2020 11:12:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406800AbgJPLM3 (ORCPT ); Fri, 16 Oct 2020 07:12:29 -0400 Received: from foss.arm.com ([217.140.110.172]:34702 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406790AbgJPLM2 (ORCPT ); Fri, 16 Oct 2020 07:12:28 -0400 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 D1EBAD6E; Fri, 16 Oct 2020 04:12:27 -0700 (PDT) Received: from bogus (unknown [10.57.17.164]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 174603F719; Fri, 16 Oct 2020 04:12:24 -0700 (PDT) Date: Fri, 16 Oct 2020 12:12:22 +0100 From: Sudeep Holla To: Viresh Kumar Cc: ulf.hansson@linaro.org, "Rafael J. Wysocki" , Kevin Hilman , Pavel Machek , Len Brown , Sudeep Holla , Greg Kroah-Hartman , Viresh Kumar , Nishanth Menon , Stephen Boyd , Kukjin Kim , Krzysztof Kozlowski , linux-pm@vger.kernel.org, Vincent Guittot , nks@flawful.org, georgi.djakov@linaro.org, Stephan Gerhold , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: Re: [PATCH V2 1/2] opp: Allow dev_pm_opp_get_opp_table() to return -EPROBE_DEFER Message-ID: <20201016111222.lvakbmjhlrocpogt@bogus> References: <24ff92dd1b0ee1b802b45698520f2937418f8094.1598260050.git.viresh.kumar@linaro.org> <20201015180555.gacdzkofpibkdn2e@bogus> <20201016042434.org6ibdqsqbzcdww@vireshk-i7> <20201016060021.sotk72u4hioctg7o@bogus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201016060021.sotk72u4hioctg7o@bogus> User-Agent: NeoMutt/20171215 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 16, 2020 at 07:00:21AM +0100, Sudeep Holla wrote: > On Fri, Oct 16, 2020 at 09:54:34AM +0530, Viresh Kumar wrote: > > On 15-10-20, 19:05, Sudeep Holla wrote: > > > OK, this breaks with SCMI which doesn't provide clocks but manage OPPs > > > directly. Before this change clk_get(dev..) was allowed to fail and > > > --EPROBE_DEFER was not an error. > > > > I think the change in itself is fine. We should be returning from > > there if we get EPROBE_DEFER. The question is rather why are you > > getting EPROBE_DEFER here ? > > > > Ah OK, I didn't spend too much time, saw -EPROBE_DEFER, just reverted > this patch and it worked. I need to check it in detail yet. > You confused me earlier. As I said there will be no clock provider registered for SCMI CPU/Dev DVFS. opp_table->clk = clk_get(dev, NULL); will always return -EPROBE_DEFER as there is no clock provider for dev. But this change now propagates that error to caller of dev_pm_opp_add which means we can't add opp to a device if there are no clock providers. This breaks for DVFS which don't operate separately with clocks and regulators. -- Regards, Sudeep 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 X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C387C433E7 for ; Fri, 16 Oct 2020 11:13:58 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DE8B2207F7 for ; Fri, 16 Oct 2020 11:13:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nCUuxKSI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DE8B2207F7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject: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=G7NLsgTr3juR3WCqnse2Qb28+5L0PcLiYmyiJivLw+4=; b=nCUuxKSI1RI+YYvFYF8LrRZ/9 W35vLUFDzOJ4zvsAAyddAjXMGtqoYW+hnczHLDgjSlhUClQTG0h4fOttxd6imXHV0jMFcIqckVURv eyCADdP0dCQ4JF/0/BAk73Ey/vUjghbbQWc3FovWiY4SZSYvmvGvYZsq4ZXM416xxV41h4AWmnlDx 6tuTDI1v6+bInq+MU2P/dYix9UtP2Na6r8lSc9iFbGAgo3ZXmS0kEkRzwMJOrIsDgi8a9UJpllQrZ Meig9kngHf4LvrVUWtd946LYDmvRitVCYok49c0Sh1s+DgOw6/GWHdPCmaj93mUI8qOaBFbn9kKww OUTqGK2eQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kTNey-00027Z-LL; Fri, 16 Oct 2020 11:12:32 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kTNew-00026W-0a for linux-arm-kernel@lists.infradead.org; Fri, 16 Oct 2020 11:12:30 +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 D1EBAD6E; Fri, 16 Oct 2020 04:12:27 -0700 (PDT) Received: from bogus (unknown [10.57.17.164]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 174603F719; Fri, 16 Oct 2020 04:12:24 -0700 (PDT) Date: Fri, 16 Oct 2020 12:12:22 +0100 From: Sudeep Holla To: Viresh Kumar Subject: Re: [PATCH V2 1/2] opp: Allow dev_pm_opp_get_opp_table() to return -EPROBE_DEFER Message-ID: <20201016111222.lvakbmjhlrocpogt@bogus> References: <24ff92dd1b0ee1b802b45698520f2937418f8094.1598260050.git.viresh.kumar@linaro.org> <20201015180555.gacdzkofpibkdn2e@bogus> <20201016042434.org6ibdqsqbzcdww@vireshk-i7> <20201016060021.sotk72u4hioctg7o@bogus> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201016060021.sotk72u4hioctg7o@bogus> User-Agent: NeoMutt/20171215 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201016_071230_151194_ADD13654 X-CRM114-Status: GOOD ( 21.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nishanth Menon , Len Brown , ulf.hansson@linaro.org, linux-samsung-soc@vger.kernel.org, Vincent Guittot , Stephan Gerhold , Kevin Hilman , Stephen Boyd , Greg Kroah-Hartman , linux-pm@vger.kernel.org, "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, Krzysztof Kozlowski , nks@flawful.org, Kukjin Kim , Pavel Machek , Sudeep Holla , georgi.djakov@linaro.org, linux-arm-kernel@lists.infradead.org, Viresh Kumar 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 Fri, Oct 16, 2020 at 07:00:21AM +0100, Sudeep Holla wrote: > On Fri, Oct 16, 2020 at 09:54:34AM +0530, Viresh Kumar wrote: > > On 15-10-20, 19:05, Sudeep Holla wrote: > > > OK, this breaks with SCMI which doesn't provide clocks but manage OPPs > > > directly. Before this change clk_get(dev..) was allowed to fail and > > > --EPROBE_DEFER was not an error. > > > > I think the change in itself is fine. We should be returning from > > there if we get EPROBE_DEFER. The question is rather why are you > > getting EPROBE_DEFER here ? > > > > Ah OK, I didn't spend too much time, saw -EPROBE_DEFER, just reverted > this patch and it worked. I need to check it in detail yet. > You confused me earlier. As I said there will be no clock provider registered for SCMI CPU/Dev DVFS. opp_table->clk = clk_get(dev, NULL); will always return -EPROBE_DEFER as there is no clock provider for dev. But this change now propagates that error to caller of dev_pm_opp_add which means we can't add opp to a device if there are no clock providers. This breaks for DVFS which don't operate separately with clocks and regulators. -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel