All of lore.kernel.org
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Sudeep Holla <sudeep.holla@arm.com>
Cc: ulf.hansson@linaro.org, "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Kevin Hilman <khilman@kernel.org>, Pavel Machek <pavel@ucw.cz>,
	Len Brown <len.brown@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Viresh Kumar <vireshk@kernel.org>, Nishanth Menon <nm@ti.com>,
	Stephen Boyd <sboyd@kernel.org>, Kukjin Kim <kgene@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	linux-pm@vger.kernel.org,
	Vincent Guittot <vincent.guittot@linaro.org>,
	nks@flawful.org, georgi.djakov@linaro.org,
	Stephan Gerhold <stephan@gerhold.net>,
	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
Date: Tue, 20 Oct 2020 15:29:35 +0530	[thread overview]
Message-ID: <20201020095935.2ttoked5tozvcr24@vireshk-i7> (raw)
In-Reply-To: <20201020095205.GB10604@bogus>

On 20-10-20, 10:52, Sudeep Holla wrote:
> On Tue, Oct 20, 2020 at 03:11:34PM +0530, Viresh Kumar wrote:
> > On 20-10-20, 10:37, Sudeep Holla wrote:
> > > On Tue, Oct 20, 2020 at 11:24:32AM +0530, Viresh Kumar wrote:
> > > > On 20-10-20, 10:35, Viresh Kumar wrote:
> > > > > On 19-10-20, 15:10, Sudeep Holla wrote:
> > > > > > On Mon, Oct 19, 2020 at 04:05:35PM +0530, Viresh Kumar wrote:
> > > > > > > On 19-10-20, 11:12, Sudeep Holla wrote:
> > > > > > > > Yes it has clocks property but used by SCMI(for CPUFreq/DevFreq) and not
> > > > > > > > by any clock provider driver. E.g. the issue you will see if "clocks"
> > > > > > > > property is used instead of "qcom,freq-domain" on Qcom parts.
> > > > > > > 
> > > > > > > Okay, I understand. But what I still don't understand is why it fails
> > > > > > > for you. You have a clocks property in DT for the CPU, the OPP core
> > > > > > > tries to get it and will get deferred-probed, which will try probing
> > > > > > > at a later point of time and it shall work then. Isn't it ?
> > > > > > >
> > > > > > 
> > > > > > Nope unfortunately. We don't have clock provider, so clk_get will
> > > > > > never succeed and always return -EPROBE_DEFER.
> > > > > 
> > > > > Now this is really bad, you have a fake clocks property, how is the
> > > > > OPP core supposed to know it ? Damn.
> > > > 
> > > > What about instead of fixing the OPP core, which really is doing the
> > > > right thing, we fix your driver (as you can't fix the DT) and add a
> > > > dummy CPU clk to make it all work ?
> > > >
> > > 
> > > I really would avoid that. I would rather change the binding as there is
> > > no single official users of that binding in the upstream tree.
> > 
> > But how will you solve backward compatibility thing then ?
> > 
> 
> I am just betting on the fact that no users upstream means no backward
> compatibility needed. If someone raises issue we need to add backward
> compatibility with dummy clk as you suggested.

Okay. I would have done a change in the OPP core to fix the issue, but
the current code looks correct and we shouldn't change it to satisfy
buggy users. I hope that makes sense.

-- 
viresh

WARNING: multiple messages have this Message-ID (diff)
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Sudeep Holla <sudeep.holla@arm.com>
Cc: Nishanth Menon <nm@ti.com>, Len Brown <len.brown@intel.com>,
	ulf.hansson@linaro.org, linux-samsung-soc@vger.kernel.org,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Stephan Gerhold <stephan@gerhold.net>,
	Kevin Hilman <khilman@kernel.org>,
	Stephen Boyd <sboyd@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-pm@vger.kernel.org, "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	linux-kernel@vger.kernel.org,
	Krzysztof Kozlowski <krzk@kernel.org>,
	nks@flawful.org, Kukjin Kim <kgene@kernel.org>,
	Pavel Machek <pavel@ucw.cz>, Viresh Kumar <vireshk@kernel.org>,
	georgi.djakov@linaro.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH V2 1/2] opp: Allow dev_pm_opp_get_opp_table() to return -EPROBE_DEFER
