genirq/manage: Rework teardown_percpu_nmi()
Use the new guards to get and lock the interrupt descriptor and tidy up the code. No functional change. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/all/20250429065422.552884529@linutronix.depull/1250/head
parent
65dd1f7ca9
commit
5fec6d5cd2
|
|
@ -2634,22 +2634,13 @@ int prepare_percpu_nmi(unsigned int irq)
|
||||||
*/
|
*/
|
||||||
void teardown_percpu_nmi(unsigned int irq)
|
void teardown_percpu_nmi(unsigned int irq)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
|
||||||
struct irq_desc *desc;
|
|
||||||
|
|
||||||
WARN_ON(preemptible());
|
WARN_ON(preemptible());
|
||||||
|
|
||||||
desc = irq_get_desc_lock(irq, &flags,
|
scoped_irqdesc_get_and_lock(irq, IRQ_GET_DESC_CHECK_PERCPU) {
|
||||||
IRQ_GET_DESC_CHECK_PERCPU);
|
if (WARN_ON(!irq_is_nmi(scoped_irqdesc)))
|
||||||
if (!desc)
|
return;
|
||||||
return;
|
irq_nmi_teardown(scoped_irqdesc);
|
||||||
|
}
|
||||||
if (WARN_ON(!irq_is_nmi(desc)))
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
irq_nmi_teardown(desc);
|
|
||||||
out:
|
|
||||||
irq_put_desc_unlock(desc, flags);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __irq_get_irqchip_state(struct irq_data *data, enum irqchip_irq_state which, bool *state)
|
static int __irq_get_irqchip_state(struct irq_data *data, enum irqchip_irq_state which, bool *state)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue