Skip to content

Commit 3d41386

Browse files
George Cherianrafaeljw
authored andcommitted
cpufreq: CPPC: Use transition_delay_us depending transition_latency
With commit e948bc8 (cpufreq: Cap the default transition delay value to 10 ms) the cpufreq was not honouring the delay passed via ACPI (PCCT). Due to which on ARM based platforms using CPPC the cpufreq governor tries to change the frequency of CPUs faster than expected. This leads to continuous error messages like the following. " ACPI CPPC: PCC check channel failed. Status=0 " Earlier (without above commit) the default transition delay was taken form the value passed from PCCT. Use the same value provided by PCCT to set the transition_delay_us. Fixes: e948bc8 (cpufreq: Cap the default transition delay value to 10 ms) Signed-off-by: George Cherian <george.cherian@cavium.com> Cc: 4.14+ <stable@vger.kernel.org> # 4.14+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent a8b6966 commit 3d41386

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎drivers/cpufreq/cppc_cpufreq.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <linux/cpu.h>
2121
#include <linux/cpufreq.h>
2222
#include <linux/dmi.h>
23+
#include <linux/time.h>
2324
#include <linux/vmalloc.h>
2425

2526
#include <asm/unaligned.h>
@@ -162,6 +163,8 @@ static int cppc_cpufreq_cpu_init(struct cpufreq_policy *policy)
162163
policy->cpuinfo.max_freq = cppc_dmi_max_khz;
163164

164165
policy->cpuinfo.transition_latency = cppc_get_transition_latency(cpu_num);
166+
policy->transition_delay_us = cppc_get_transition_latency(cpu_num) /
167+
NSEC_PER_USEC;
165168
policy->shared_type = cpu->shared_type;
166169

167170
if (policy->shared_type == CPUFREQ_SHARED_TYPE_ANY)

0 commit comments

Comments
 (0)