Date: Tue, 20 Oct 2020 15:29:35 +0530	[thread overview]
Message-ID: <20201020095935.2ttoked5tozvcr24@vireshk-i7> (raw)
In-Reply-To: <20201020095205.GB10604@bogus>

On 20-10-20, 10:52, Sudeep Holla wrote:
> On Tue, Oct 20, 2020 at 03:11:34PM +0530, Viresh Kumar wrote:
> > On 20-10-20, 10:37, Sudeep Holla wrote:
> > > On Tue, Oct 20, 2020 at 11:24:32AM +0530, Viresh Kumar wrote:
> > > > On 20-10-20, 10:35, Viresh Kumar wrote:
> > > > > On 19-10-20, 15:10, Sudeep Holla wrote:
> > > > > > On Mon, Oct 19, 2020 at 04:05:35PM +0530, Viresh Kumar wrote:
> > > > > > > On 19-10-20, 11:12, Sudeep Holla wrote:
> > > > > > > > Yes it has clocks property but used by SCMI(for CPUFreq/DevFreq) and not
> > > > > > > > by any clock provider driver. E.g. the issue you will see if "clocks"
> > > > > > > > property is used instead of "qcom,freq-domain" on Qcom parts.
> > > > > > > 
> > > > > > > Okay, I understand. But what I still don't understand is why it fails
> > > > > > > for you. You have a clocks property in DT for the CPU, the OPP core
> > > > > > > tries to get it and will get deferred-probed, which will try probing
> > > > > > > at a later point of time and it shall work then. Isn't it ?
> > > > > > >
> > > > > > 
> > > > > > Nope unfortunately. We don't have clock provider, so clk_get will
> > > > > > never succeed and always return -EPROBE_DEFER.
> > > > > 
> > > > > Now this is really bad, you have a fake clocks property, how is the
> > > > > OPP core supposed to know it ? Damn.
> > > > 
> > > > What about instead of fixing the OPP core, which really is doing the
> > > > right thing, we fix your driver (as you can't fix the DT) and add a
> > > > dummy CPU clk to make it all work ?
> > > >
> > > 
> > > I really would avoid that. I would rather change the binding as there is
> > > no single official users of that binding in the upstream tree.
> > 
> > But how will you solve backward compatibility thing then ?
> > 
> 
> I am just betting on the fact that no users upstream means no backward
> compatibility needed. If someone raises issue we need to add backward
> compatibility with dummy clk as you suggested.

Okay. I would have done a change in the OPP core to fix the issue, but
the current code looks correct and we shouldn't change it to satisfy
buggy users. I hope that makes sense.

-- 
viresh

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-10-20  9:59 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-24  9:09 [PATCH V2 1/2] opp: Allow dev_pm_opp_get_opp_table() to return -EPROBE_DEFER Viresh Kumar
2020-08-24  9:09 ` Viresh Kumar
2020-08-24  9:09 ` [PATCH V2 2/2] cpufreq: dt: Refactor initialization to handle probe deferral properly Viresh Kumar
2020-08-24 14:25   ` kernel test robot
2020-08-24 14:25   ` [PATCH] cpufreq: dt: fix semicolon.cocci warnings kernel test robot
2020-08-25  4:29     ` Viresh Kumar
     [not found]   ` <CGME20200901085708eucas1p231ccacd7b41685ece92ee21e3b726f28@eucas1p2.samsung.com>
2020-09-01  8:57     ` [PATCH V2 2/2] cpufreq: dt: Refactor initialization to handle probe deferral properly Marek Szyprowski
2020-09-01  9:45       ` Viresh Kumar
2020-09-01 10:05         ` Marek Szyprowski
2020-09-01 10:12           ` Viresh Kumar
2020-10-13  9:47   ` Geert Uytterhoeven
2020-10-13  9:56     ` Viresh Kumar
2020-10-14 16:40       ` Geert Uytterhoeven
2020-10-16  5:03         ` Viresh Kumar
2020-10-16  6:44           ` Geert Uytterhoeven
2020-10-16  8:07             ` Viresh Kumar
2020-10-27 16:29               ` Geert Uytterhoeven
2020-10-28  5:48                 ` Viresh Kumar
2020-10-28  9:49                   ` Geert Uytterhoeven
2020-10-28  9:52                     ` Viresh Kumar
2020-08-24  9:17 ` [PATCH V2 1/2] opp: Allow dev_pm_opp_get_opp_table() to return -EPROBE_DEFER Krzysztof Kozlowski
2020-08-24  9:17   ` Krzysztof Kozlowski
2020-08-24 11:08 ` Ulf Hansson
2020-08-24 11:08   ` Ulf Hansson
2020-08-24 11:39 ` Stephan Gerhold
2020-08-24 11:39   ` Stephan Gerhold
2020-10-15 18:05 ` Sudeep Holla
2020-10-15 18:05   ` Sudeep Holla
2020-10-16  4:24   ` Viresh Kumar
2020-10-16  4:24     ` Viresh Kumar
2020-10-16  6:00     ` Sudeep Holla
2020-10-16  6:00       ` Sudeep Holla
2020-10-16 11:12       ` Sudeep Holla
2020-10-16 11:12         ` Sudeep Holla
2020-10-16 15:28         ` Stephan Gerhold
2020-10-16 15:28           ` Stephan Gerhold
2020-10-19  4:58         ` Viresh Kumar
2020-10-19  4:58           ` Viresh Kumar
2020-10-19  9:17           ` Sudeep Holla
2020-10-19  9:17             ` Sudeep Holla
2020-10-19  9:24             ` Viresh Kumar
2020-10-19  9:24               ` Viresh Kumar
2020-10-19 10:12               ` Sudeep Holla
2020-10-19 10:12                 ` Sudeep Holla
2020-10-19 10:35                 ` Viresh Kumar
2020-10-19 10:35                   ` Viresh Kumar
2020-10-19 14:10                   ` Sudeep Holla
2020-10-19 14:10                     ` Sudeep Holla
2020-10-20  5:05                     ` Viresh Kumar
2020-10-20  5:05                       ` Viresh Kumar
2020-10-20  5:54                       ` Viresh Kumar
2020-10-20  5:54                         ` Viresh Kumar
2020-10-20  9:37                         ` Sudeep Holla
2020-10-20  9:37                           ` Sudeep Holla
2020-10-20  9:41                           ` Viresh Kumar
2020-10-20  9:41                             ` Viresh Kumar
2020-10-20  9:52                             ` Sudeep Holla
2020-10-20  9:52                               ` Sudeep Holla
2020-10-20  9:59                               ` Viresh Kumar [this message]
2020-10-20  9:59                                 ` Viresh Kumar
2020-10-27 22:24 ` Guenter Roeck
2020-10-27 22:24   ` Guenter Roeck
2020-10-28  4:06   ` Viresh Kumar
2020-10-28  4:06     ` Viresh Kumar
2020-10-28 17:29     ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201020095935.2ttoked5tozvcr24@vireshk-i7 \
    --to=viresh.kumar@linaro.org \
    --cc=georgi.djakov@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kgene@kernel.org \
    --cc=khilman@kernel.org \
    --cc=krzk@kernel.org \
    --cc=len.brown@intel.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=nks@flawful.org \
    --cc=nm@ti.com \
    --cc=pavel@ucw.cz \
    --cc=rjw@rjwysocki.net \
    --cc=sboyd@kernel.org \
    --cc=stephan@gerhold.net \
    --cc=sudeep.holla@arm.com \
    --cc=ulf.hansson@linaro.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vireshk@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.