mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
genirq/cpuhotplug: Skip suspended interrupts when restoring affinity
irq_restore_affinity_of_irq() restarts managed interrupts unconditionally when the first CPU in the affinity mask comes online. That's correct during normal hotplug operations, but not when resuming from S3 because the drivers are not resumed yet and interrupt delivery is not expected by them. Skip the startup of suspended interrupts and let resume_device_irqs() deal with restoring them. This ensures that irqs are not delivered to drivers during the noirq phase of resuming from S3, after non-boot CPUs are brought back online. Signed-off-by: David Stevens <stevensd@chromium.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20240424090341.72236-1-stevensd@chromium.org
This commit is contained in:
parent
7da4ba315e
commit
a60dd06af6
@ -195,10 +195,15 @@ static void irq_restore_affinity_of_irq(struct irq_desc *desc, unsigned int cpu)
|
|||||||
!irq_data_get_irq_chip(data) || !cpumask_test_cpu(cpu, affinity))
|
!irq_data_get_irq_chip(data) || !cpumask_test_cpu(cpu, affinity))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (irqd_is_managed_and_shutdown(data)) {
|
/*
|
||||||
irq_startup(desc, IRQ_RESEND, IRQ_START_COND);
|
* Don't restore suspended interrupts here when a system comes back
|
||||||
|
* from S3. They are reenabled via resume_device_irqs().
|
||||||
|
*/
|
||||||
|
if (desc->istate & IRQS_SUSPENDED)
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
if (irqd_is_managed_and_shutdown(data))
|
||||||
|
irq_startup(desc, IRQ_RESEND, IRQ_START_COND);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the interrupt can only be directed to a single target
|
* If the interrupt can only be directed to a single target
|
||||||
|
@ -800,10 +800,14 @@ void __enable_irq(struct irq_desc *desc)
|
|||||||
irq_settings_set_noprobe(desc);
|
irq_settings_set_noprobe(desc);
|
||||||
/*
|
/*
|
||||||
* Call irq_startup() not irq_enable() here because the
|
* Call irq_startup() not irq_enable() here because the
|
||||||
* interrupt might be marked NOAUTOEN. So irq_startup()
|
* interrupt might be marked NOAUTOEN so irq_startup()
|
||||||
* needs to be invoked when it gets enabled the first
|
* needs to be invoked when it gets enabled the first time.
|
||||||
* time. If it was already started up, then irq_startup()
|
* This is also required when __enable_irq() is invoked for
|
||||||
* will invoke irq_enable() under the hood.
|
* a managed and shutdown interrupt from the S3 resume
|
||||||
|
* path.
|
||||||
|
*
|
||||||
|
* If it was already started up, then irq_startup() will
|
||||||
|
* invoke irq_enable() under the hood.
|
||||||
*/
|
*/
|
||||||
irq_startup(desc, IRQ_RESEND, IRQ_START_FORCE);
|
irq_startup(desc, IRQ_RESEND, IRQ_START_FORCE);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user