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.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 6F7E7C433DF for ; Mon, 19 Oct 2020 09:24:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0ADCE22200 for ; Mon, 19 Oct 2020 09:24:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="y9O9ia6I" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730263AbgJSJYR (ORCPT ); Mon, 19 Oct 2020 05:24:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726593AbgJSJYQ (ORCPT ); Mon, 19 Oct 2020 05:24:16 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39358C0613CE for ; Mon, 19 Oct 2020 02:24:15 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id t4so2056989plq.13 for ; Mon, 19 Oct 2020 02:24:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=zDPrPOvZEKInNhwxCz6Kajh6JAVRQjyNuOBoRhsFWd0=; b=y9O9ia6I2iPQ99hdVJUQ2A0pW9t0LpBkLFxvcu/z5pJYAUGkH5R5sfnYmsE67S7e6l Dx8BUA8fqM/CLgvKo86Rx1heiv+QywLmP27iyfcPNSH4QHOL9U364HxyqdjqFDC67SJ1 0tfuMNuc/EbuKFlMacDoUfenokJ3tR8WOfcxgRZuAQmFbsjGIdFDY8UttIN5Ybsd7lBO 2PetuDNeDcKtsnifWV96diusXYxtEa77rcsQAwm8VquzsXbIwlQLUIGS+CNudVLF6cKi AHYaBG5TiuWJWNysketU4d+gYR2iQl1ebEtipdB5bfAMl+ChRTfuY5KcxhGdaEwnruPp +xxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=zDPrPOvZEKInNhwxCz6Kajh6JAVRQjyNuOBoRhsFWd0=; b=FChtPf4+SEx05YwfEkBCAjuV69u4OJxXnRyooABrX76W9cBKJAiNUl3qb49B8l0Kel alJjzX6EnhLz+rXDAy6QAi8CcEIn1Y0pFceHYmuCxGnEZT17ZkQf5vBgQ0vSMegAA/xS IYmmYYeswKdFWZf2Vyp0KgAFLQA6EEHiThW6qDE4T1Xxc1hzN/kruiR7bIz3lFlISfPr QoQiYrL1urab4P4hS4IKwUBKwAyRb2K/Bar54Hgi8rmUcQhXdMD3QGH/SuaFFKv/C2og LJ7LStWiAzduqFIIWDqOu6SIhIn87w6GcWhLqHHhPPMEn6w7wtg+UiIHRxQ2uMPaAvuz UiJw== X-Gm-Message-State: AOAM530RksVZzPMViBRRDqAQas4dHv8KRPCgyiKbPWHyhSMWMaRPOXHO MfLi5pPmeozoyYquqM/b/EiJBg== X-Google-Smtp-Source: ABdhPJxQ1Levsqfyr7yBr0kDuJiUWjT2K9EdyHdohTH48iuSU9mm0S6IMTCm2SVo2FfsLAKqWfp/hw== X-Received: by 2002:a17:90b:1541:: with SMTP id ig1mr17153160pjb.125.1603099454559; Mon, 19 Oct 2020 02:24:14 -0700 (PDT) Received: from localhost ([122.181.54.133]) by smtp.gmail.com with ESMTPSA id r19sm11087364pjo.23.2020.10.19.02.24.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Oct 2020 02:24:13 -0700 (PDT) Date: Mon, 19 Oct 2020 14:54:11 +0530 From: Viresh Kumar To: Sudeep Holla Cc: ulf.hansson@linaro.org, "Rafael J. Wysocki" , Kevin Hilman , Pavel Machek , Len Brown , 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: <20201019092411.b3znjxebay3puq2j@vireshk-i7> References: <24ff92dd1b0ee1b802b45698520f2937418f8094.1598260050.git.viresh.kumar@linaro.org> <20201015180555.gacdzkofpibkdn2e@bogus> <20201016042434.org6ibdqsqbzcdww@vireshk-i7> <20201016060021.sotk72u4hioctg7o@bogus> <20201016111222.lvakbmjhlrocpogt@bogus> <20201019045827.kl6qnx6gidhzjkrs@vireshk-i7> <20201019091723.GA12087@bogus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201019091723.GA12087@bogus> User-Agent: NeoMutt/20180716-391-311a52 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19-10-20, 10:17, Sudeep Holla wrote: > On Mon, Oct 19, 2020 at 10:28:27AM +0530, Viresh Kumar wrote: > > On 16-10-20, 12:12, Sudeep Holla wrote: > > > 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. > > > > The CPUs DT node shouldn't have a clock property in such a case and I > > would expect an error instead of EPROBE_DEFER then. Isn't it ? > > Ideally yes, but for legacy reasons clocks property has been used for > providing OPP/DVFS handle too. While we can change and add new property > for that, it will still break old bindings. I am not sure I understood it all. So does your platform have the clock-names property or not for the CPUs ? And how will something break here ? -- viresh 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 C8F0AC433E7 for ; Mon, 19 Oct 2020 09:25:48 +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 4F1DD22200 for ; Mon, 19 Oct 2020 09:25:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PoUtbmOz"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="y9O9ia6I" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4F1DD22200 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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=wF3VaNUBfU4bQeTPpsf+nSXyUBic2y4anMY1yHs7MKQ=; b=PoUtbmOz5LojR9zQy5ph6oKLD m7aOBi0mNAeHQN0D8uarNRA/Jbm40be3KA8u4mB9CFvImf2Dv4YiiGZ/v2LG9fgLkZqP3JpFbnkX0 Ow/FNXmR5BYgcEjRubyfZnPfq4FGjeDFBX+dW4c/0wl5XYpYVgJl57XwCXPWyj/d9qQmuSqvgjSat DL+as34eUHBfcuxt1r2QSftX9aiGLWsufIkDn14N9WfD9cG7hEkxZ3ibWWpvfABF8hXO63hVFV5tX gkgXWqNpwHLT6ynuBbwTLZBm47ZC5Wne52QOydV6I2+CzixpdYR6wPxknw5kP4YVUZo67d+ty2tSS 1xVhs1Q0A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUROu-0004mW-8r; Mon, 19 Oct 2020 09:24:20 +0000 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUROr-0004lv-49 for linux-arm-kernel@lists.infradead.org; Mon, 19 Oct 2020 09:24:18 +0000 Received: by mail-pj1-x1043.google.com with SMTP id gm14so5006891pjb.2 for ; Mon, 19 Oct 2020 02:24:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=zDPrPOvZEKInNhwxCz6Kajh6JAVRQjyNuOBoRhsFWd0=; b=y9O9ia6I2iPQ99hdVJUQ2A0pW9t0LpBkLFxvcu/z5pJYAUGkH5R5sfnYmsE67S7e6l Dx8BUA8fqM/CLgvKo86Rx1heiv+QywLmP27iyfcPNSH4QHOL9U364HxyqdjqFDC67SJ1 0tfuMNuc/EbuKFlMacDoUfenokJ3tR8WOfcxgRZuAQmFbsjGIdFDY8UttIN5Ybsd7lBO 2PetuDNeDcKtsnifWV96diusXYxtEa77rcsQAwm8VquzsXbIwlQLUIGS+CNudVLF6cKi AHYaBG5TiuWJWNysketU4d+gYR2iQl1ebEtipdB5bfAMl+ChRTfuY5KcxhGdaEwnruPp +xxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=zDPrPOvZEKInNhwxCz6Kajh6JAVRQjyNuOBoRhsFWd0=; b=dPgJWppaW1bM7Afrdm0jbLKKooFbGBKHcAsZlxF9nmfwnPu3LPARVdsRls6IGg6WTs z7XMHyMXTUAiVGn5/9jyzXEmoapyEjmZ+jSV7s0obmdvXKZOYhyHMZoDnD9I1tN0oteG +cZUDcHQHD6us8qYGtW4JzXBXUuQYH02L5U3S9GTT4wHvRlB6KeEwNgXYUExVJUTx3N6 4LXh7EwnzEG/wjVk08R7kbRp0Jc8S5zjJRjtU4gATGavmp58LB+WBcOe1tOBS+Xvjh50 vp8bITUU1KbxZHlHvCsjUztydFcqUr+Prf1VOeerLXgoddH7ggQAi6SEUyJIiTRAqgH3 XSjg== X-Gm-Message-State: AOAM532QC/X5+bCz84gXiPDNKXvYkgGeIdIox6sc+hc7uv80/x8X4UEo CfZ9LTT6N3ZH8etPkaf9guikSg== X-Google-Smtp-Source: ABdhPJxQ1Levsqfyr7yBr0kDuJiUWjT2K9EdyHdohTH48iuSU9mm0S6IMTCm2SVo2FfsLAKqWfp/hw== X-Received: by 2002:a17:90b:1541:: with SMTP id ig1mr17153160pjb.125.1603099454559; Mon, 19 Oct 2020 02:24:14 -0700 (PDT) Received: from localhost ([122.181.54.133]) by smtp.gmail.com with ESMTPSA id r19sm11087364pjo.23.2020.10.19.02.24.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Oct 2020 02:24:13 -0700 (PDT) Date: Mon, 19 Oct 2020 14:54:11 +0530 From: Viresh Kumar To: Sudeep Holla Subject: Re: [PATCH V2 1/2] opp: Allow dev_pm_opp_get_opp_table() to return -EPROBE_DEFER Message-ID: <20201019092411.b3znjxebay3puq2j@vireshk-i7> References: <24ff92dd1b0ee1b802b45698520f2937418f8094.1598260050.git.viresh.kumar@linaro.org> <20201015180555.gacdzkofpibkdn2e@bogus> <20201016042434.org6ibdqsqbzcdww@vireshk-i7> <20201016060021.sotk72u4hioctg7o@bogus> <20201016111222.lvakbmjhlrocpogt@bogus> <20201019045827.kl6qnx6gidhzjkrs@vireshk-i7> <20201019091723.GA12087@bogus> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201019091723.GA12087@bogus> User-Agent: NeoMutt/20180716-391-311a52 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201019_052417_346835_B19D7FA4 X-CRM114-Status: GOOD ( 31.41 ) 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 , Viresh Kumar , georgi.djakov@linaro.org, linux-arm-kernel@lists.infradead.org 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 19-10-20, 10:17, Sudeep Holla wrote: > On Mon, Oct 19, 2020 at 10:28:27AM +0530, Viresh Kumar wrote: > > On 16-10-20, 12:12, Sudeep Holla wrote: > > > 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. > > > > The CPUs DT node shouldn't have a clock property in such a case and I > > would expect an error instead of EPROBE_DEFER then. Isn't it ? > > Ideally yes, but for legacy reasons clocks property has been used for > providing OPP/DVFS handle too. While we can change and add new property > for that, it will still break old bindings. I am not sure I understood it all. So does your platform have the clock-names property or not for the CPUs ? And how will something break here ? -- viresh _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel