# \[PATCH v6 04/29\] x86/apic: Add the X86\_IRQ\_ALLOC\_AS\_NMI irq allocation flag

- From: Ricardo Neri \<hidden\>
- Date: 2022-05-05 23:58:08 
- List: linuxppc-dev
- Page: https://ratatoskr.run/linuxppc-dev/2022/05/1771749
- Thread: https://ratatoskr.run/linuxppc-dev/2022/05/1771745/t.md

```text
There are cases in which it is necessary to set the delivery mode of an
interrupt as NMI. Add a new flag that callers can specify when allocating
an IRQ.

Cc: Andi Kleen <redacted>
Cc: "Ravi V. Shankar" <redacted>
Cc: Stephane Eranian <redacted>
Cc: <redacted>
Cc: <redacted>
Cc: x86@kernel.org
Suggested-by: Thomas Gleixner <redacted>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Ricardo Neri <redacted>
---
Changes since v5:
 * Introduced this patch.

Changes since v4:
 * N/A

Changes since v3:
 * N/A

Changes since v2:
 * N/A

Changes since v1:
 * N/A
---
 arch/x86/include/asm/irqdomain.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/include/asm/irqdomain.h b/arch/x86/include/asm/irqdomain.h
index 125c23b7bad3..de1cf2e80443 100644
--- a/arch/x86/include/asm/irqdomain.h
+++ b/arch/x86/include/asm/irqdomain.h
@@ -10,6 +10,7 @@ enum {
 	/* Allocate contiguous CPU vectors */
 	X86_IRQ_ALLOC_CONTIGUOUS_VECTORS		= 0x1,
 	X86_IRQ_ALLOC_LEGACY				= 0x2,
+	X86_IRQ_ALLOC_AS_NMI				= 0x4,
 };
 
 extern int x86_fwspec_is_ioapic(struct irq_fwspec *fwspec);
-- 
2.17.1

```
