summaryrefslogtreecommitdiff
path: root/drivers/telephony/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorGautham R. Shenoy <gautham.shenoy@amd.com>2026-03-26 17:17:53 +0530
committerMario Limonciello (AMD) <superm1@kernel.org>2026-04-02 11:28:40 -0500
commit3b90e5a4176acacc6781b9ac84cdc5ac53671eee (patch)
treec2c9bc8943f27e7dfd2b4df8619d8e872c0de9e7 /drivers/telephony/git@git.tavy.me:linux.git
parentc6a2b750de13db9103db29c64927bec3919232b5 (diff)
amd-pstate-ut: Add a testcase to validate the visibility of driver attributes
amd-pstate driver has per-attribute visibility functions to dynamically control which sysfs freq_attrs are exposed based on the platform capabilities and the current amd_pstate mode. However, there is no test coverage to validate that the driver's live attribute list matches the expected visibility for each mode. Add amd_pstate_ut_check_freq_attrs() to the amd-pstate unit test module. For each enabled mode (passive, active, guided), the test independently derives the expected visibility of each attribute: - Core attributes (max_freq, lowest_nonlinear_freq, highest_perf) are always expected. - Prefcore attributes (prefcore_ranking, hw_prefcore) are expected only when cpudata->hw_prefcore indicates platform support. - EPP attributes (energy_performance_preference, energy_performance_available_preferences) are expected only in active mode. - Floor frequency attributes (floor_freq, floor_count) are expected only when X86_FEATURE_CPPC_PERF_PRIO is present. Compare these independent expectations against the live driver's attr array, catching bugs such as attributes leaking into wrong modes or visibility functions checking incorrect conditions. Signed-off-by: Gautham R. Shenoy <gautham.shenoy@amd.com> Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Diffstat (limited to 'drivers/telephony/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions