summaryrefslogtreecommitdiffstats
path: root/include/linux/irq.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-03-15 15:48:48 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-03-15 15:48:48 -0400
commitdf2e37c814d51692803245fcbecca360d4882e96 (patch)
treeddb1a459e8d6fa4d3a0be6604555892f3746cc04 /include/linux/irq.h
parent8a284c062ec923c924c79e3b1b5199b8d72904fc (diff)
parent8e7fe2660d4a98255a2741c64b64e3961d020bf5 (diff)
Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq updates from Thomas Gleixner: "The 4.6 pile of irq updates contains: - Support for IPI irqdomains to support proper integration of IPIs to and from coprocessors. The first user of this new facility is MIPS. The relevant MIPS patches come with the core to avoid merge ordering issues and have been acked by Ralf. - A new command line option to set the default interrupt affinity mask at boot time. - Support for some more new ARM and MIPS interrupt controllers: tango, alpine-msix and bcm6345-l1 - Two small cleanups for x86/apic which we merged into irq/core to avoid yet another branch in x86 with two tiny commits. - The usual set of updates, cleanups in drivers/irqchip. Mostly in the area of ARM-GIC, arada-37-xp and atmel chips. Nothing outstanding here" * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (56 commits) irqchip/irq-alpine-msi: Release the correct domain on error irqchip/mxs: Fix error check of of_io_request_and_map() irqchip/sunxi-nmi: Fix error check of of_io_request_and_map() genirq: Export IRQ functions for module use irqchip/gic/realview: Support more RealView DCC variants Documentation/bindings: Document the Alpine MSIX driver irqchip: Add the Alpine MSIX interrupt controller irqchip/gic-v3: Always return IRQ_SET_MASK_OK_DONE in gic_set_affinity irqchip/gic-v3-its: Mark its_init() and its children as __init irqchip/gic-v3: Remove gic_root_node variable from the ITS code irqchip/gic-v3: ACPI: Add redistributor support via GICC structures irqchip/gic-v3: Add ACPI support for GICv3/4 initialization irqchip/gic-v3: Refactor gic_of_init() for GICv3 driver x86/apic: Deinline _flat_send_IPI_mask, save ~150 bytes x86/apic: Deinline __default_send_IPI_*, save ~200 bytes dt-bindings: interrupt-controller: Add SoC-specific compatible string to Marvell ODMI irqchip/mips-gic: Add new DT property to reserve IPIs MIPS: Delete smp-gic.c MIPS: Make smp CMP, CPS and MT use the new generic IPI functions MIPS: Add generic SMP IPI support ...
Diffstat (limited to 'include/linux/irq.h')
-rw-r--r--include/linux/irq.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index cd14cd4a22b4..c4de62348ff2 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -133,8 +133,11 @@ struct irq_domain;
133 * Use accessor functions to deal with it 133 * Use accessor functions to deal with it
134 * @node: node index useful for balancing 134 * @node: node index useful for balancing
135 * @handler_data: per-IRQ data for the irq_chip methods 135 * @handler_data: per-IRQ data for the irq_chip methods
136 * @affinity: IRQ affinity on SMP 136 * @affinity: IRQ affinity on SMP. If this is an IPI
137 * related irq, then this is the mask of the
138 * CPUs to which an IPI can be sent.
137 * @msi_desc: MSI descriptor 139 * @msi_desc: MSI descriptor
140 * @ipi_offset: Offset of first IPI target cpu in @affinity. Optional.
138 */ 141 */
139struct irq_common_data { 142struct irq_common_data {
140 unsigned int __private state_use_accessors; 143 unsigned int __private state_use_accessors;
@@ -144,6 +147,9 @@ struct irq_common_data {
144 void *handler_data; 147 void *handler_data;
145 struct msi_desc *msi_desc; 148 struct msi_desc *msi_desc;
146 cpumask_var_t affinity; 149 cpumask_var_t affinity;
150#ifdef CONFIG_GENERIC_IRQ_IPI
151 unsigned int ipi_offset;
152#endif
147}; 153};
148 154
149/** 155/**
@@ -343,6 +349,8 @@ static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d)
343 * @irq_get_irqchip_state: return the internal state of an interrupt 349 * @irq_get_irqchip_state: return the internal state of an interrupt
344 * @irq_set_irqchip_state: set the internal state of a interrupt 350 * @irq_set_irqchip_state: set the internal state of a interrupt
345 * @irq_set_vcpu_affinity: optional to target a vCPU in a virtual machine 351 * @irq_set_vcpu_affinity: optional to target a vCPU in a virtual machine
352 * @ipi_send_single: send a single IPI to destination cpus
353 * @ipi_send_mask: send an IPI to destination cpus in cpumask
346 * @flags: chip specific flags 354 * @flags: chip specific flags
347 */ 355 */
348struct irq_chip { 356struct irq_chip {
@@ -387,6 +395,9 @@ struct irq_chip {
387 395
388 int (*irq_set_vcpu_affinity)(struct irq_data *data, void *vcpu_info); 396 int (*irq_set_vcpu_affinity)(struct irq_data *data, void *vcpu_info);
389 397
398 void (*ipi_send_single)(struct irq_data *data, unsigned int cpu);
399 void (*ipi_send_mask)(struct irq_data *data, const struct cpumask *dest);
400
390 unsigned long flags; 401 unsigned long flags;
391}; 402};
392 403
@@ -936,4 +947,12 @@ static inline u32 irq_reg_readl(struct irq_chip_generic *gc,
936 return readl(gc->reg_base + reg_offset); 947 return readl(gc->reg_base + reg_offset);
937} 948}
938 949
950/* Contrary to Linux irqs, for hardware irqs the irq number 0 is valid */
951#define INVALID_HWIRQ (~0UL)
952irq_hw_number_t ipi_get_hwirq(unsigned int irq, unsigned int cpu);
953int __ipi_send_single(struct irq_desc *desc, unsigned int cpu);
954int __ipi_send_mask(struct irq_desc *desc, const struct cpumask *dest);
955int ipi_send_single(unsigned int virq, unsigned int cpu);
956int ipi_send_mask(unsigned int virq, const struct cpumask *dest);
957
939#endif /* _LINUX_IRQ_H */ 958#endif /* _LINUX_IRQ_H */