From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Viresh Kumar <viresh.kumar@linaro.org>, Arnd Bergmann <arnd@arndb.de>
Cc: Ilia Lin <ilialin@codeaurora.org>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cpufreq: kryo: allow building as a loadable module
Date: Tue, 12 Jun 2018 17:02:30 +0200 [thread overview]
Message-ID: <3261365.2LNNG94y3I@aspire.rjw.lan> (raw)
In-Reply-To: <20180606040929.tksvznlmb3ogtgur@vireshk-i7>
On Wednesday, June 6, 2018 6:09:29 AM CEST Viresh Kumar wrote:
> On 05-06-18, 13:44, Arnd Bergmann wrote:
> > Building the kryo cpufreq driver while QCOM_SMEM is a loadable module
> > results in a link error:
> >
> > drivers/cpufreq/qcom-cpufreq-kryo.o: In function `qcom_cpufreq_kryo_probe':
> > qcom-cpufreq-kryo.c:(.text+0xbc): undefined reference to `qcom_smem_get'
> >
> > The problem is that Kconfig ignores interprets the dependency as met
> > when the dependent symbol is a 'bool' one. By making it 'tristate',
> > it will be forced to be a module here, which builds successfully.
> >
> > Fixes: 46e2856b8e18 ("cpufreq: Add Kryo CPU scaling driver")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> > drivers/cpufreq/Kconfig.arm | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
> > index c7ce928fbf1f..52f5f1a2040c 100644
> > --- a/drivers/cpufreq/Kconfig.arm
> > +++ b/drivers/cpufreq/Kconfig.arm
> > @@ -125,7 +125,7 @@ config ARM_OMAP2PLUS_CPUFREQ
> > default ARCH_OMAP2PLUS
> >
> > config ARM_QCOM_CPUFREQ_KRYO
> > - bool "Qualcomm Kryo based CPUFreq"
> > + tristate "Qualcomm Kryo based CPUFreq"
> > depends on ARM64
> > depends on QCOM_QFPROM
> > depends on QCOM_SMEM
>
> Okay, so we really need this to be a module. But the driver can't really work as
> a module right now if we do this: insmod, rmmod, insmod. Because it doesn't free
> resources at rmmmod and will fail on second insmod.
>
> Because what you are fixing is a critical build error, we better get it merged
> right now.
>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Patch applied, thanks!
prev parent reply other threads:[~2018-06-12 15:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-05 11:44 [PATCH] cpufreq: kryo: allow building as a loadable module Arnd Bergmann
2018-06-06 4:09 ` Viresh Kumar
2018-06-06 4:44 ` Ilia Lin
2018-06-12 15:02 ` Rafael J. Wysocki [this message]
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=3261365.2LNNG94y3I@aspire.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=arnd@arndb.de \
--cc=ilialin@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=viresh.kumar@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox