The effect of virtualizing interrupt protection must be reversed for atomic helpers in asm-generic/atomic.h, asm-generic/bitops/atomic.h and asm-generic/cmpxchg-local.h, so that no interrupt can preempt their execution, regardless of the stage their caller live on.
This is required to keep those helpers usable on data which might be accessed concurrently from both stages.
The usual way to revert such virtualization consists of delimiting the
protected section with
hard_local_irq_restore() calls, in replacement for