From: Jon Hunter <jonathanh@nvidia.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Stephen Boyd <sboyd@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
Michael Turquette <mturquette@baylibre.com>,
Peter De Schrijver <pdeschrijver@nvidia.com>,
Prashant Gaikwad <pgaikwad@nvidia.com>,
Dmitry Osipenko <digetx@gmail.com>,
Aapo Vienamo <avienamo@nvidia.com>, <linux-clk@vger.kernel.org>,
<linux-tegra@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] clk: tegra: fix SMP build
Date: Wed, 12 Dec 2018 17:20:35 +0000 [thread overview]
Message-ID: <583c04aa-7939-7401-b4e1-99bb6afe1485@nvidia.com> (raw)
In-Reply-To: <20181212133127.GB28521@ulmo>
On 12/12/2018 13:31, Thierry Reding wrote:
> On Wed, Dec 12, 2018 at 11:47:32AM +0000, Jon Hunter wrote:
>>
>> On 11/12/2018 17:21, Stephen Boyd wrote:
>>> Quoting Arnd Bergmann (2018-12-11 06:35:07)
>>>> When CONFIG_SMP is disabled, the tegra clk driver now fails to build:
>>>>
>>>> drivers/clk/tegra/clk-tegra30.c: In function 'tegra30_cpu_rail_off_ready':
>>>> drivers/clk/tegra/clk-tegra30.c:1151:19: error: implicit declaration of function 'tegra_pmc_cpu_is_powered'; did you mean 'tegra_powergate_is_powered'? [-Werror=implicit-function-declaration]
>>>> cpu_pwr_status = tegra_pmc_cpu_is_powered(1) ||
>>>>
>>>> I don't know if tegra works without CONFIG_SMP, but we can get it to
>>>> build by making the calls conditional, and removing the pointless
>>>> ifdef around the declaration. The assumption now is that in a
>>>> non-SMP system, the secondary CPUs are always disabled.
>>>>
>>>> Fixes: 61866523ed6e ("clk: tegra30: Use Tegra CPU powergate helper function")
>>>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>>>> ---
>>>> Not sure if this is the best solution. If you think it's not, please
>>>> submit a different fix.
>>>
>>> Hmm.. Is there any reason why the implementation of
>>> tegra_pmc_cpu_is_powered() is under an ifdef CONFIG_SMP? I'd rather not
>>> have to think about SMP or not in this clk code and have the
>>> tegra_pmc_cpu_is_powered() function do the UP vs SMP code optimization.
>>
>> Not that I know of. I just think that the function should/would not be
>> used for non-SMP.
>>
>> I was actually thinking that we could just leave the clk code as it is
>> and simply drop the CONFIG_SMP from pmc.h. That would be fine with me.
>
> Yeah, I'd be fine keeping that code around whether or not we enable SMP.
> Chances are people won't disable it anyway. If they do, then most likely
> only for testing purposes, in which case I'm sure they won't mind the
> extra couple of bytes.
>
> I think if we remove CONFIG_SMP from pmc.h we also need to remove it
> from drivers/soc/tegra/pmc.c to make sure these functions are available,
> otherwise we'll likely run into linker errors.
>
> Jon, is that something I can interest you in? If not, I can easily do
> that myself.
Yes I can do it (tomorrow).
Cheers
Jon
--
nvpublic
prev parent reply other threads:[~2018-12-12 17:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-11 14:35 [PATCH] clk: tegra: fix SMP build Arnd Bergmann
2018-12-11 17:21 ` Stephen Boyd
2018-12-12 11:47 ` Jon Hunter
2018-12-12 13:31 ` Thierry Reding
2018-12-12 17:20 ` Jon Hunter [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=583c04aa-7939-7401-b4e1-99bb6afe1485@nvidia.com \
--to=jonathanh@nvidia.com \
--cc=arnd@arndb.de \
--cc=avienamo@nvidia.com \
--cc=digetx@gmail.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=pdeschrijver@nvidia.com \
--cc=pgaikwad@nvidia.com \
--cc=sboyd@kernel.org \
--cc=thierry.reding@gmail.com \
/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