https://elixir.bootlin.com/linux/latest/source/include/linux/hardirq.h#L120
#define __nmi_enter() \
do { \
lockdep_off(); \
arch_nmi_enter(); \
BUG_ON(in_nmi() == NMI_MASK); \
__preempt_count_add(NMI_OFFSET + HARDIRQ_OFFSET); \
} while (0)
Why enter_nmi
is:
__preempt_count_add(NMI_OFFSET + HARDIRQ_OFFSET);
why not just:
__preempt_count_add(NMI_OFFSET);
NMI is part of hardirq?