lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 12 Dec 2018 11:47:32 +0000
From:   Jon Hunter <jonathanh@...dia.com>
To:     Stephen Boyd <sboyd@...nel.org>, Arnd Bergmann <arnd@...db.de>,
        Michael Turquette <mturquette@...libre.com>,
        Peter De Schrijver <pdeschrijver@...dia.com>,
        Prashant Gaikwad <pgaikwad@...dia.com>
CC:     Thierry Reding <thierry.reding@...il.com>,
        Dmitry Osipenko <digetx@...il.com>,
        Aapo Vienamo <avienamo@...dia.com>,
        <linux-clk@...r.kernel.org>, <linux-tegra@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] clk: tegra: fix SMP build


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@...db.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.

Cheers
Jon

-- 
nvpublic

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