aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/msi.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/include/linux/msi.h b/include/linux/msi.h
index e0d08517bd3d..b5ca2456769c 100644
--- a/include/linux/msi.h
+++ b/include/linux/msi.h
@@ -114,4 +114,49 @@ struct msi_controller {
114 void (*teardown_irq)(struct msi_controller *chip, unsigned int irq); 114 void (*teardown_irq)(struct msi_controller *chip, unsigned int irq);
115}; 115};
116 116
117#ifdef CONFIG_GENERIC_MSI_IRQ_DOMAIN
118struct irq_domain;
119struct irq_chip;
120struct device_node;
121struct msi_domain_info;
122
123/**
124 * struct msi_domain_ops - MSI interrupt domain callbacks
125 * @get_hwirq: Retrieve the resulting hw irq number
126 * @msi_init: Domain specific init function for MSI interrupts
127 * @msi_free: Domain specific function to free a MSI interrupts
128 */
129struct msi_domain_ops {
130 irq_hw_number_t (*get_hwirq)(struct msi_domain_info *info, void *arg);
131 int (*msi_init)(struct irq_domain *domain,
132 struct msi_domain_info *info,
133 unsigned int virq, irq_hw_number_t hwirq,
134 void *arg);
135 void (*msi_free)(struct irq_domain *domain,
136 struct msi_domain_info *info,
137 unsigned int virq);
138};
139
140/**
141 * struct msi_domain_info - MSI interrupt domain data
142 * @ops: The callback data structure
143 * @chip: The associated interrupt chip
144 * @data: Domain specific data
145 */
146struct msi_domain_info {
147 struct msi_domain_ops *ops;
148 struct irq_chip *chip;
149 void *data;
150};
151
152int msi_domain_set_affinity(struct irq_data *data, const struct cpumask *mask,
153 bool force);
154
155struct irq_domain *msi_create_irq_domain(struct device_node *of_node,
156 struct msi_domain_info *info,
157 struct irq_domain *parent);
158struct msi_domain_info *msi_get_domain_info(struct irq_domain *domain);
159
160#endif /* CONFIG_GENERIC_MSI_IRQ_DOMAIN */
161
117#endif /* LINUX_MSI_H */ 162#endif /* LINUX_MSI_H */