forked from Minki/linux
pci/intr_remapping: Allocate irq_iommu on node
make it use the node from irq_desc. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> Cc: Andrew Morton <akpm@linux-foundation.org> LKML-Reference: <4A95C392.5050903@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
5bfb5b5138
commit
70590ea75b
@ -55,15 +55,12 @@ static struct irq_2_iommu *irq_2_iommu(unsigned int irq)
|
|||||||
return desc->irq_2_iommu;
|
return desc->irq_2_iommu;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct irq_2_iommu *irq_2_iommu_alloc_node(unsigned int irq, int node)
|
static struct irq_2_iommu *irq_2_iommu_alloc(unsigned int irq)
|
||||||
{
|
{
|
||||||
struct irq_desc *desc;
|
struct irq_desc *desc;
|
||||||
struct irq_2_iommu *irq_iommu;
|
struct irq_2_iommu *irq_iommu;
|
||||||
|
|
||||||
/*
|
desc = irq_to_desc(irq);
|
||||||
* alloc irq desc if not allocated already.
|
|
||||||
*/
|
|
||||||
desc = irq_to_desc_alloc_node(irq, node);
|
|
||||||
if (!desc) {
|
if (!desc) {
|
||||||
printk(KERN_INFO "can not get irq_desc for %d\n", irq);
|
printk(KERN_INFO "can not get irq_desc for %d\n", irq);
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -72,16 +69,11 @@ static struct irq_2_iommu *irq_2_iommu_alloc_node(unsigned int irq, int node)
|
|||||||
irq_iommu = desc->irq_2_iommu;
|
irq_iommu = desc->irq_2_iommu;
|
||||||
|
|
||||||
if (!irq_iommu)
|
if (!irq_iommu)
|
||||||
desc->irq_2_iommu = get_one_free_irq_2_iommu(node);
|
desc->irq_2_iommu = get_one_free_irq_2_iommu(irq_node(irq));
|
||||||
|
|
||||||
return desc->irq_2_iommu;
|
return desc->irq_2_iommu;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct irq_2_iommu *irq_2_iommu_alloc(unsigned int irq)
|
|
||||||
{
|
|
||||||
return irq_2_iommu_alloc_node(irq, cpu_to_node(boot_cpu_id));
|
|
||||||
}
|
|
||||||
|
|
||||||
#else /* !CONFIG_SPARSE_IRQ */
|
#else /* !CONFIG_SPARSE_IRQ */
|
||||||
|
|
||||||
static struct irq_2_iommu irq_2_iommuX[NR_IRQS];
|
static struct irq_2_iommu irq_2_iommuX[NR_IRQS];
|
||||||
|
Loading…
Reference in New Issue
Block a user