Re: [PATCH 06/10] x86/entry: Move nmi entry/exit into common code

From: Thomas Gleixner
Date: Fri Oct 23 2020 - 17:50:16 EST


On Thu, Oct 22 2020 at 15:26, ira weiny wrote:

> From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
>
> Lockdep state handling on NMI enter and exit is nothing specific to X86. It's
> not any different on other architectures. Also the extra state type is not
> necessary, irqentry_state_t can carry the necessary information as well.
>
> Move it to common code and extend irqentry_state_t to carry lockdep
> state.

This lacks something like:

[ Ira: Made the states a union as they are mutually exclusive and added
the missing kernel doc ]

Hrm.

> #ifndef irqentry_state
> typedef struct irqentry_state {
> - bool exit_rcu;
> + union {
> + bool exit_rcu;
> + bool lockdep;
> + };
> } irqentry_state_t;
> #endif

-E_NO_KERNELDOC

Thanks,

tglx