[lkml]   [2009]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [tip:core/ipi] generic-ipi: eliminate spurious pointlessWARN_ON()s
>>> Peter Zijlstra <> 13.03.09 09:54 >>>
>Wouldn't leaving them in place but changing them to:
>WARN_ON(irqs_disabled() && system_state == SYSTEM_RUNNING);
>be clearer?

I don't think that would be precise: system_state gets set to
SYSTEM_RUNNING much later than APs get brought up (i.e. there are
cases where the WARN_ON()s could validly trigger with SYSTEM_BOOTING),
and also doesn't cover states > SYSTEM_RUNNING (where, again, after
perhaps having brought down all APs the warnings could become pointless,
but the warnings could be meaningful as long as there are still some APs

While from an abstract code reading perspective your suggestion might
seem reasonable, the changed placement really reflects what the warning
is trying to warn about - a potential deadlock which cannot occur under
the conditions filtered out by conditionals the warnings were moved


 \ /
  Last update: 2009-03-13 10:27    [W:0.101 / U:3.940 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site