Commit 787025a4 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge tag 'amd-pstate-v6.11-2024-06-24' of...

Merge tag 'amd-pstate-v6.11-2024-06-24' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux

Merge the second round of changes for amd-pstate in 6.11 from Mario
Limonciello:

"* Enables amd-pstate by default in "shared memory" designs without
   a dedicated MSR.
 * Adds extra infrastructure for debugging problems.
 * Bug fixes found for init/unload failure."

* tag 'amd-pstate-v6.11-2024-06-24' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux:
  cpufreq: simplify boolean parsing with kstrtobool in store function
  cpufreq: amd-pstate: Don't create attributes when registration fails
  cpufreq: amd-pstate: Make amd-pstate unit tests depend on amd-pstate
  cpufreq/amd-pstate: fix setting policy current frequency value
  cpufreq: amd-pstate: auto-load pstate driver by default
  cpufreq: amd-pstate: enable shared memory type CPPC by default
  cpufreq: amd-pstate: switch boot_cpu_has() to cpu_feature_enabled()
  Documentation: PM: amd-pstate: add guided mode to the Operation mode
  cpufreq: amd-pstate: add debug message while CPPC is supported and disabled by SBIOS
  cpufreq: amd-pstate: show CPPC debug message if CPPC is not supported
  cpufreq: amd-pstate: remove unused variable nominal_freq
  cpufreq: amd-pstate: optimize the initial frequency values verification
  cpufreq: amd-pstate: Allow users to write 'default' EPP string
parents 5e62d53c 2240d3e6
...@@ -406,7 +406,7 @@ control its functionality at the system level. They are located in the ...@@ -406,7 +406,7 @@ control its functionality at the system level. They are located in the
``/sys/devices/system/cpu/amd_pstate/`` directory and affect all CPUs. ``/sys/devices/system/cpu/amd_pstate/`` directory and affect all CPUs.
``status`` ``status``
Operation mode of the driver: "active", "passive" or "disable". Operation mode of the driver: "active", "passive", "guided" or "disable".
"active" "active"
The driver is functional and in the ``active mode`` The driver is functional and in the ``active mode``
......
...@@ -71,6 +71,7 @@ config X86_AMD_PSTATE_DEFAULT_MODE ...@@ -71,6 +71,7 @@ config X86_AMD_PSTATE_DEFAULT_MODE
config X86_AMD_PSTATE_UT config X86_AMD_PSTATE_UT
tristate "selftest for AMD Processor P-State driver" tristate "selftest for AMD Processor P-State driver"
depends on X86 && ACPI_PROCESSOR depends on X86 && ACPI_PROCESSOR
depends on X86_AMD_PSTATE
default n default n
help help
This kernel module is used for testing. It's safe to say M here. This kernel module is used for testing. It's safe to say M here.
......
This diff is collapsed.
...@@ -99,6 +99,7 @@ struct amd_cpudata { ...@@ -99,6 +99,7 @@ struct amd_cpudata {
u32 policy; u32 policy;
u64 cppc_cap1_cached; u64 cppc_cap1_cached;
bool suspended; bool suspended;
s16 epp_default;
}; };
#endif /* _LINUX_AMD_PSTATE_H */ #endif /* _LINUX_AMD_PSTATE_H */
...@@ -614,10 +614,9 @@ static ssize_t show_boost(struct kobject *kobj, ...@@ -614,10 +614,9 @@ static ssize_t show_boost(struct kobject *kobj,
static ssize_t store_boost(struct kobject *kobj, struct kobj_attribute *attr, static ssize_t store_boost(struct kobject *kobj, struct kobj_attribute *attr,
const char *buf, size_t count) const char *buf, size_t count)
{ {
int ret, enable; bool enable;
ret = sscanf(buf, "%d", &enable); if (kstrtobool(buf, &enable))
if (ret != 1 || enable < 0 || enable > 1)
return -EINVAL; return -EINVAL;
if (cpufreq_boost_trigger_state(enable)) { if (cpufreq_boost_trigger_state(enable)) {
...@@ -641,10 +640,10 @@ static ssize_t show_local_boost(struct cpufreq_policy *policy, char *buf) ...@@ -641,10 +640,10 @@ static ssize_t show_local_boost(struct cpufreq_policy *policy, char *buf)
static ssize_t store_local_boost(struct cpufreq_policy *policy, static ssize_t store_local_boost(struct cpufreq_policy *policy,
const char *buf, size_t count) const char *buf, size_t count)
{ {
int ret, enable; int ret;
bool enable;
ret = kstrtoint(buf, 10, &enable); if (kstrtobool(buf, &enable))
if (ret || enable < 0 || enable > 1)
return -EINVAL; return -EINVAL;
if (!cpufreq_driver->boost_enabled) if (!cpufreq_driver->boost_enabled)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment