Commit 55e03915 authored by Thomas Gleixner's avatar Thomas Gleixner

x86/irq: Consolidate DMAR irq allocation

None of the DMAR specific fields are required.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20200826112332.163462706@linutronix.de
parent 33a65ba4
...@@ -83,12 +83,6 @@ struct irq_alloc_info { ...@@ -83,12 +83,6 @@ struct irq_alloc_info {
irq_hw_number_t msi_hwirq; irq_hw_number_t msi_hwirq;
}; };
#endif #endif
#ifdef CONFIG_DMAR_TABLE
struct {
int dmar_id;
void *dmar_data;
};
#endif
#ifdef CONFIG_X86_UV #ifdef CONFIG_X86_UV
struct { struct {
int uv_limit; int uv_limit;
......
...@@ -326,15 +326,15 @@ static struct irq_chip dmar_msi_controller = { ...@@ -326,15 +326,15 @@ static struct irq_chip dmar_msi_controller = {
static irq_hw_number_t dmar_msi_get_hwirq(struct msi_domain_info *info, static irq_hw_number_t dmar_msi_get_hwirq(struct msi_domain_info *info,
msi_alloc_info_t *arg) msi_alloc_info_t *arg)
{ {
return arg->dmar_id; return arg->hwirq;
} }
static int dmar_msi_init(struct irq_domain *domain, static int dmar_msi_init(struct irq_domain *domain,
struct msi_domain_info *info, unsigned int virq, struct msi_domain_info *info, unsigned int virq,
irq_hw_number_t hwirq, msi_alloc_info_t *arg) irq_hw_number_t hwirq, msi_alloc_info_t *arg)
{ {
irq_domain_set_info(domain, virq, arg->dmar_id, info->chip, NULL, irq_domain_set_info(domain, virq, arg->devid, info->chip, NULL,
handle_edge_irq, arg->dmar_data, "edge"); handle_edge_irq, arg->data, "edge");
return 0; return 0;
} }
...@@ -381,8 +381,8 @@ int dmar_alloc_hwirq(int id, int node, void *arg) ...@@ -381,8 +381,8 @@ int dmar_alloc_hwirq(int id, int node, void *arg)
init_irq_alloc_info(&info, NULL); init_irq_alloc_info(&info, NULL);
info.type = X86_IRQ_ALLOC_TYPE_DMAR; info.type = X86_IRQ_ALLOC_TYPE_DMAR;
info.dmar_id = id; info.devid = id;
info.dmar_data = arg; info.data = arg;
return irq_domain_alloc_irqs(domain, 1, node, &info); return irq_domain_alloc_irqs(domain, 1, node, &info);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment