mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 22:14:04 +02:00
ANDROID: dummy_cpufreq: Implement get()
Fixes panic in time_cpufreq_notifier+0x94 caused by notifying the x86 TSC synchronization code that a CPU frequency change has occurred, but not properly updating policy->cur beforehand, causing a division by zero. Link: https://github.com/ClangBuiltLinux/linux/issues/756 Change-Id: I687093bbdb402a13341762bf9d91dd7f9daffe8b Signed-off-by: Alistair Delva <adelva@google.com>
This commit is contained in:
parent
aed39c535e
commit
50118fa88e
|
|
@ -23,6 +23,11 @@ static int dummy_cpufreq_driver_init(struct cpufreq_policy *policy)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static unsigned int dummy_cpufreq_get(unsigned int cpu)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int dummy_cpufreq_verify(struct cpufreq_policy *policy)
|
||||
{
|
||||
return 0;
|
||||
|
|
@ -32,6 +37,7 @@ static struct cpufreq_driver dummy_cpufreq_driver = {
|
|||
.name = "dummy",
|
||||
.target_index = dummy_cpufreq_target_index,
|
||||
.init = dummy_cpufreq_driver_init,
|
||||
.get = dummy_cpufreq_get,
|
||||
.verify = dummy_cpufreq_verify,
|
||||
.attr = cpufreq_generic_attr,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user