LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] cpufreq: qcom-cpufreq-hw: Fix 'make allmodconfig' build
@ 2021-08-22 20:10 Valdis Klētnieks
  2021-08-22 21:08 ` Randy Dunlap
  0 siblings, 1 reply; 6+ messages in thread
From: Valdis Klētnieks @ 2021-08-22 20:10 UTC (permalink / raw)
  To: Thara Gopinath, Greg Kroah-Hartman; +Cc: Sudeep Holla, linux-kernel

Commit 86afc1df661a adds a reference to a symbol that doesn't have an
EXPORT_SYMBOL, which fails if qcom-cpufreq-hw is built as a module.

ERROR: modpost: "topology_set_thermal_pressure" [drivers/cpufreq/qcom-cpufreq-hw.ko] undefined!

Add the missing EXPORT_SYMBOL.

Fixes: 86afc1df661a ("cpufreq: qcom-cpufreq-hw: Add dcvs interrupt support")
Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
---
diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
index 921312a8d957..fbc39ca67124 100644
--- a/drivers/base/arch_topology.c
+++ b/drivers/base/arch_topology.c
@@ -165,6 +165,7 @@ void topology_set_thermal_pressure(const struct cpumask *cpus,
 	for_each_cpu(cpu, cpus)
 		WRITE_ONCE(per_cpu(thermal_pressure, cpu), th_pressure);
 }
+EXPORT_SYMBOL(topology_set_thermal_pressure);
 
 static ssize_t cpu_capacity_show(struct device *dev,
 				 struct device_attribute *attr,


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

* Re: [PATCH] cpufreq: qcom-cpufreq-hw: Fix 'make allmodconfig' build
  2021-08-22 20:10 [PATCH] cpufreq: qcom-cpufreq-hw: Fix 'make allmodconfig' build Valdis Klētnieks
@ 2021-08-22 21:08 ` Randy Dunlap
  2021-08-22 21:14   ` Valdis Klētnieks
  0 siblings, 1 reply; 6+ messages in thread
From: Randy Dunlap @ 2021-08-22 21:08 UTC (permalink / raw)
  To: Valdis Klētnieks, Thara Gopinath, Greg Kroah-Hartman
  Cc: Sudeep Holla, linux-kernel

On 8/22/21 1:10 PM, Valdis Klētnieks wrote:
> Commit 86afc1df661a adds a reference to a symbol that doesn't have an
> EXPORT_SYMBOL, which fails if qcom-cpufreq-hw is built as a module.
> 
> ERROR: modpost: "topology_set_thermal_pressure" [drivers/cpufreq/qcom-cpufreq-hw.ko] undefined!
> 
> Add the missing EXPORT_SYMBOL.
> 
> Fixes: 86afc1df661a ("cpufreq: qcom-cpufreq-hw: Add dcvs interrupt support")
> Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
> ---
> diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
> index 921312a8d957..fbc39ca67124 100644
> --- a/drivers/base/arch_topology.c
> +++ b/drivers/base/arch_topology.c
> @@ -165,6 +165,7 @@ void topology_set_thermal_pressure(const struct cpumask *cpus,
>   	for_each_cpu(cpu, cpus)
>   		WRITE_ONCE(per_cpu(thermal_pressure, cpu), th_pressure);
>   }
> +EXPORT_SYMBOL(topology_set_thermal_pressure);
>   
>   static ssize_t cpu_capacity_show(struct device *dev,
>   				 struct device_attribute *attr,
> 

Hi Valdis,

This fixes one build error for me but I am still seeing another one:

ERROR: modpost: "cpu_scale" [drivers/cpufreq/qcom-cpufreq-hw.ko] undefined!

thanks.
-- 
~Randy


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

* Re: [PATCH] cpufreq: qcom-cpufreq-hw: Fix 'make allmodconfig' build
  2021-08-22 21:08 ` Randy Dunlap
@ 2021-08-22 21:14   ` Valdis Klētnieks
  2021-08-24  9:14     ` SeongJae Park
  0 siblings, 1 reply; 6+ messages in thread
From: Valdis Klētnieks @ 2021-08-22 21:14 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Thara Gopinath, Greg Kroah-Hartman, Sudeep Holla, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 270 bytes --]

On Sun, 22 Aug 2021 14:08:08 -0700, Randy Dunlap said:

> This fixes one build error for me but I am still seeing another one:
>
> ERROR: modpost: "cpu_scale" [drivers/cpufreq/qcom-cpufreq-hw.ko] undefined!

That's a different patch, am working on fixing that one now..

[-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --]

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

