lkml.org 
[lkml]   [2005]   [Jun]   [6]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateMon, 6 Jun 2005 15:13:32 -0700
FromAndrew Morton <>
SubjectRe: [patch 4/5] try2: x86_64: Dont use broadcast shortcut to make it cpu hotplug safe.
Ashok Raj <ashok.raj@intel.com> wrote:
>
> +static void flat_send_IPI_allbutself(int vector)
> +{
> +	cpumask_t mask;
> +	/*
> +	 * if there are no other CPUs in the system then
> +	 * we get an APIC send error if we try to broadcast.
> +	 * thus we have to avoid sending IPIs in this case.
> +	 */
> +	get_cpu();
> +	mask = cpu_online_map;
> +	cpu_clear(smp_processor_id(), mask);
> +
> +	if (cpus_weight(mask) >= 1)
> +		flat_send_IPI_mask(mask, vector);
> +
> +	put_cpu();
> +}

It would be more idiomatic to use preempt_disable() and preempt_enable() in
place of get_cpu() and put_cpu() here.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-06-06 22:20    [from the cache]
©2003-2008