1. 15 Feb, 2023 2 commits
    • Bagas Sanjaya's avatar
      Documentation: amd-pstate: disambiguate user space sections · 73dd3206
      Bagas Sanjaya authored
      kernel test robot reported htmldocs warning:
      
      Documentation/admin-guide/pm/amd-pstate.rst:343: WARNING: duplicate label admin-guide/pm/amd-pstate:user space interface in ``sysfs``, other instance in Documentation/admin-guide/pm/amd-pstate.rst
      
      The documentation contains two sections with the same "User Space Interface
      in ``sysfs``" title. The first one deals with per-policy sysfs and the
      second one is about general attributes (currently only global attributes
      are documented).
      
      Disambiguate title text of both sections to fix the warning.
      
      Link: https://lore.kernel.org/linux-doc/202302151041.0SWs1RHK-lkp@intel.com/
      Fixes: b9e6a2d4 ("Documentation: amd-pstate: introduce new global sysfs attributes")
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Signed-off-by: default avatarBagas Sanjaya <bagasdotme@gmail.com>
      Reviewed-by: default avatarWyes Karny <wyes.karny@amd.com>
      Acked-by: default avatarHuang Rui <ray.huang@amd.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      73dd3206
    • Wyes Karny's avatar
      cpufreq: amd-pstate: Fix invalid write to MSR_AMD_CPPC_REQ · 6e9d1212
      Wyes Karny authored
      `amd_pstate_set_epp` function uses `cppc_req_cached` and `epp` variable
      to update the MSR_AMD_CPPC_REQ register for AMD MSR systems. The recent
      commit 7cca9a98 ("cpufreq: amd-pstate: avoid uninitialized variable
      use") changed the sequence of updating cppc_req_cached and writing the
      MSR_AMD_CPPC_REQ. Therefore while switching from powersave to
      performance governor and vice-versa in active mode MSR_AMD_CPPC_REQ is
      set with the previous cached value. To fix this: first update the
      `cppc_req_cached` variable and then call `amd_pstate_set_epp` function.
      
       - Before commit 7cca9a98 ("cpufreq: amd-pstate: avoid uninitialized
         variable use"):
      
      With powersave governor:
      [    1.652743] amd_pstate_epp_init: writing to cppc_req_cached = 0x1eff
      [    1.652744] amd_pstate_set_epp: writing cppc_req_cached = 0x1eff
      [    1.652746] amd_pstate_set_epp: writing min_perf = 30, des_perf = 0, max_perf = 255, epp = 0
      
      Changing to performance governor:
      [  300.493842] amd_pstate_epp_init: writing to cppc_req_cached = 0xffff
      [  300.493846] amd_pstate_set_epp: writing cppc_req_cached = 0xffff
      [  300.493847] amd_pstate_set_epp: writing min_perf = 255, des_perf = 0, max_perf = 255, epp = 0
      
       - After commit 7cca9a98 ("cpufreq: amd-pstate: avoid uninitialized
         variable use"):
      
      With powersave governor:
      [    1.646037] amd_pstate_set_epp: writing cppc_req_cached = 0xffff
      [    1.646038] amd_pstate_set_epp: writing min_perf = 255, des_perf = 0, max_perf = 255, epp = 0
      [    1.646042] amd_pstate_epp_init: writing to cppc_req_cached = 0x1eff
      
      Changing to performance governor:
      [  687.117401] amd_pstate_set_epp: writing cppc_req_cached = 0x1eff
      [  687.117405] amd_pstate_set_epp: writing min_perf = 30, des_perf = 0, max_perf = 255, epp = 0
      [  687.117419] amd_pstate_epp_init: writing to cppc_req_cached = 0xffff
      
       - After this fix:
      
      With powersave governor:
      [    2.525717] amd_pstate_epp_init: writing to cppc_req_cached = 0x1eff
      [    2.525720] amd_pstate_set_epp: writing cppc_req_cached = 0x1eff
      [    2.525722] amd_pstate_set_epp: writing min_perf = 30, des_perf = 0, max_perf = 255, epp = 0
      
      Changing to performance governor:
      [ 3440.152468] amd_pstate_epp_init: writing to cppc_req_cached = 0xffff
      [ 3440.152473] amd_pstate_set_epp: writing cppc_req_cached = 0xffff
      [ 3440.152474] amd_pstate_set_epp: writing min_perf = 255, des_perf = 0, max_perf = 255, epp = 0
      
      Fixes: 7cca9a98 ("cpufreq: amd-pstate: avoid uninitialized variable use")
      Signed-off-by: default avatarWyes Karny <wyes.karny@amd.com>
      Acked-by: default avatarHuang Rui <ray.huang@amd.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      6e9d1212
  2. 14 Feb, 2023 6 commits
  3. 13 Feb, 2023 1 commit
  4. 12 Feb, 2023 10 commits
  5. 11 Feb, 2023 5 commits
  6. 10 Feb, 2023 16 commits