[PATCH] Add call to non-crashing cores through IPI

Mika Westerberg mika.westerberg at iki.fi
Tue Nov 23 07:41:38 EST 2010


On Tue, Nov 23, 2010 at 12:37:04PM +0000, Catalin Marinas wrote:
> On 23 November 2010 10:57, Per Fransson <per.fransson.ml at gmail.com> wrote:
> >>> Am I right that deadlock can occur only if the same IPI was sent?
> >>
> >> Not necessarily. It depends on whether the CPU issuing the IPI needs
> >> to wait for the completion of the cross-call. If you don't need to
> >> wait, you can send the IPI with the interrupts disabled (the platform
> >> smp_cross_call is already called with interrupts disabled).
> >>
> >
> > Well, smp_call_function() only optionally waits. As long as we choose not to,
> > using that function to ask the other cores to save their states and idle, should
> > be ok, right? In that case we don't need another ipi_msg_type and we can do
> > it with the interrupts of the ipi caller disabled.
> 
> I think that should work but we still have a WARN_ON_ONCE in the
> generic smp_call_function_*() if interrupts are disabled.

But when we are crashing we have oops_in_progress set:

        WARN_ON_ONCE(cpu_online(this_cpu) && irqs_disabled()
                     && !oops_in_progress);

so this warning is never printed, right?

MW



More information about the linux-arm-kernel mailing list