summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2025-11-26 00:50:49 +0300
committerThomas Gleixner <tglx@linutronix.de>2025-12-19 00:59:40 +0300
commitd441e38a2c87824afc7e656e634e55141d015307 (patch)
treed8d64b41a9cea6422d92f2b3fe7cd8fcc683c87b /drivers
parent4021a6dad720273a95ac3c0816fc48e35e77dace (diff)
downloadlinux-d441e38a2c87824afc7e656e634e55141d015307.tar.xz
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
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iommu/intel/irq_remapping.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iommu/intel/irq_remapping.c b/drivers/iommu/intel/irq_remapping.c
index 8bcbfe3d9c72..ecb591e98565 100644
--- a/drivers/iommu/intel/irq_remapping.c
+++ b/drivers/iommu/intel/irq_remapping.c
@@ -1368,7 +1368,7 @@ static void intel_irq_remapping_prepare_irte(struct intel_ir_data *data,
break;
case X86_IRQ_ALLOC_TYPE_PCI_MSI:
case X86_IRQ_ALLOC_TYPE_PCI_MSIX:
- if (posted_msi_supported()) {
+ if (posted_msi_enabled()) {
prepare_irte_posted(irte);
data->irq_2_iommu.posted_msi = 1;
}
@@ -1460,7 +1460,7 @@ static int intel_irq_remapping_alloc(struct irq_domain *domain,
irq_data->hwirq = (index << 16) + i;
irq_data->chip_data = ird;
- if (posted_msi_supported() &&
+ if (posted_msi_enabled() &&
((info->type == X86_IRQ_ALLOC_TYPE_PCI_MSI) ||
(info->type == X86_IRQ_ALLOC_TYPE_PCI_MSIX)))
irq_data->chip = &intel_ir_chip_post_msi;