]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86/irq_remapping: Sanitize posted_msi_supported()
authorThomas Gleixner <tglx@linutronix.de>
Tue, 25 Nov 2025 21:50:49 +0000 (22:50 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 18 Dec 2025 21:59:40 +0000 (22:59 +0100)
commitd441e38a2c87824afc7e656e634e55141d015307
treed8d64b41a9cea6422d92f2b3fe7cd8fcc683c87b
parent4021a6dad720273a95ac3c0816fc48e35e77dace
x86/irq_remapping: Sanitize posted_msi_supported()

posted_msi_supported() is a misnomer as it actually checks whether it is
enabled or not. Aside of that this does not take CONFIG_X86_POSTED_MSI into
account which is required to actually use it.

Rename it to posted_msi_enabled() and make the return value depend on
CONFIG_X86_POSTED_MSI, which allows the compiler to eliminate the related
dead code and data if disabled:

  text    data     bss     dec     hex filename
  10046     701    3296   14043    36db drivers/iommu/intel/irq_remapping.o
   9904     413    3296   13613    352d drivers/iommu/intel/irq_remapping.o

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://patch.msgid.link/20251125214631.170499997@linutronix.de
arch/x86/include/asm/irq_remapping.h
drivers/iommu/intel/irq_remapping.c