genirq/affinity: Add irq_update_affinity_desc()
authorJohn Garry <john.garry@huawei.com>
Wed, 2 Dec 2020 10:36:53 +0000 (18:36 +0800)
committerMarc Zyngier <maz@kernel.org>
Fri, 11 Dec 2020 14:47:50 +0000 (14:47 +0000)
commit1d3aec89286254487df7641c30f1b14ad1d127a5
tree8e0bd644010b822c017c65f4610732e2752a9db7
parent34dd263fce3114147f21698f8e55e05b9e8185bd
genirq/affinity: Add irq_update_affinity_desc()

Add a function to allow the affinity of an interrupt be switched to
managed, such that interrupts allocated for platform devices may be
managed.

This new interface has certain limitations, and attempts to use it in the
following circumstances will fail:
- For when the kernel is configured for generic IRQ reservation mode (in
  config GENERIC_IRQ_RESERVATION_MODE). The reason being that it could
  conflict with managed vs. non-managed interrupt accounting.
- The interrupt is already started, which should not be the case during
  init
- The interrupt is already configured as managed, which means double init

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/1606905417-183214-2-git-send-email-john.garry@huawei.com
include/linux/interrupt.h
kernel/irq/manage.c