Re: [PATCH] smp.c: Quit unconditionally enabling irqs inon_each_cpu_mask().

From: Andrew Morton
Date: Mon Aug 12 2013 - 18:16:39 EST


On Fri, 9 Aug 2013 12:24:56 -0700 David Daney <ddaney@xxxxxxxxxxxxxxxxxx> wrote:

> > otherwise the bugs
> > stemming from incorrect use can be tricky to catch.
> >
>
> ... all my patch does is allow on_each_cpu_mask() to be called with IRQs
> disabled if we are in Early Boot. This is already the case with
> smp_call_function(), smp_call_function_many() and on_each_cpu(). I am
> arguing that for the sake of consistency and the principle that function
> behavior shouldn't be surprising, that we make on_each_cpu_mask() work
> the same way.

Yup, the check in smp_call_function_many() will tell us if anyone calls
on_each_cpu_mask() with interrupts disabled any time after boot.

The whole early_boot_irqs_disabled thing is of course totally vile :(
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/