Re: Q: smp.c && barriers (Was: [PATCH 1/4] generic-smp: remove single ipi fallback for smp_call_function_many())

Benjamin Herrenschmidt
2009-02-19T21:51:16Z

On Thu, 2009-02-19 at 16:06 +0100, Ingo Molnar wrote:
> > So your arch_send_call_function_single_ipi etc need to ensure
> > this, right? Generic code obviously has no idea about how to
> > do it.
>
> The thing is, the most widespread way to send IPIs (x86
> non-x2apic local APIC) does not need any barriers in the generic
> code or elsewhere, because the local APIC is mapped uncached so
> it's implicitly ordered.
>
> So the right solution is to add barriers to those IPI
> implementations that need it. This means that the generic code
> should not have a barrier for IPI sending.

I agree. In fact, our current code should be fine in any case because
our writel() which will be used to generate the IPI has a sync in it
anyway for other reasons.

Cheers,
Ben.