* Re: [PATCH] cpufreq: qcom-cpufreq-hw: Fix 'make allmodconfig' build
  2021-08-22 21:14   ` Valdis Klētnieks
@ 2021-08-24  9:14     ` SeongJae Park
  2021-08-25  2:16       ` Valdis Klētnieks
  0 siblings, 1 reply; 6+ messages in thread
From: SeongJae Park @ 2021-08-24  9:14 UTC (permalink / raw)
  To: Valdis Klētnieks
  Cc: Randy Dunlap, Thara Gopinath, Greg Kroah-Hartman, Sudeep Holla,
	linux-kernel

Hi,

On Sun, 22 Aug 2021 17:14:04 -0400 "Valdis Klētnieks" <valdis.kletnieks@vt.edu> wrote:

> 
> [-- Attachment #1: Type: text/plain, Size: 270 bytes --]
> 
> On Sun, 22 Aug 2021 14:08:08 -0700, Randy Dunlap said:
> 
> > This fixes one build error for me but I am still seeing another one:
> >
> > ERROR: modpost: "cpu_scale" [drivers/cpufreq/qcom-cpufreq-hw.ko] undefined!
> 
> That's a different patch, am working on fixing that one now..

I didn't take a deep look here, so I unsure if this is an appropriate fix, but
I was able to work-around this issue for my use case with below change.

```
--- a/drivers/base/arch_topology.c
+++ b/drivers/base/arch_topology.c
@@ -149,6 +149,7 @@ void topology_set_freq_scale(const struct cpumask *cpus, unsigned long cur_freq,
 }

 DEFINE_PER_CPU(unsigned long, cpu_scale) = SCHED_CAPACITY_SCALE;
+EXPORT_PER_CPU_SYMBOL_GPL(cpu_scale);

 void topology_set_cpu_scale(unsigned int cpu, unsigned long capacity)
 {
```


Thanks,
SJ

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

* Re: [PATCH] cpufreq: qcom-cpufreq-hw: Fix 'make allmodconfig' build
  2021-08-24  9:14     ` SeongJae Park
@ 2021-08-25  2:16       ` Valdis Klētnieks
  2021-08-25  4:41         ` SeongJae Park
  0 siblings, 1 reply; 6+ messages in thread
From: Valdis Klētnieks @ 2021-08-25  2:16 UTC (permalink / raw)
  To: SeongJae Park
  Cc: Randy Dunlap, Thara Gopinath, Greg Kroah-Hartman, Sudeep Holla,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 611 bytes --]

On Tue, 24 Aug 2021 09:14:30 -0000, SeongJae Park said:

> > > ERROR: modpost: "cpu_scale" [drivers/cpufreq/qcom-cpufreq-hw.ko] undefined!
> >
> > That's a different patch, am working on fixing that one now..
>
> I didn't take a deep look here, so I unsure if this is an appropriate fix, but
> I was able to work-around this issue for my use case with below change.
>

>  DEFINE_PER_CPU(unsigned long, cpu_scale) = SCHED_CAPACITY_SCALE;
> +EXPORT_PER_CPU_SYMBOL_GPL(cpu_scale);

Aha.  That's the part I wasn't finding.  Would you like to submit your patch,
or shall I send it in with a "Suggested-by" for you?


[-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --]

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

* Re: [PATCH] cpufreq: qcom-cpufreq-hw: Fix 'make allmodconfig' build
  2021-08-25  2:16       ` Valdis Klētnieks
@ 2021-08-25  4:41         ` SeongJae Park
  0 siblings, 0 replies; 6+ messages in thread
From: SeongJae Park @ 2021-08-25  4:41 UTC (permalink / raw)
  To: Valdis Klētnieks
  Cc: SeongJae Park, Randy Dunlap, Thara Gopinath, Greg Kroah-Hartman,
	Sudeep Holla, linux-kernel

From: SeongJae Park <sjpark@amazon.de>

On Tue, 24 Aug 2021 22:16:04 -0400 "Valdis Klētnieks" <valdis.kletnieks@vt.edu> wrote:

> On Tue, 24 Aug 2021 09:14:30 -0000, SeongJae Park said:
> 
> > > > ERROR: modpost: "cpu_scale" [drivers/cpufreq/qcom-cpufreq-hw.ko] undefined!
> > >
> > > That's a different patch, am working on fixing that one now..
> >
> > I didn't take a deep look here, so I unsure if this is an appropriate fix, but
> > I was able to work-around this issue for my use case with below change.
> >
> 
> >  DEFINE_PER_CPU(unsigned long, cpu_scale) = SCHED_CAPACITY_SCALE;
> > +EXPORT_PER_CPU_SYMBOL_GPL(cpu_scale);
> 
> Aha.  That's the part I wasn't finding.  Would you like to submit your patch,
> or shall I send it in with a "Suggested-by" for you?

I'd prefer 'Suggested-by', as I didn't take a deep look here.

Suggested-by: SeongJae Park <sjpark@amazon.de>


Thanks,
SJ

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

end of thread, other threads:[~2021-08-25  4:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-22 20:10 [PATCH] cpufreq: qcom-cpufreq-hw: Fix 'make allmodconfig' build Valdis Klētnieks
2021-08-22 21:08 ` Randy Dunlap
2021-08-22 21:14   ` Valdis Klētnieks
2021-08-24  9:14     ` SeongJae Park
2021-08-25  2:16       ` Valdis Klētnieks
2021-08-25  4:41         ` SeongJae Park

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).