mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] of: export of_find_next_cache_node() for modules
@ 2023-10-11 11:27 Dmitry Baryshkov
  2023-10-11 11:30 ` Konrad Dybcio
  2023-10-11 12:52 ` Rob Herring
  0 siblings, 2 replies; 6+ messages in thread
From: Dmitry Baryshkov @ 2023-10-11 11:27 UTC (permalink / raw)
  To: Rob Herring, Frank Rowand, Ilia Lin, Rafael J. Wysocki, Viresh Kumar
  Cc: devicetree, linux-kernel, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, linux-arm-msm, linux-pm

The qcom-cpufreq-nvmem module uses of_find_next_cache_node() function,
so export it to be available to the modules.

Fixes: 7683a63c08ff ("cpufreq: qcom-nvmem: create L2 cache device")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---

This patch fixes the discrepancy caused by the patch for the
qcom-cpufreq-nvmem. I'd like to ask for this patch to be also merged via
the cpufreq tree.

---
 drivers/of/base.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index 8d93cb6ea9cd..c4cf558e60d9 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1905,6 +1905,7 @@ struct device_node *of_find_next_cache_node(const struct device_node *np)
 
 	return NULL;
 }
+EXPORT_SYMBOL_GPL(of_find_next_cache_node);
 
 /**
  * of_find_last_cache_level - Find the level at which the last cache is
-- 
2.39.2


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] of: export of_find_next_cache_node() for modules
  2023-10-11 11:27 [PATCH] of: export of_find_next_cache_node() for modules Dmitry Baryshkov
@ 2023-10-11 11:30 ` Konrad Dybcio
  2023-10-11 12:52 ` Rob Herring
  1 sibling, 0 replies; 6+ messages in thread
From: Konrad Dybcio @ 2023-10-11 11:30 UTC (permalink / raw)
  To: Dmitry Baryshkov, Rob Herring, Frank Rowand, Ilia Lin,
	Rafael J. Wysocki, Viresh Kumar
  Cc: devicetree, linux-kernel, Andy Gross, Bjorn Andersson,
	linux-arm-msm, linux-pm



On 10/11/23 13:27, Dmitry Baryshkov wrote:
> The qcom-cpufreq-nvmem module uses of_find_next_cache_node() function,
> so export it to be available to the modules.
> 
> Fixes: 7683a63c08ff ("cpufreq: qcom-nvmem: create L2 cache device")
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Pity the testing robot didn't catch this

Konrad

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] of: export of_find_next_cache_node() for modules
  2023-10-11 11:27 [PATCH] of: export of_find_next_cache_node() for modules Dmitry Baryshkov
  2023-10-11 11:30 ` Konrad Dybcio
@ 2023-10-11 12:52 ` Rob Herring
  2023-10-11 12:59   ` Dmitry Baryshkov
  1 sibling, 1 reply; 6+ messages in thread
From: Rob Herring @ 2023-10-11 12:52 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Frank Rowand, Ilia Lin, Rafael J. Wysocki, Viresh Kumar,
	devicetree, linux-kernel, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, linux-arm-msm, linux-pm

On Wed, Oct 11, 2023 at 6:27 AM Dmitry Baryshkov
<dmitry.baryshkov@linaro.org> wrote:
>
> The qcom-cpufreq-nvmem module uses of_find_next_cache_node() function,
> so export it to be available to the modules.

You really should be using the cacheinfo API which has already parsed
the cache nodes.

Also, why do you need a platform_device? I don't see a driver.
cacheinfo already creates a struct device, so kind of weird to have 2
devices.

Rob

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] of: export of_find_next_cache_node() for modules
  2023-10-11 12:52 ` Rob Herring
@ 2023-10-11 12:59   ` Dmitry Baryshkov
  2023-10-16  3:23     ` Viresh Kumar
  0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Baryshkov @ 2023-10-11 12:59 UTC (permalink / raw)
  To: Rob Herring
  Cc: Frank Rowand, Ilia Lin, Rafael J. Wysocki, Viresh Kumar,
	devicetree, linux-kernel, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, linux-arm-msm, linux-pm

On Wed, 11 Oct 2023 at 15:52, Rob Herring <robh+dt@kernel.org> wrote:
>
> On Wed, Oct 11, 2023 at 6:27 AM Dmitry Baryshkov
> <dmitry.baryshkov@linaro.org> wrote:
> >
> > The qcom-cpufreq-nvmem module uses of_find_next_cache_node() function,
> > so export it to be available to the modules.
>
> You really should be using the cacheinfo API which has already parsed
> the cache nodes.
>
> Also, why do you need a platform_device? I don't see a driver.
> cacheinfo already creates a struct device, so kind of weird to have 2
> devices.

The driver is pending as a part of the series at [1]. We need to scale
the L2 supplies and clock frequency following the core frequency
changes.

[1] https://lore.kernel.org/linux-arm-msm/20230827115033.935089-9-dmitry.baryshkov@linaro.org/

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] of: export of_find_next_cache_node() for modules
  2023-10-11 12:59   ` Dmitry Baryshkov
@ 2023-10-16  3:23     ` Viresh Kumar
  2023-10-16  4:21       ` Dmitry Baryshkov
  0 siblings, 1 reply; 6+ messages in thread
From: Viresh Kumar @ 2023-10-16  3:23 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Rob Herring, Frank Rowand, Ilia Lin, Rafael J. Wysocki,
	devicetree, linux-kernel, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, linux-arm-msm, linux-pm

On 11-10-23, 15:59, Dmitry Baryshkov wrote:
> On Wed, 11 Oct 2023 at 15:52, Rob Herring <robh+dt@kernel.org> wrote:
> >
> > On Wed, Oct 11, 2023 at 6:27 AM Dmitry Baryshkov
> > <dmitry.baryshkov@linaro.org> wrote:
> > >
> > > The qcom-cpufreq-nvmem module uses of_find_next_cache_node() function,
> > > so export it to be available to the modules.
> >
> > You really should be using the cacheinfo API which has already parsed
> > the cache nodes.
> >
> > Also, why do you need a platform_device? I don't see a driver.
> > cacheinfo already creates a struct device, so kind of weird to have 2
> > devices.
> 
> The driver is pending as a part of the series at [1]. We need to scale
> the L2 supplies and clock frequency following the core frequency
> changes.

Guys, can we please resolve this soon ? I had to revert the patches
for the time being to avoid these failures.

-- 
viresh

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] of: export of_find_next_cache_node() for modules
  2023-10-16  3:23     ` Viresh Kumar
@ 2023-10-16  4:21       ` Dmitry Baryshkov
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Baryshkov @ 2023-10-16  4:21 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Rob Herring, Frank Rowand, Ilia Lin, Rafael J. Wysocki,
	devicetree, linux-kernel, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, linux-arm-msm, linux-pm

On Mon, 16 Oct 2023 at 06:24, Viresh Kumar <viresh.kumar@linaro.org> wrote:
>
> On 11-10-23, 15:59, Dmitry Baryshkov wrote:
> > On Wed, 11 Oct 2023 at 15:52, Rob Herring <robh+dt@kernel.org> wrote:
> > >
> > > On Wed, Oct 11, 2023 at 6:27 AM Dmitry Baryshkov
> > > <dmitry.baryshkov@linaro.org> wrote:
> > > >
> > > > The qcom-cpufreq-nvmem module uses of_find_next_cache_node() function,
> > > > so export it to be available to the modules.
> > >
> > > You really should be using the cacheinfo API which has already parsed
> > > the cache nodes.
> > >
> > > Also, why do you need a platform_device? I don't see a driver.
> > > cacheinfo already creates a struct device, so kind of weird to have 2
> > > devices.
> >
> > The driver is pending as a part of the series at [1]. We need to scale
> > the L2 supplies and clock frequency following the core frequency
> > changes.
>
> Guys, can we please resolve this soon ? I had to revert the patches
> for the time being to avoid these failures.

Rob pointed out that I should rework my code to use the cacheinfo
device for the L2 cache. This means that L2 device population should
be dropped from cpufreq. I'll post newer series as soon as I finish
the implementation.

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-10-16  4:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-11 11:27 [PATCH] of: export of_find_next_cache_node() for modules Dmitry Baryshkov
2023-10-11 11:30 ` Konrad Dybcio
2023-10-11 12:52 ` Rob Herring
2023-10-11 12:59   ` Dmitry Baryshkov
2023-10-16  3:23     ` Viresh Kumar
2023-10-16  4:21       ` Dmitry Baryshkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®