Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 apic update from Thomas Gleixner: "Trivial cleanups of the APIC related code" * 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/apic: Trivial coding style fixes x86/vector: Merge allocate_vector() into assign_vector_locked()
This commit is contained in:
@@ -218,7 +218,8 @@ static int reserve_irq_vector(struct irq_data *irqd)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int allocate_vector(struct irq_data *irqd, const struct cpumask *dest)
|
static int
|
||||||
|
assign_vector_locked(struct irq_data *irqd, const struct cpumask *dest)
|
||||||
{
|
{
|
||||||
struct apic_chip_data *apicd = apic_chip_data(irqd);
|
struct apic_chip_data *apicd = apic_chip_data(irqd);
|
||||||
bool resvd = apicd->has_reserved;
|
bool resvd = apicd->has_reserved;
|
||||||
@@ -245,22 +246,12 @@ static int allocate_vector(struct irq_data *irqd, const struct cpumask *dest)
|
|||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
|
|
||||||
vector = irq_matrix_alloc(vector_matrix, dest, resvd, &cpu);
|
vector = irq_matrix_alloc(vector_matrix, dest, resvd, &cpu);
|
||||||
if (vector > 0)
|
|
||||||
apic_update_vector(irqd, vector, cpu);
|
|
||||||
trace_vector_alloc(irqd->irq, vector, resvd, vector);
|
trace_vector_alloc(irqd->irq, vector, resvd, vector);
|
||||||
return vector;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int assign_vector_locked(struct irq_data *irqd,
|
|
||||||
const struct cpumask *dest)
|
|
||||||
{
|
|
||||||
struct apic_chip_data *apicd = apic_chip_data(irqd);
|
|
||||||
int vector = allocate_vector(irqd, dest);
|
|
||||||
|
|
||||||
if (vector < 0)
|
if (vector < 0)
|
||||||
return vector;
|
return vector;
|
||||||
|
apic_update_vector(irqd, vector, cpu);
|
||||||
|
apic_update_irq_cfg(irqd, vector, cpu);
|
||||||
|
|
||||||
apic_update_irq_cfg(irqd, apicd->vector, apicd->cpu);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user