Skip to content

Commit

Permalink
x86: Fix up obsolete __cpu_set() function usage
Browse files Browse the repository at this point in the history
Thanks to spatch, plus manual removal of "&*".

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1425296150-4722-8-git-send-email-rusty@rustcorp.com.au
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
rustyrussell authored and Ingo Molnar committed Mar 2, 2015
1 parent a38ecbb commit 020b37a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions arch/x86/kernel/apic/x2apic_cluster.c
Expand Up @@ -135,12 +135,12 @@ static void init_x2apic_ldr(void)

per_cpu(x86_cpu_to_logical_apicid, this_cpu) = apic_read(APIC_LDR);

__cpu_set(this_cpu, per_cpu(cpus_in_cluster, this_cpu));
cpumask_set_cpu(this_cpu, per_cpu(cpus_in_cluster, this_cpu));
for_each_online_cpu(cpu) {
if (x2apic_cluster(this_cpu) != x2apic_cluster(cpu))
continue;
__cpu_set(this_cpu, per_cpu(cpus_in_cluster, cpu));
__cpu_set(cpu, per_cpu(cpus_in_cluster, this_cpu));
cpumask_set_cpu(this_cpu, per_cpu(cpus_in_cluster, cpu));
cpumask_set_cpu(cpu, per_cpu(cpus_in_cluster, this_cpu));
}
}

Expand Down Expand Up @@ -195,7 +195,7 @@ static int x2apic_init_cpu_notifier(void)

BUG_ON(!per_cpu(cpus_in_cluster, cpu) || !per_cpu(ipi_mask, cpu));

__cpu_set(cpu, per_cpu(cpus_in_cluster, cpu));
cpumask_set_cpu(cpu, per_cpu(cpus_in_cluster, cpu));
register_hotcpu_notifier(&x2apic_cpu_notifier);
return 1;
}
Expand Down
4 changes: 2 additions & 2 deletions arch/x86/kernel/irq.c
Expand Up @@ -295,7 +295,7 @@ int check_irq_vectors_for_cpu_disable(void)

this_cpu = smp_processor_id();
cpumask_copy(&online_new, cpu_online_mask);
cpu_clear(this_cpu, online_new);
cpumask_clear_cpu(this_cpu, &online_new);

this_count = 0;
for (vector = FIRST_EXTERNAL_VECTOR; vector < NR_VECTORS; vector++) {
Expand All @@ -307,7 +307,7 @@ int check_irq_vectors_for_cpu_disable(void)

data = irq_desc_get_irq_data(desc);
cpumask_copy(&affinity_new, data->affinity);
cpu_clear(this_cpu, affinity_new);
cpumask_clear_cpu(this_cpu, &affinity_new);

/* Do not count inactive or per-cpu irqs. */
if (!irq_has_action(irq) || irqd_is_per_cpu(data))
Expand Down
6 changes: 3 additions & 3 deletions arch/x86/platform/uv/tlb_uv.c
Expand Up @@ -415,7 +415,7 @@ static void reset_with_ipi(struct pnmask *distribution, struct bau_control *bcp)
struct reset_args reset_args;

reset_args.sender = sender;
cpus_clear(*mask);
cpumask_clear(mask);
/* find a single cpu for each uvhub in this distribution mask */
maskbits = sizeof(struct pnmask) * BITSPERBYTE;
/* each bit is a pnode relative to the partition base pnode */
Expand All @@ -425,7 +425,7 @@ static void reset_with_ipi(struct pnmask *distribution, struct bau_control *bcp)
continue;
apnode = pnode + bcp->partition_base_pnode;
cpu = pnode_to_first_cpu(apnode, smaster);
cpu_set(cpu, *mask);
cpumask_set_cpu(cpu, mask);
}

/* IPI all cpus; preemption is already disabled */
Expand Down Expand Up @@ -1126,7 +1126,7 @@ const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask,
/* don't actually do a shootdown of the local cpu */
cpumask_andnot(flush_mask, cpumask, cpumask_of(cpu));

if (cpu_isset(cpu, *cpumask))
if (cpumask_test_cpu(cpu, cpumask))
stat->s_ntargself++;

bau_desc = bcp->descriptor_base;
Expand Down

0 comments on commit 020b37a

Please sign in to comment.