[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch V2 15/46] x86/irq: Consolidate DMAR irq allocation
- To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>
- From: "Dey, Megha" <megha.dey@xxxxxxxxx>
- Date: Wed, 26 Aug 2020 09:50:27 -0700
- Cc: <x86@xxxxxxxxxx>, Joerg Roedel <joro@xxxxxxxxxx>, <iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx>, <linux-hyperv@xxxxxxxxxxxxxxx>, "Haiyang Zhang" <haiyangz@xxxxxxxxxxxxx>, Jon Derrick <jonathan.derrick@xxxxxxxxx>, Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>, Wei Liu <wei.liu@xxxxxxxxxx>, "K. Y. Srinivasan" <kys@xxxxxxxxxxxxx>, Stephen Hemminger <sthemmin@xxxxxxxxxxxxx>, Steve Wahl <steve.wahl@xxxxxxx>, Dimitri Sivanich <sivanich@xxxxxxx>, "Russ Anderson" <rja@xxxxxxx>, <linux-pci@xxxxxxxxxxxxxxx>, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>, Lorenzo Pieralisi <lorenzo.pieralisi@xxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, "Boris Ostrovsky" <boris.ostrovsky@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Marc Zyngier <maz@xxxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, "Rafael J. Wysocki" <rafael@xxxxxxxxxx>, Jason Gunthorpe <jgg@xxxxxxxxxxxx>, Dave Jiang <dave.jiang@xxxxxxxxx>, Alex Williamson <alex.williamson@xxxxxxxxxx>, Jacob Pan <jacob.jun.pan@xxxxxxxxx>, Baolu Lu <baolu.lu@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Dan Williams <dan.j.williams@xxxxxxxxx>
- Delivery-date: Wed, 26 Aug 2020 16:50:46 +0000
- Ironport-sdr: /ywILiqfUvzifvA2+pG47sHtPNLuLwm3fd4Rxe5ucwqZc/tzCvfwqoFo5pQjKyNICtcYSQh+E+ iXokmCkxKyIg==
- Ironport-sdr: O+tRoc/59eCGpVLJON72igRMmtjnFMq9wo28apgxlygz1/37A+zdeFZDDyibhT3bW+C7JSBdFz MbToSWPlnzpg==
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Hi Thomas,
On 8/26/2020 4:16 AM, Thomas Gleixner wrote:
From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
None of the DMAR specific fields are required.
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
---
arch/x86/include/asm/hw_irq.h | 6 ------
arch/x86/kernel/apic/msi.c | 10 +++++-----
2 files changed, 5 insertions(+), 11 deletions(-)
--- a/arch/x86/include/asm/hw_irq.h
+++ b/arch/x86/include/asm/hw_irq.h
@@ -83,12 +83,6 @@ struct irq_alloc_info {
irq_hw_number_t msi_hwirq;
};
#endif
-#ifdef CONFIG_DMAR_TABLE
- struct {
- int dmar_id;
- void *dmar_data;
- };
-#endif
#ifdef CONFIG_X86_UV
struct {
int uv_limit;
--- a/arch/x86/kernel/apic/msi.c
+++ b/arch/x86/kernel/apic/msi.c
@@ -329,15 +329,15 @@ static struct irq_chip dmar_msi_controll
static irq_hw_number_t dmar_msi_get_hwirq(struct msi_domain_info *info,
msi_alloc_info_t *arg)
{
- return arg->dmar_id;
+ return arg->hwirq;
Shouldn't this return the arg->devid which gets set in dmar_alloc_hwirq?
-Megha
}
static int dmar_msi_init(struct irq_domain *domain,
struct msi_domain_info *info, unsigned int virq,
irq_hw_number_t hwirq, msi_alloc_info_t *arg)
{
- irq_domain_set_info(domain, virq, arg->dmar_id, info->chip, NULL,
- handle_edge_irq, arg->dmar_data, "edge");
+ irq_domain_set_info(domain, virq, arg->devid, info->chip, NULL,
+ handle_edge_irq, arg->data, "edge");
return 0;
}
@@ -384,8 +384,8 @@ int dmar_alloc_hwirq(int id, int node, v
init_irq_alloc_info(&info, NULL);
info.type = X86_IRQ_ALLOC_TYPE_DMAR;
- info.dmar_id = id;
- info.dmar_data = arg;
+ info.devid = id;
+ info.data = arg;
return irq_domain_alloc_irqs(domain, 1, node, &info);
}
|