mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
genirq: Handle managed irqs gracefully in irq_startup()
Affinity managed interrupts should keep their assigned affinity accross CPU hotplug. To avoid magic hackery in device drivers, the core code shall manage them transparently and set these interrupts into a managed shutdown state when the last CPU of the assigned affinity mask goes offline. The interrupt will be restarted when one of the CPUs in the assigned affinity mask comes back online. Add the necessary logic to irq_startup(). If an interrupt is requested and started up, the code checks whether it is affinity managed and if so, it checks whether a CPU in the interrupts affinity mask is online. If not, it puts the interrupt into managed shutdown state. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Jens Axboe <axboe@kernel.dk> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Keith Busch <keith.busch@intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Christoph Hellwig <hch@lst.de> Link: http://lkml.kernel.org/r/20170619235447.189851170@linutronix.de
This commit is contained in:
parent
4cde9c6b82
commit
761ea388e8
2 changed files with 62 additions and 4 deletions
|
@ -346,7 +346,7 @@ static inline bool irqd_is_started(struct irq_data *d)
|
|||
return __irqd_to_state(d) & IRQD_IRQ_STARTED;
|
||||
}
|
||||
|
||||
static inline bool irqd_is_managed_shutdown(struct irq_data *d)
|
||||
static inline bool irqd_is_managed_and_shutdown(struct irq_data *d)
|
||||
{
|
||||
return __irqd_to_state(d) & IRQD_MANAGED_SHUTDOWN;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue