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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 12 Aug 2021 04:40:04 +0300
From:   Dmitry Osipenko <digetx@...il.com>
To:     Ulf Hansson <ulf.hansson@...aro.org>
Cc:     Thierry Reding <thierry.reding@...il.com>,
        Jonathan Hunter <jonathanh@...dia.com>,
        Viresh Kumar <vireshk@...nel.org>,
        Stephen Boyd <sboyd@...nel.org>,
        Peter De Schrijver <pdeschrijver@...dia.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-tegra <linux-tegra@...r.kernel.org>,
        Linux PM <linux-pm@...r.kernel.org>
Subject: Re: [PATCH v7 02/37] soc/tegra: pmc: Implement attach_dev() of power
 domain drivers

12.08.2021 01:41, Dmitry Osipenko пишет:
>>> I am not saying you should change the clock rate. The current code
>>> path that runs via devm_tegra_core_dev_init_opp_table() just calls
>>> clk_get_rate and then dev_pm_opp_set_rate() with the current rate to
>>> vote for the corresponding OPP level. Right?
>>>
>>> Isn't this exactly what you want? No?
>> I see now what you meant, it's actually a simpler variant and it works
>> too. Thank you for the suggestion, I'll prepare v8.
>>
> My bad, it doesn't work at all. I actually need to use the rpm_pstate or
> something else because performance state is coupled with the enable
> state of the device. If device is never rpm-suspended by consumer
> driver, then the initialized performance state is never dropped. Hence I
> want to initialize the state which is set only when device is resumed.
> 
> I'll need to think more about it.

GENPD core has these false assumptions:

1. It assumes that by default all devices are at zero performance level
at a boot time. This is not true for Tegra because hardware is
pre-initialized independently from GENPD.

2. It assumes that nothing depends on performance level and devices can
operate at any level at any time. Not true for Tegra and other platforms
where performance level is coupled with clocks state of attached
devices. OPP framework glues clock and performance level together for
us, which works good so far.

Hence I either need to patch every driver to use dev_pm_opp_set_rate in
order to sync clk rate with the perf level at device runtime, or I need
to preset the rpm perf level to allow GENPD core to set the level before
device is resumed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