Commit e9f51837c97d199dfa06ef448797c584755837a8
Committed by
Rafael J. Wysocki
1 parent
b43a7ffbf3
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
cpufreq: Don't check if cpu is online/offline for cpufreq callbacks
cpufreq layer doesn't call cpufreq driver's callback for any offline CPU and so checking that isn't useful. Lets get rid of it. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Showing 7 changed files with 1 additions and 33 deletions Side-by-side Diff
arch/mips/kernel/cpufreq/loongson2_cpufreq.c
... | ... | @@ -61,9 +61,6 @@ |
61 | 61 | struct cpufreq_freqs freqs; |
62 | 62 | unsigned int freq; |
63 | 63 | |
64 | - if (!cpu_online(cpu)) | |
65 | - return -ENODEV; | |
66 | - | |
67 | 64 | cpus_allowed = current->cpus_allowed; |
68 | 65 | set_cpus_allowed_ptr(current, cpumask_of(cpu)); |
69 | 66 | |
... | ... | @@ -108,9 +105,6 @@ |
108 | 105 | int i; |
109 | 106 | unsigned long rate; |
110 | 107 | int ret; |
111 | - | |
112 | - if (!cpu_online(policy->cpu)) | |
113 | - return -ENODEV; | |
114 | 108 | |
115 | 109 | cpuclk = clk_get(NULL, "cpu_clk"); |
116 | 110 | if (IS_ERR(cpuclk)) { |
arch/sh/kernel/cpufreq.c
... | ... | @@ -51,9 +51,6 @@ |
51 | 51 | struct device *dev; |
52 | 52 | long freq; |
53 | 53 | |
54 | - if (!cpu_online(cpu)) | |
55 | - return -ENODEV; | |
56 | - | |
57 | 54 | cpus_allowed = current->cpus_allowed; |
58 | 55 | set_cpus_allowed_ptr(current, cpumask_of(cpu)); |
59 | 56 | |
... | ... | @@ -110,9 +107,6 @@ |
110 | 107 | struct clk *cpuclk = &per_cpu(sh_cpuclk, cpu); |
111 | 108 | struct cpufreq_frequency_table *freq_table; |
112 | 109 | struct device *dev; |
113 | - | |
114 | - if (!cpu_online(cpu)) | |
115 | - return -ENODEV; | |
116 | 110 | |
117 | 111 | dev = get_cpu_device(cpu); |
118 | 112 |
arch/sparc/kernel/us2e_cpufreq.c
... | ... | @@ -234,9 +234,6 @@ |
234 | 234 | cpumask_t cpus_allowed; |
235 | 235 | unsigned long clock_tick, estar; |
236 | 236 | |
237 | - if (!cpu_online(cpu)) | |
238 | - return 0; | |
239 | - | |
240 | 237 | cpumask_copy(&cpus_allowed, tsk_cpus_allowed(current)); |
241 | 238 | set_cpus_allowed_ptr(current, cpumask_of(cpu)); |
242 | 239 | |
... | ... | @@ -256,9 +253,6 @@ |
256 | 253 | unsigned long clock_tick, divisor, old_divisor, estar; |
257 | 254 | cpumask_t cpus_allowed; |
258 | 255 | struct cpufreq_freqs freqs; |
259 | - | |
260 | - if (!cpu_online(cpu)) | |
261 | - return; | |
262 | 256 | |
263 | 257 | cpumask_copy(&cpus_allowed, tsk_cpus_allowed(current)); |
264 | 258 | set_cpus_allowed_ptr(current, cpumask_of(cpu)); |
arch/sparc/kernel/us3_cpufreq.c
... | ... | @@ -82,9 +82,6 @@ |
82 | 82 | unsigned long reg; |
83 | 83 | unsigned int ret; |
84 | 84 | |
85 | - if (!cpu_online(cpu)) | |
86 | - return 0; | |
87 | - | |
88 | 85 | cpumask_copy(&cpus_allowed, tsk_cpus_allowed(current)); |
89 | 86 | set_cpus_allowed_ptr(current, cpumask_of(cpu)); |
90 | 87 | |
... | ... | @@ -103,9 +100,6 @@ |
103 | 100 | unsigned long new_bits, new_freq, reg; |
104 | 101 | cpumask_t cpus_allowed; |
105 | 102 | struct cpufreq_freqs freqs; |
106 | - | |
107 | - if (!cpu_online(cpu)) | |
108 | - return; | |
109 | 103 | |
110 | 104 | cpumask_copy(&cpus_allowed, tsk_cpus_allowed(current)); |
111 | 105 | set_cpus_allowed_ptr(current, cpumask_of(cpu)); |
drivers/cpufreq/p4-clockmod.c
drivers/cpufreq/powernow-k8.c
drivers/cpufreq/speedstep-centrino.c
... | ... | @@ -481,10 +481,6 @@ |
481 | 481 | for_each_cpu(j, policy->cpus) { |
482 | 482 | int good_cpu; |
483 | 483 | |
484 | - /* cpufreq holds the hotplug lock, so we are safe here */ | |
485 | - if (!cpu_online(j)) | |
486 | - continue; | |
487 | - | |
488 | 484 | /* |
489 | 485 | * Support for SMP systems. |
490 | 486 | * Make sure we are running on CPU that wants to change freq |