diff options
| author | Bean Huo <beanhuo@micron.com> | 2026-09-07 21:21:40 +0200 |
|---|---|---|
| committer | Martin K. Petersen (Oracle) <mkp@kernel.org> | 2026-09-09 22:26:51 -0400 |
| commit | 55ad5deeea922ea854086b70e41415f50e2987ea (patch) | |
| tree | 720f0b1bb6a9c1edc059f53f4c949e8ba9ee2efb /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | 20ae446921e78e4e0182cea7559d34d839550e66 (diff) | |
| download | linux-next-55ad5deeea922ea854086b70e41415f50e2987ea.tar.gz linux-next-55ad5deeea922ea854086b70e41415f50e2987ea.zip | |
scsi: ufs: core: Report the current clock frequency to devfreq
When a driver does not provide a ->get_cur_freq() callback, the cur_freq
sysfs attribute shows devfreq->previous_freq, which only tracks the scaling
that the governor itself did.
The UFS controller is also scaled outside the governor. The clearest
example is writing 0 to clkscale_enable: ufshcd_clkscale_enable_store()
sets the clocks to max_freq through ufshcd_devfreq_scale() and suspends the
governor, so devfreq_set_target() is never called. After that, cur_freq
keeps showing the last frequency the governor chose instead of the one the
controller runs at, and it does so as long as clock scaling stays disabled.
Add ufshcd_devfreq_get_cur_freq(). It reports clk_scaling.target_freq when
OPPs are used and the first clock's curr_freq otherwise, the same values
that ufshcd_devfreq_get_dev_status() reports.
Signed-off-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Avri Altman <avri.altman@sandisk.com>
Reviewed-by: Stanley Jhu <stanleyjhu@google.com>
Link: https://patch.msgid.link/20260907192140.2701755-5-beanhuo@iokpp.de
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions
