lkml.org 
[lkml]   [2019]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 9/9] x86/apic: Use non-atomic operations when possible
From
Date
> diff --git a/arch/x86/kernel/apic/x2apic_cluster.c b/arch/x86/kernel/apic/x2apic_cluster.c
> index 7685444a106b..609e499387a1 100644
> --- a/arch/x86/kernel/apic/x2apic_cluster.c
> +++ b/arch/x86/kernel/apic/x2apic_cluster.c
> @@ -50,7 +50,7 @@ __x2apic_send_IPI_mask(const struct cpumask *mask, int vector, int apic_dest)
> cpumask_copy(tmpmsk, mask);
> /* If IPI should not be sent to self, clear current CPU */
> if (apic_dest != APIC_DEST_ALLINC)
> - cpumask_clear_cpu(smp_processor_id(), tmpmsk);
> + __cpumask_clear_cpu(smp_processor_id(), tmpmsk);

tmpmsk is on-stack, but it's a pointer to a per-cpu variable:

tmpmsk = this_cpu_cpumask_var_ptr(ipi_mask);

So this one doesn't appear as obviously correct as a mask which itself
is on the stack. The other three look obviously OK, though.

\
 
 \ /
  Last update: 2019-06-25 23:59    [W:0.267 / U:16.192 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site