mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-12 01:20:14 +00:00
cpufreq: ACPI: Use on_each_cpu_mask() in drv_write()
Make drv_write() call on_each_cpu_mask() instead of using an open-coded equivalent of the latter. Also remove a comment mentioning the smp_call_function_many() usage which is not particularly useful anyway. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
This commit is contained in:
parent
34d2eb4c16
commit
995694ef91
@ -318,7 +318,6 @@ static u32 drv_read(struct acpi_cpufreq_data *data, const struct cpumask *mask)
|
||||
return cmd.val;
|
||||
}
|
||||
|
||||
/* Called via smp_call_function_many(), on the target CPUs */
|
||||
static void do_drv_write(void *_cmd)
|
||||
{
|
||||
struct drv_cmd *cmd = _cmd;
|
||||
@ -335,14 +334,8 @@ static void drv_write(struct acpi_cpufreq_data *data,
|
||||
.val = val,
|
||||
.func.write = data->cpu_freq_write,
|
||||
};
|
||||
int this_cpu;
|
||||
|
||||
this_cpu = get_cpu();
|
||||
if (cpumask_test_cpu(this_cpu, mask))
|
||||
do_drv_write(&cmd);
|
||||
|
||||
smp_call_function_many(mask, do_drv_write, &cmd, 1);
|
||||
put_cpu();
|
||||
on_each_cpu_mask(mask, do_drv_write, &cmd, true);
|
||||
}
|
||||
|
||||
static u32 get_cur_val(const struct cpumask *mask, struct acpi_cpufreq_data *data)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user