]> git.karo-electronics.de Git - linux-beck.git/blobdiff - include/linux/irq.h
genirq: Add a new function to get IPI reverse mapping
[linux-beck.git] / include / linux / irq.h
index 3c1c96786248cb02d2d9792cce455892323ef275..10273dce058acf732bdfbfaf95dc5ba1f494fde6 100644 (file)
@@ -133,8 +133,11 @@ struct irq_domain;
  *                     Use accessor functions to deal with it
  * @node:              node index useful for balancing
  * @handler_data:      per-IRQ data for the irq_chip methods
- * @affinity:          IRQ affinity on SMP
+ * @affinity:          IRQ affinity on SMP. If this is an IPI
+ *                     related irq, then this is the mask of the
+ *                     CPUs to which an IPI can be sent.
  * @msi_desc:          MSI descriptor
+ * @ipi_offset:                Offset of first IPI target cpu in @affinity. Optional.
  */
 struct irq_common_data {
        unsigned int            state_use_accessors;
@@ -144,6 +147,9 @@ struct irq_common_data {
        void                    *handler_data;
        struct msi_desc         *msi_desc;
        cpumask_var_t           affinity;
+#ifdef CONFIG_GENERIC_IRQ_IPI
+       unsigned int            ipi_offset;
+#endif
 };
 
 /**
@@ -934,4 +940,8 @@ static inline u32 irq_reg_readl(struct irq_chip_generic *gc,
                return readl(gc->reg_base + reg_offset);
 }
 
+/* Contrary to Linux irqs, for hardware irqs the irq number 0 is valid */
+#define INVALID_HWIRQ  (~0UL)
+irq_hw_number_t ipi_get_hwirq(unsigned int irq, unsigned int cpu);
+
 #endif /* _LINUX_IRQ_H */