From: Peter Zijlstra <firstname.lastname@example.org>
It's immaterial, local_irq_restore() will do the right thing,
and it's ok to disable NMIs in these few cases I think.
I desperately want to avoid that "test and maybe change the
value %pil value we write" business, and honestly that's
the whole point of this exercise.
Sure, its your architecture.. but could you explain why you're trying to
avoid that compare so desperately, the local_irq_save_nmi() calls are
few so surely they could carry that overhead.
Also, doesn't __raw_local_irq_save_flags() already do the read? So its
really just the compare that's gone missing.