Loading drivers/thermal/cpu_cooling.c +23 −24 Original line number Diff line number Diff line Loading @@ -330,7 +330,7 @@ static int cpufreq_thermal_notifier(struct notifier_block *nb, unsigned long event, void *data) { struct cpufreq_policy *policy = data; unsigned long clipped_freq, floor_freq; unsigned long clipped_freq = ULONG_MAX, floor_freq = 0; struct cpufreq_cooling_device *cpufreq_dev; if (event != CPUFREQ_ADJUST) Loading @@ -338,9 +338,14 @@ static int cpufreq_thermal_notifier(struct notifier_block *nb, mutex_lock(&cooling_list_lock); list_for_each_entry(cpufreq_dev, &cpufreq_dev_list, node) { if (!cpumask_test_cpu(policy->cpu, &cpufreq_dev->allowed_cpus)) if (!cpumask_intersects(&cpufreq_dev->allowed_cpus, policy->related_cpus)) continue; if (cpufreq_dev->clipped_freq < clipped_freq) clipped_freq = cpufreq_dev->clipped_freq; if (cpufreq_dev->floor_freq > floor_freq) floor_freq = cpufreq_dev->floor_freq; } /* * policy->max is the maximum allowed frequency defined by user * and clipped_freq is the maximum that thermal constraints Loading @@ -355,14 +360,8 @@ static int cpufreq_thermal_notifier(struct notifier_block *nb, * Similarly, if policy minimum set by the user is less than * the floor_frequency, then adjust the policy->min. */ clipped_freq = cpufreq_dev->clipped_freq; floor_freq = cpufreq_dev->floor_freq; if (policy->max > clipped_freq || policy->min < floor_freq) cpufreq_verify_within_limits(policy, floor_freq, clipped_freq); break; } cpufreq_verify_within_limits(policy, floor_freq, clipped_freq); mutex_unlock(&cooling_list_lock); return NOTIFY_OK; Loading Loading
drivers/thermal/cpu_cooling.c +23 −24 Original line number Diff line number Diff line Loading @@ -330,7 +330,7 @@ static int cpufreq_thermal_notifier(struct notifier_block *nb, unsigned long event, void *data) { struct cpufreq_policy *policy = data; unsigned long clipped_freq, floor_freq; unsigned long clipped_freq = ULONG_MAX, floor_freq = 0; struct cpufreq_cooling_device *cpufreq_dev; if (event != CPUFREQ_ADJUST) Loading @@ -338,9 +338,14 @@ static int cpufreq_thermal_notifier(struct notifier_block *nb, mutex_lock(&cooling_list_lock); list_for_each_entry(cpufreq_dev, &cpufreq_dev_list, node) { if (!cpumask_test_cpu(policy->cpu, &cpufreq_dev->allowed_cpus)) if (!cpumask_intersects(&cpufreq_dev->allowed_cpus, policy->related_cpus)) continue; if (cpufreq_dev->clipped_freq < clipped_freq) clipped_freq = cpufreq_dev->clipped_freq; if (cpufreq_dev->floor_freq > floor_freq) floor_freq = cpufreq_dev->floor_freq; } /* * policy->max is the maximum allowed frequency defined by user * and clipped_freq is the maximum that thermal constraints Loading @@ -355,14 +360,8 @@ static int cpufreq_thermal_notifier(struct notifier_block *nb, * Similarly, if policy minimum set by the user is less than * the floor_frequency, then adjust the policy->min. */ clipped_freq = cpufreq_dev->clipped_freq; floor_freq = cpufreq_dev->floor_freq; if (policy->max > clipped_freq || policy->min < floor_freq) cpufreq_verify_within_limits(policy, floor_freq, clipped_freq); break; } cpufreq_verify_within_limits(policy, floor_freq, clipped_freq); mutex_unlock(&cooling_list_lock); return NOTIFY_OK; Loading