x86/msi: Consolidate HPET allocation
None of the magic HPET fields are required in any way. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Joerg Roedel <jroedel@suse.de> Link: https://lore.kernel.org/r/20200826112331.943993771@linutronix.de
This commit is contained in:
@@ -423,7 +423,7 @@ static struct irq_chip hpet_msi_controller __ro_after_init = {
|
||||
static irq_hw_number_t hpet_msi_get_hwirq(struct msi_domain_info *info,
|
||||
msi_alloc_info_t *arg)
|
||||
{
|
||||
return arg->hpet_index;
|
||||
return arg->hwirq;
|
||||
}
|
||||
|
||||
static int hpet_msi_init(struct irq_domain *domain,
|
||||
@@ -431,8 +431,8 @@ static int hpet_msi_init(struct irq_domain *domain,
|
||||
irq_hw_number_t hwirq, msi_alloc_info_t *arg)
|
||||
{
|
||||
irq_set_status_flags(virq, IRQ_MOVE_PCNTXT);
|
||||
irq_domain_set_info(domain, virq, arg->hpet_index, info->chip, NULL,
|
||||
handle_edge_irq, arg->hpet_data, "edge");
|
||||
irq_domain_set_info(domain, virq, arg->hwirq, info->chip, NULL,
|
||||
handle_edge_irq, arg->data, "edge");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -473,7 +473,7 @@ struct irq_domain *hpet_create_irq_domain(int hpet_id)
|
||||
|
||||
init_irq_alloc_info(&info, NULL);
|
||||
info.type = X86_IRQ_ALLOC_TYPE_HPET_GET_PARENT;
|
||||
info.hpet_id = hpet_id;
|
||||
info.devid = hpet_id;
|
||||
parent = irq_remapping_get_irq_domain(&info);
|
||||
if (parent == NULL)
|
||||
parent = x86_vector_domain;
|
||||
@@ -502,9 +502,9 @@ int hpet_assign_irq(struct irq_domain *domain, struct hpet_channel *hc,
|
||||
|
||||
init_irq_alloc_info(&info, NULL);
|
||||
info.type = X86_IRQ_ALLOC_TYPE_HPET;
|
||||
info.hpet_data = hc;
|
||||
info.hpet_id = hpet_dev_id(domain);
|
||||
info.hpet_index = dev_num;
|
||||
info.data = hc;
|
||||
info.devid = hpet_dev_id(domain);
|
||||
info.hwirq = dev_num;
|
||||
|
||||
return irq_domain_alloc_irqs(domain, 1, NUMA_NO_NODE, &info);
|
||||
}
|
||||
|
Reference in New Issue
Block a user