[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <160397373441.397.9363626143265340860.tip-bot2@tip-bot2>
Date: Thu, 29 Oct 2020 12:15:34 -0000
From: "tip-bot2 for David Woodhouse" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: David Woodhouse <dwmw@...zon.co.uk>,
Thomas Gleixner <tglx@...utronix.de>, x86 <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: [tip: x86/apic] iommu/vt-d: Implement select() method on remapping irqdomain
The following commit has been merged into the x86/apic branch of tip:
Commit-ID: a87fb465ffe8eacd0d69032da33455e4f6fd8b41
Gitweb: https://git.kernel.org/tip/a87fb465ffe8eacd0d69032da33455e4f6fd8b41
Author: David Woodhouse <dwmw@...zon.co.uk>
AuthorDate: Sat, 24 Oct 2020 22:35:25 +01:00
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Wed, 28 Oct 2020 20:26:27 +01:00
iommu/vt-d: Implement select() method on remapping irqdomain
Preparatory for removing irq_remapping_get_irq_domain()
Signed-off-by: David Woodhouse <dwmw@...zon.co.uk>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Link: https://lore.kernel.org/r/20201024213535.443185-26-dwmw2@infradead.org
---
drivers/iommu/intel/irq_remapping.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/iommu/intel/irq_remapping.c b/drivers/iommu/intel/irq_remapping.c
index 96c84b1..b3b079c 100644
--- a/drivers/iommu/intel/irq_remapping.c
+++ b/drivers/iommu/intel/irq_remapping.c
@@ -1431,7 +1431,20 @@ static void intel_irq_remapping_deactivate(struct irq_domain *domain,
modify_irte(&data->irq_2_iommu, &entry);
}
+static int intel_irq_remapping_select(struct irq_domain *d,
+ struct irq_fwspec *fwspec,
+ enum irq_domain_bus_token bus_token)
+{
+ if (x86_fwspec_is_ioapic(fwspec))
+ return d == map_ioapic_to_ir(fwspec->param[0]);
+ else if (x86_fwspec_is_hpet(fwspec))
+ return d == map_hpet_to_ir(fwspec->param[0]);
+
+ return 0;
+}
+
static const struct irq_domain_ops intel_ir_domain_ops = {
+ .select = intel_irq_remapping_select,
.alloc = intel_irq_remapping_alloc,
.free = intel_irq_remapping_free,
.activate = intel_irq_remapping_activate,
Powered by blists - more mailing lists