Commit 5f2dbbc5 authored by Jiang Liu's avatar Jiang Liu Committed by Thomas Gleixner

x86/irq: Use accessor irq_data_get_node()

Use accessor irq_data_get_node() to hide struct irq_data
implementation detail, so we can move node to irq_data_common later.
Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent e4925198
...@@ -296,7 +296,7 @@ static int x86_vector_alloc_irqs(struct irq_domain *domain, unsigned int virq, ...@@ -296,7 +296,7 @@ static int x86_vector_alloc_irqs(struct irq_domain *domain, unsigned int virq,
struct irq_alloc_info *info = arg; struct irq_alloc_info *info = arg;
struct apic_chip_data *data; struct apic_chip_data *data;
struct irq_data *irq_data; struct irq_data *irq_data;
int i, err; int i, err, node;
if (disable_apic) if (disable_apic)
return -ENXIO; return -ENXIO;
...@@ -308,12 +308,13 @@ static int x86_vector_alloc_irqs(struct irq_domain *domain, unsigned int virq, ...@@ -308,12 +308,13 @@ static int x86_vector_alloc_irqs(struct irq_domain *domain, unsigned int virq,
for (i = 0; i < nr_irqs; i++) { for (i = 0; i < nr_irqs; i++) {
irq_data = irq_domain_get_irq_data(domain, virq + i); irq_data = irq_domain_get_irq_data(domain, virq + i);
BUG_ON(!irq_data); BUG_ON(!irq_data);
node = irq_data_get_node(irq_data);
#ifdef CONFIG_X86_IO_APIC #ifdef CONFIG_X86_IO_APIC
if (virq + i < nr_legacy_irqs() && legacy_irq_data[virq + i]) if (virq + i < nr_legacy_irqs() && legacy_irq_data[virq + i])
data = legacy_irq_data[virq + i]; data = legacy_irq_data[virq + i];
else else
#endif #endif
data = alloc_apic_chip_data(irq_data->node); data = alloc_apic_chip_data(node);
if (!data) { if (!data) {
err = -ENOMEM; err = -ENOMEM;
goto error; goto error;
...@@ -322,8 +323,7 @@ static int x86_vector_alloc_irqs(struct irq_domain *domain, unsigned int virq, ...@@ -322,8 +323,7 @@ static int x86_vector_alloc_irqs(struct irq_domain *domain, unsigned int virq,
irq_data->chip = &lapic_controller; irq_data->chip = &lapic_controller;
irq_data->chip_data = data; irq_data->chip_data = data;
irq_data->hwirq = virq + i; irq_data->hwirq = virq + i;
err = assign_irq_vector_policy(virq, irq_data->node, data, err = assign_irq_vector_policy(virq, node, data, info);
info);
if (err) if (err)
goto error; goto error;
} }
......
...@@ -89,7 +89,7 @@ static int uv_domain_alloc(struct irq_domain *domain, unsigned int virq, ...@@ -89,7 +89,7 @@ static int uv_domain_alloc(struct irq_domain *domain, unsigned int virq,
return -EINVAL; return -EINVAL;
chip_data = kmalloc_node(sizeof(*chip_data), GFP_KERNEL, chip_data = kmalloc_node(sizeof(*chip_data), GFP_KERNEL,
irq_data->node); irq_data_get_node(irq_data));
if (!chip_data) if (!chip_data)
return -ENOMEM; return -ENOMEM;
......
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