summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohn Garry <john.garry@huawei.com>2020-12-02 11:36:53 +0100
committerMarc Zyngier <maz@kernel.org>2020-12-11 15:47:50 +0100
commit1d3aec89286254487df7641c30f1b14ad1d127a5 (patch)
tree8e0bd644010b822c017c65f4610732e2752a9db7 /include
parentirqchip/gic-v3-its: Flag device allocation as proxied if behind a PCI bridge (diff)
downloadlinux-1d3aec89286254487df7641c30f1b14ad1d127a5.tar.xz
linux-1d3aec89286254487df7641c30f1b14ad1d127a5.zip
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
Diffstat (limited to 'include')
-rw-r--r--include/linux/interrupt.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index ee8299eb1f52..870b3251e174 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -352,6 +352,8 @@ extern int irq_can_set_affinity(unsigned int irq);
extern int irq_select_affinity(unsigned int irq);
extern int irq_set_affinity_hint(unsigned int irq, const struct cpumask *m);
+extern int irq_update_affinity_desc(unsigned int irq,
+ struct irq_affinity_desc *affinity);
extern int
irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify);
@@ -387,6 +389,12 @@ static inline int irq_set_affinity_hint(unsigned int irq,
return -EINVAL;
}
+static inline int irq_update_affinity_desc(unsigned int irq,
+ struct irq_affinity_desc *affinity)
+{
+ return -EINVAL;
+}
+
static inline int
irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify)
{