diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-07-07 08:35:28 (GMT) |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-07-07 08:35:28 (GMT) |
commit | 4b4b20852d1009c5e8bc357b22353b62e3a241c7 (patch) | |
tree | 1026418471fe10c5b9f2fdff8a6b49bf070938fc /drivers/hwmon/fam15h_power.c | |
parent | 5130213721d01b6632c255d4295a8102cbb58379 (diff) | |
parent | f00c0afdfa625165a609513bc74164d56752ec3e (diff) | |
download | linux-4b4b20852d1009c5e8bc357b22353b62e3a241c7.tar.xz |
Merge branch 'timers/fast-wheel' into timers/core
Diffstat (limited to 'drivers/hwmon/fam15h_power.c')
-rw-r--r-- | drivers/hwmon/fam15h_power.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_power.c index eb97a92..15aa49d 100644 --- a/drivers/hwmon/fam15h_power.c +++ b/drivers/hwmon/fam15h_power.c @@ -172,9 +172,9 @@ static void do_read_registers_on_cu(void *_data) */ static int read_registers(struct fam15h_power_data *data) { - int this_cpu, ret, cpu; int core, this_core; cpumask_var_t mask; + int ret, cpu; ret = zalloc_cpumask_var(&mask, GFP_KERNEL); if (!ret) @@ -183,7 +183,6 @@ static int read_registers(struct fam15h_power_data *data) memset(data->cu_on, 0, sizeof(int) * MAX_CUS); get_online_cpus(); - this_cpu = smp_processor_id(); /* * Choose the first online core of each compute unit, and then @@ -205,12 +204,9 @@ static int read_registers(struct fam15h_power_data *data) cpumask_set_cpu(cpumask_any(topology_sibling_cpumask(cpu)), mask); } - if (cpumask_test_cpu(this_cpu, mask)) - do_read_registers_on_cu(data); + on_each_cpu_mask(mask, do_read_registers_on_cu, data, true); - smp_call_function_many(mask, do_read_registers_on_cu, data, true); put_online_cpus(); - free_cpumask_var(mask); return 0; |