* init_vp_index() can (re-)use the CPU.
*/
if (hv_is_perf_channel(channel))
- hv_clear_alloced_cpu(channel->target_cpu);
+ hv_clear_allocated_cpu(channel->target_cpu);
/*
* Upon suspend, an in-use hv_sock channel is marked as "rescinded" and
bool perf_chn = hv_is_perf_channel(channel);
u32 i, ncpu = num_online_cpus();
cpumask_var_t available_mask;
- struct cpumask *alloced_mask;
+ struct cpumask *allocated_mask;
u32 target_cpu;
int numa_node;
*/
channel->target_cpu = VMBUS_CONNECT_CPU;
if (perf_chn)
- hv_set_alloced_cpu(VMBUS_CONNECT_CPU);
+ hv_set_allocated_cpu(VMBUS_CONNECT_CPU);
return;
}
continue;
break;
}
- alloced_mask = &hv_context.hv_numa_map[numa_node];
+ allocated_mask = &hv_context.hv_numa_map[numa_node];
- if (cpumask_weight(alloced_mask) ==
+ if (cpumask_weight(allocated_mask) ==
cpumask_weight(cpumask_of_node(numa_node))) {
/*
* We have cycled through all the CPUs in the node;
- * reset the alloced map.
+ * reset the allocated map.
*/
- cpumask_clear(alloced_mask);
+ cpumask_clear(allocated_mask);
}
- cpumask_xor(available_mask, alloced_mask,
+ cpumask_xor(available_mask, allocated_mask,
cpumask_of_node(numa_node));
target_cpu = cpumask_first(available_mask);
- cpumask_set_cpu(target_cpu, alloced_mask);
+ cpumask_set_cpu(target_cpu, allocated_mask);
if (channel->offermsg.offer.sub_channel_index >= ncpu ||
i > ncpu || !hv_cpuself_used(target_cpu, channel))
return vmbus_devs[channel->device_id].perf_device;
}
-static inline bool hv_is_alloced_cpu(unsigned int cpu)
+static inline bool hv_is_allocated_cpu(unsigned int cpu)
{
struct vmbus_channel *channel, *sc;
return false;
}
-static inline void hv_set_alloced_cpu(unsigned int cpu)
+static inline void hv_set_allocated_cpu(unsigned int cpu)
{
cpumask_set_cpu(cpu, &hv_context.hv_numa_map[cpu_to_node(cpu)]);
}
-static inline void hv_clear_alloced_cpu(unsigned int cpu)
+static inline void hv_clear_allocated_cpu(unsigned int cpu)
{
- if (hv_is_alloced_cpu(cpu))
+ if (hv_is_allocated_cpu(cpu))
return;
cpumask_clear_cpu(cpu, &hv_context.hv_numa_map[cpu_to_node(cpu)]);
}
-static inline void hv_update_alloced_cpus(unsigned int old_cpu,
+static inline void hv_update_allocated_cpus(unsigned int old_cpu,
unsigned int new_cpu)
{
- hv_set_alloced_cpu(new_cpu);
- hv_clear_alloced_cpu(old_cpu);
+ hv_set_allocated_cpu(new_cpu);
+ hv_clear_allocated_cpu(old_cpu);
}
#ifdef CONFIG_HYPERV_TESTING
/* See init_vp_index(). */
if (hv_is_perf_channel(channel))
- hv_update_alloced_cpus(origin_cpu, target_cpu);
+ hv_update_allocated_cpus(origin_cpu, target_cpu);
/* Currently set only for storvsc channels. */
if (channel->change_target_cpu_callback) {