[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230711060103.al3qpticc53qy4mp@vireshk-i7>
Date: Tue, 11 Jul 2023 11:31:03 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Randy Dunlap <rdunlap@...radead.org>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>,
linux-kernel@...r.kernel.org,
"Rafael J. Wysocki" <rafael@...nel.org>,
sparclinux <sparclinux@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>
Subject: Re: Build regressions/improvements in v6.5-rc1 (cpufreq/sparc*)
On 10-07-23, 22:33, Randy Dunlap wrote:
> Hi--
>
> On 7/10/23 03:00, Geert Uytterhoeven wrote:
> > Below is the list of build error/warning regressions/improvements in
> > v6.5-rc1[1] compared to v6.4[2].
> >
> > Summarized:
> > - build errors: +3/-4
> > - build warnings: +36/-18
> >
> > Note that there may be false regressions, as some logs are incomplete.
> > Still, they're build errors/warnings.
> >
> > Happy fixing! ;-)
> >
> > Thanks to the linux-next team for providing the build service.
> >
> > [1] http://kisskb.ellerman.id.au/kisskb/branch/linus/head/06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5/ (all 162 configs)
> > [2] http://kisskb.ellerman.id.au/kisskb/branch/linus/head/6995e2de6891c724bfeb2db33d7b87775f913ad1/ (160 out of 162 configs)
> >
> >
> > *** WARNINGS ***
> >
> > 36 warning regressions:
>
> > + modpost: WARNING: modpost: drivers/cpufreq/sparc-us2e-cpufreq: section mismatch in reference: cpufreq_us2e_driver+0x20 (section: .data) -> us2e_freq_cpu_init (section: .init.text): => N/A
> > + modpost: WARNING: modpost: drivers/cpufreq/sparc-us3-cpufreq: section mismatch in reference: cpufreq_us3_driver+0x20 (section: .data) -> us3_freq_cpu_init (section: .init.text): => N/A
>
> The way that I read this is that these __init functions (us2e_freq_cpu_init and us3_freq_cpu_init)
> should not be marked as __init since they can be called at any time by exercising the CPU hotplug
> code path.
I have prepared a patch for this, waiting for some builds to finish
before sending it.
--
viresh
Subject: [PATCH] cpufreq: sparc: Don't mark cpufreq callbacks with __init
These callbacks can be called again by the cpufreq core after the driver
is initialized and must be kept around. We currently get section
mismatch build warnings.
Don't mark them with __init.
Fixes: dcfce7c2cee4 ("cpufreq: sparc: Don't allocate cpufreq_driver dynamically")
Reported-by: Geert Uytterhoeven <geert@...ux-m68k.org>
Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
---
drivers/cpufreq/sparc-us2e-cpufreq.c | 2 +-
drivers/cpufreq/sparc-us3-cpufreq.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/cpufreq/sparc-us2e-cpufreq.c b/drivers/cpufreq/sparc-us2e-cpufreq.c
index d3510cfdb3eb..2783d3d55fce 100644
--- a/drivers/cpufreq/sparc-us2e-cpufreq.c
+++ b/drivers/cpufreq/sparc-us2e-cpufreq.c
@@ -269,7 +269,7 @@ static int us2e_freq_target(struct cpufreq_policy *policy, unsigned int index)
return smp_call_function_single(cpu, __us2e_freq_target, &index, 1);
}
-static int __init us2e_freq_cpu_init(struct cpufreq_policy *policy)
+static int us2e_freq_cpu_init(struct cpufreq_policy *policy)
{
unsigned int cpu = policy->cpu;
unsigned long clock_tick = sparc64_get_clock_tick(cpu) / 1000;
diff --git a/drivers/cpufreq/sparc-us3-cpufreq.c b/drivers/cpufreq/sparc-us3-cpufreq.c
index 91d1ed558136..6c3657679a88 100644
--- a/drivers/cpufreq/sparc-us3-cpufreq.c
+++ b/drivers/cpufreq/sparc-us3-cpufreq.c
@@ -117,7 +117,7 @@ static int us3_freq_target(struct cpufreq_policy *policy, unsigned int index)
return smp_call_function_single(cpu, update_safari_cfg, &new_bits, 1);
}
-static int __init us3_freq_cpu_init(struct cpufreq_policy *policy)
+static int us3_freq_cpu_init(struct cpufreq_policy *policy)
{
unsigned int cpu = policy->cpu;
unsigned long clock_tick = sparc64_get_clock_tick(cpu) / 1000;
Powered by blists - more mailing lists