1 /* SPDX-License-Identifier: GPL-2.0 */
3 * irq_domain - IRQ translation domains
5 * Translation infrastructure between hw and linux irq numbers. This is
6 * helpful for interrupt controllers to implement mapping between hardware
7 * irq numbers and the Linux irq number space.
9 * irq_domains also have hooks for translating device tree or other
10 * firmware interrupt representations into a hardware irq number that
11 * can be mapped back to a Linux irq number without any extra platform
14 * Interrupt controller "domain" data structure. This could be defined as a
15 * irq domain controller. That is, it handles the mapping between hardware
16 * and virtual interrupt numbers for a given interrupt domain. The domain
17 * structure is generally created by the PIC code for a given PIC instance
18 * (though a domain can cover more than one PIC if they have a flat number
19 * model). It's the domain callbacks that are responsible for setting the
20 * irq_chip on a given irq_desc after it's been mapped.
22 * The host code and data structures use a fwnode_handle pointer to
23 * identify the domain. In some cases, and in order to preserve source
24 * code compatibility, this fwnode pointer is "upgraded" to a DT
25 * device_node. For those firmware infrastructures that do not provide
26 * a unique identifier for an interrupt controller, the irq_domain
27 * code offers a fwnode allocator.
30 #ifndef _LINUX_IRQDOMAIN_H
31 #define _LINUX_IRQDOMAIN_H
33 #include <linux/types.h>
34 #include <linux/irqdomain_defs.h>
35 #include <linux/irqhandler.h>
37 #include <linux/mutex.h>
38 #include <linux/radix-tree.h>
48 struct irq_affinity_desc;
49 struct msi_parent_ops;
51 #define IRQ_DOMAIN_IRQ_SPEC_PARAMS 16
54 * struct irq_fwspec - generic IRQ specifier structure
56 * @fwnode: Pointer to a firmware-specific descriptor
57 * @param_count: Number of device-specific parameters
58 * @param: Device-specific parameters
60 * This structure, directly modeled after of_phandle_args, is used to
61 * pass a device-specific description of an interrupt.
64 struct fwnode_handle *fwnode;
66 u32 param[IRQ_DOMAIN_IRQ_SPEC_PARAMS];
69 /* Conversion function from of_phandle_args fields to fwspec */
70 void of_phandle_args_to_fwspec(struct device_node *np, const u32 *args,
71 unsigned int count, struct irq_fwspec *fwspec);
74 * struct irq_domain_ops - Methods for irq_domain objects
75 * @match: Match an interrupt controller device node to a host, returns
77 * @select: Match an interrupt controller fw specification. It is more generic
78 * than @match as it receives a complete struct irq_fwspec. Therefore,
79 * @select is preferred if provided. Returns 1 on a match.
80 * @map: Create or update a mapping between a virtual irq number and a hw
81 * irq number. This is called only once for a given mapping.
82 * @unmap: Dispose of such a mapping
83 * @xlate: Given a device tree node and interrupt specifier, decode
84 * the hardware irq number and linux irq type value.
85 * @alloc: Allocate @nr_irqs interrupts starting from @virq.
86 * @free: Free @nr_irqs interrupts starting from @virq.
87 * @activate: Activate one interrupt in HW (@irqd). If @reserve is set, only
88 * reserve the vector. If unset, assign the vector (called from
90 * @deactivate: Disarm one interrupt (@irqd).
91 * @translate: Given @fwspec, decode the hardware irq number (@out_hwirq) and
92 * linux irq type value (@out_type). This is a generalised @xlate
93 * (over struct irq_fwspec) and is preferred if provided.
94 * @debug_show: For domains to show specific data for an interrupt in debugfs.
96 * Functions below are provided by the driver and called whenever a new mapping
97 * is created or an old mapping is disposed. The driver can then proceed to
98 * whatever internal data structures management is required. It also needs
99 * to setup the irq_desc when returning from map().
101 struct irq_domain_ops {
102 int (*match)(struct irq_domain *d, struct device_node *node,
103 enum irq_domain_bus_token bus_token);
104 int (*select)(struct irq_domain *d, struct irq_fwspec *fwspec,
105 enum irq_domain_bus_token bus_token);
106 int (*map)(struct irq_domain *d, unsigned int virq, irq_hw_number_t hw);
107 void (*unmap)(struct irq_domain *d, unsigned int virq);
108 int (*xlate)(struct irq_domain *d, struct device_node *node,
109 const u32 *intspec, unsigned int intsize,
110 unsigned long *out_hwirq, unsigned int *out_type);
111 #ifdef CONFIG_IRQ_DOMAIN_HIERARCHY
112 /* extended V2 interfaces to support hierarchy irq_domains */
113 int (*alloc)(struct irq_domain *d, unsigned int virq,
114 unsigned int nr_irqs, void *arg);
115 void (*free)(struct irq_domain *d, unsigned int virq,
116 unsigned int nr_irqs);
117 int (*activate)(struct irq_domain *d, struct irq_data *irqd, bool reserve);
118 void (*deactivate)(struct irq_domain *d, struct irq_data *irq_data);
119 int (*translate)(struct irq_domain *d, struct irq_fwspec *fwspec,
120 unsigned long *out_hwirq, unsigned int *out_type);
122 #ifdef CONFIG_GENERIC_IRQ_DEBUGFS
123 void (*debug_show)(struct seq_file *m, struct irq_domain *d,
124 struct irq_data *irqd, int ind);
128 extern const struct irq_domain_ops irq_generic_chip_ops;
130 struct irq_domain_chip_generic;
133 * struct irq_domain - Hardware interrupt number translation object
134 * @link: Element in global irq_domain list.
135 * @name: Name of interrupt domain
136 * @ops: Pointer to irq_domain methods
137 * @host_data: Private data pointer for use by owner. Not touched by irq_domain
139 * @flags: Per irq_domain flags
140 * @mapcount: The number of mapped interrupts
141 * @mutex: Domain lock, hierarchical domains use root domain's lock
142 * @root: Pointer to root domain, or containing structure if non-hierarchical
145 * @fwnode: Pointer to firmware node associated with the irq_domain. Pretty easy
146 * to swap it for the of_node via the irq_domain_get_of_node accessor
147 * @bus_token: @fwnode's device_node might be used for several irq domains. But
148 * in connection with @bus_token, the pair shall be unique in a
150 * @gc: Pointer to a list of generic chips. There is a helper function for
151 * setting up one or more generic chips for interrupt controllers
152 * drivers using the generic chip library which uses this pointer.
153 * @dev: Pointer to the device which instantiated the irqdomain
154 * With per device irq domains this is not necessarily the same
156 * @pm_dev: Pointer to a device that can be utilized for power management
157 * purposes related to the irq domain.
158 * @parent: Pointer to parent irq_domain to support hierarchy irq_domains
159 * @msi_parent_ops: Pointer to MSI parent domain methods for per device domain init
160 * @exit: Function called when the domain is destroyed
162 * Revmap data, used internally by the irq domain code:
163 * @hwirq_max: Top limit for the HW irq number. Especially to avoid
164 * conflicts/failures with reserved HW irqs. Can be ~0.
165 * @revmap_size: Size of the linear map table @revmap
166 * @revmap_tree: Radix map tree for hwirqs that don't fit in the linear map
167 * @revmap: Linear table of irq_data pointers
170 struct list_head link;
172 const struct irq_domain_ops *ops;
175 unsigned int mapcount;
177 struct irq_domain *root;
180 struct fwnode_handle *fwnode;
181 enum irq_domain_bus_token bus_token;
182 struct irq_domain_chip_generic *gc;
184 struct device *pm_dev;
185 #ifdef CONFIG_IRQ_DOMAIN_HIERARCHY
186 struct irq_domain *parent;
188 #ifdef CONFIG_GENERIC_MSI_IRQ
189 const struct msi_parent_ops *msi_parent_ops;
191 void (*exit)(struct irq_domain *d);
193 /* reverse map data. The linear map gets appended to the irq_domain */
194 irq_hw_number_t hwirq_max;
195 unsigned int revmap_size;
196 struct radix_tree_root revmap_tree;
197 struct irq_data __rcu *revmap[] __counted_by(revmap_size);
200 /* Irq domain flags */
202 /* Irq domain is hierarchical */
203 IRQ_DOMAIN_FLAG_HIERARCHY = (1 << 0),
205 /* Irq domain name was allocated internally */
206 IRQ_DOMAIN_NAME_ALLOCATED = (1 << 1),
208 /* Irq domain is an IPI domain with virq per cpu */
209 IRQ_DOMAIN_FLAG_IPI_PER_CPU = (1 << 2),
211 /* Irq domain is an IPI domain with single virq */
212 IRQ_DOMAIN_FLAG_IPI_SINGLE = (1 << 3),
214 /* Irq domain implements MSIs */
215 IRQ_DOMAIN_FLAG_MSI = (1 << 4),
218 * Irq domain implements isolated MSI, see msi_device_has_isolated_msi()
220 IRQ_DOMAIN_FLAG_ISOLATED_MSI = (1 << 5),
222 /* Irq domain doesn't translate anything */
223 IRQ_DOMAIN_FLAG_NO_MAP = (1 << 6),
225 /* Irq domain is a MSI parent domain */
226 IRQ_DOMAIN_FLAG_MSI_PARENT = (1 << 8),
228 /* Irq domain is a MSI device domain */
229 IRQ_DOMAIN_FLAG_MSI_DEVICE = (1 << 9),
231 /* Irq domain must destroy generic chips when removed */
232 IRQ_DOMAIN_FLAG_DESTROY_GC = (1 << 10),
235 * Flags starting from IRQ_DOMAIN_FLAG_NONCORE are reserved
236 * for implementation specific purposes and ignored by the
239 IRQ_DOMAIN_FLAG_NONCORE = (1 << 16),
242 static inline struct device_node *irq_domain_get_of_node(struct irq_domain *d)
244 return to_of_node(d->fwnode);
247 static inline void irq_domain_set_pm_device(struct irq_domain *d,
254 #ifdef CONFIG_IRQ_DOMAIN
255 struct fwnode_handle *__irq_domain_alloc_fwnode(unsigned int type, int id,
256 const char *name, phys_addr_t *pa);
260 IRQCHIP_FWNODE_NAMED,
261 IRQCHIP_FWNODE_NAMED_ID,
265 struct fwnode_handle *irq_domain_alloc_named_fwnode(const char *name)
267 return __irq_domain_alloc_fwnode(IRQCHIP_FWNODE_NAMED, 0, name, NULL);
271 struct fwnode_handle *irq_domain_alloc_named_id_fwnode(const char *name, int id)
273 return __irq_domain_alloc_fwnode(IRQCHIP_FWNODE_NAMED_ID, id, name,
277 static inline struct fwnode_handle *irq_domain_alloc_fwnode(phys_addr_t *pa)
279 return __irq_domain_alloc_fwnode(IRQCHIP_FWNODE_REAL, 0, NULL, pa);
282 void irq_domain_free_fwnode(struct fwnode_handle *fwnode);
284 struct irq_domain_chip_generic_info;
287 * struct irq_domain_info - Domain information structure
288 * @fwnode: firmware node for the interrupt controller
289 * @domain_flags: Additional flags to add to the domain flags
290 * @size: Size of linear map; 0 for radix mapping only
291 * @hwirq_max: Maximum number of interrupts supported by controller
292 * @direct_max: Maximum value of direct maps;
293 * Use ~0 for no limit; 0 for no direct mapping
294 * @bus_token: Domain bus token
295 * @ops: Domain operation callbacks
296 * @host_data: Controller private data pointer
297 * @dgc_info: Geneneric chip information structure pointer used to
298 * create generic chips for the domain if not NULL.
299 * @init: Function called when the domain is created.
300 * Allow to do some additional domain initialisation.
301 * @exit: Function called when the domain is destroyed.
302 * Allow to do some additional cleanup operation.
304 struct irq_domain_info {
305 struct fwnode_handle *fwnode;
306 unsigned int domain_flags;
308 irq_hw_number_t hwirq_max;
310 enum irq_domain_bus_token bus_token;
311 const struct irq_domain_ops *ops;
313 #ifdef CONFIG_IRQ_DOMAIN_HIERARCHY
315 * @parent: Pointer to the parent irq domain used in a hierarchy domain
317 struct irq_domain *parent;
319 struct irq_domain_chip_generic_info *dgc_info;
320 int (*init)(struct irq_domain *d);
321 void (*exit)(struct irq_domain *d);
324 struct irq_domain *irq_domain_instantiate(const struct irq_domain_info *info);
325 struct irq_domain *devm_irq_domain_instantiate(struct device *dev,
326 const struct irq_domain_info *info);
328 struct irq_domain *irq_domain_create_simple(struct fwnode_handle *fwnode,
330 unsigned int first_irq,
331 const struct irq_domain_ops *ops,
333 struct irq_domain *irq_domain_add_legacy(struct device_node *of_node,
335 unsigned int first_irq,
336 irq_hw_number_t first_hwirq,
337 const struct irq_domain_ops *ops,
339 struct irq_domain *irq_domain_create_legacy(struct fwnode_handle *fwnode,
341 unsigned int first_irq,
342 irq_hw_number_t first_hwirq,
343 const struct irq_domain_ops *ops,
345 extern struct irq_domain *irq_find_matching_fwspec(struct irq_fwspec *fwspec,
346 enum irq_domain_bus_token bus_token);
347 extern void irq_set_default_host(struct irq_domain *host);
348 extern struct irq_domain *irq_get_default_host(void);
349 extern int irq_domain_alloc_descs(int virq, unsigned int nr_irqs,
350 irq_hw_number_t hwirq, int node,
351 const struct irq_affinity_desc *affinity);
353 static inline struct fwnode_handle *of_node_to_fwnode(struct device_node *node)
355 return node ? &node->fwnode : NULL;
358 extern const struct fwnode_operations irqchip_fwnode_ops;
360 static inline bool is_fwnode_irqchip(const struct fwnode_handle *fwnode)
362 return fwnode && fwnode->ops == &irqchip_fwnode_ops;
365 extern void irq_domain_update_bus_token(struct irq_domain *domain,
366 enum irq_domain_bus_token bus_token);
369 struct irq_domain *irq_find_matching_fwnode(struct fwnode_handle *fwnode,
370 enum irq_domain_bus_token bus_token)
372 struct irq_fwspec fwspec = {
376 return irq_find_matching_fwspec(&fwspec, bus_token);
379 static inline struct irq_domain *irq_find_matching_host(struct device_node *node,
380 enum irq_domain_bus_token bus_token)
382 return irq_find_matching_fwnode(of_node_to_fwnode(node), bus_token);
385 static inline struct irq_domain *irq_find_host(struct device_node *node)
387 struct irq_domain *d;
389 d = irq_find_matching_host(node, DOMAIN_BUS_WIRED);
391 d = irq_find_matching_host(node, DOMAIN_BUS_ANY);
396 static inline struct irq_domain *irq_domain_add_simple(struct device_node *of_node,
398 unsigned int first_irq,
399 const struct irq_domain_ops *ops,
402 return irq_domain_create_simple(of_node_to_fwnode(of_node), size, first_irq, ops, host_data);
406 * irq_domain_add_linear() - Allocate and register a linear revmap irq_domain.
407 * @of_node: pointer to interrupt controller's device tree node.
408 * @size: Number of interrupts in the domain.
409 * @ops: map/unmap domain callbacks
410 * @host_data: Controller private data pointer
412 static inline struct irq_domain *irq_domain_add_linear(struct device_node *of_node,
414 const struct irq_domain_ops *ops,
417 struct irq_domain_info info = {
418 .fwnode = of_node_to_fwnode(of_node),
422 .host_data = host_data,
424 struct irq_domain *d;
426 d = irq_domain_instantiate(&info);
427 return IS_ERR(d) ? NULL : d;
430 #ifdef CONFIG_IRQ_DOMAIN_NOMAP
431 static inline struct irq_domain *irq_domain_add_nomap(struct device_node *of_node,
432 unsigned int max_irq,
433 const struct irq_domain_ops *ops,
436 struct irq_domain_info info = {
437 .fwnode = of_node_to_fwnode(of_node),
438 .hwirq_max = max_irq,
439 .direct_max = max_irq,
441 .host_data = host_data,
443 struct irq_domain *d;
445 d = irq_domain_instantiate(&info);
446 return IS_ERR(d) ? NULL : d;
449 extern unsigned int irq_create_direct_mapping(struct irq_domain *host);
452 static inline struct irq_domain *irq_domain_add_tree(struct device_node *of_node,
453 const struct irq_domain_ops *ops,
456 struct irq_domain_info info = {
457 .fwnode = of_node_to_fwnode(of_node),
460 .host_data = host_data,
462 struct irq_domain *d;
464 d = irq_domain_instantiate(&info);
465 return IS_ERR(d) ? NULL : d;
468 static inline struct irq_domain *irq_domain_create_linear(struct fwnode_handle *fwnode,
470 const struct irq_domain_ops *ops,
473 struct irq_domain_info info = {
478 .host_data = host_data,
480 struct irq_domain *d;
482 d = irq_domain_instantiate(&info);
483 return IS_ERR(d) ? NULL : d;
486 static inline struct irq_domain *irq_domain_create_tree(struct fwnode_handle *fwnode,
487 const struct irq_domain_ops *ops,
490 struct irq_domain_info info = {
494 .host_data = host_data,
496 struct irq_domain *d;
498 d = irq_domain_instantiate(&info);
499 return IS_ERR(d) ? NULL : d;
502 extern void irq_domain_remove(struct irq_domain *host);
504 extern int irq_domain_associate(struct irq_domain *domain, unsigned int irq,
505 irq_hw_number_t hwirq);
506 extern void irq_domain_associate_many(struct irq_domain *domain,
507 unsigned int irq_base,
508 irq_hw_number_t hwirq_base, int count);
510 extern unsigned int irq_create_mapping_affinity(struct irq_domain *host,
511 irq_hw_number_t hwirq,
512 const struct irq_affinity_desc *affinity);
513 extern unsigned int irq_create_fwspec_mapping(struct irq_fwspec *fwspec);
514 extern void irq_dispose_mapping(unsigned int virq);
516 static inline unsigned int irq_create_mapping(struct irq_domain *host,
517 irq_hw_number_t hwirq)
519 return irq_create_mapping_affinity(host, hwirq, NULL);
522 extern struct irq_desc *__irq_resolve_mapping(struct irq_domain *domain,
523 irq_hw_number_t hwirq,
526 static inline struct irq_desc *irq_resolve_mapping(struct irq_domain *domain,
527 irq_hw_number_t hwirq)
529 return __irq_resolve_mapping(domain, hwirq, NULL);
533 * irq_find_mapping() - Find a linux irq from a hw irq number.
534 * @domain: domain owning this hardware interrupt
535 * @hwirq: hardware irq number in that domain space
537 static inline unsigned int irq_find_mapping(struct irq_domain *domain,
538 irq_hw_number_t hwirq)
542 if (__irq_resolve_mapping(domain, hwirq, &irq))
548 static inline unsigned int irq_linear_revmap(struct irq_domain *domain,
549 irq_hw_number_t hwirq)
551 return irq_find_mapping(domain, hwirq);
554 extern const struct irq_domain_ops irq_domain_simple_ops;
556 /* stock xlate functions */
557 int irq_domain_xlate_onecell(struct irq_domain *d, struct device_node *ctrlr,
558 const u32 *intspec, unsigned int intsize,
559 irq_hw_number_t *out_hwirq, unsigned int *out_type);
560 int irq_domain_xlate_twocell(struct irq_domain *d, struct device_node *ctrlr,
561 const u32 *intspec, unsigned int intsize,
562 irq_hw_number_t *out_hwirq, unsigned int *out_type);
563 int irq_domain_xlate_onetwocell(struct irq_domain *d, struct device_node *ctrlr,
564 const u32 *intspec, unsigned int intsize,
565 irq_hw_number_t *out_hwirq, unsigned int *out_type);
567 int irq_domain_translate_twocell(struct irq_domain *d,
568 struct irq_fwspec *fwspec,
569 unsigned long *out_hwirq,
570 unsigned int *out_type);
572 int irq_domain_translate_onecell(struct irq_domain *d,
573 struct irq_fwspec *fwspec,
574 unsigned long *out_hwirq,
575 unsigned int *out_type);
578 int irq_reserve_ipi(struct irq_domain *domain, const struct cpumask *dest);
579 int irq_destroy_ipi(unsigned int irq, const struct cpumask *dest);
581 /* V2 interfaces to support hierarchy IRQ domains. */
582 extern struct irq_data *irq_domain_get_irq_data(struct irq_domain *domain,
584 extern void irq_domain_set_info(struct irq_domain *domain, unsigned int virq,
585 irq_hw_number_t hwirq,
586 const struct irq_chip *chip,
587 void *chip_data, irq_flow_handler_t handler,
588 void *handler_data, const char *handler_name);
589 extern void irq_domain_reset_irq_data(struct irq_data *irq_data);
590 #ifdef CONFIG_IRQ_DOMAIN_HIERARCHY
591 extern struct irq_domain *irq_domain_create_hierarchy(struct irq_domain *parent,
592 unsigned int flags, unsigned int size,
593 struct fwnode_handle *fwnode,
594 const struct irq_domain_ops *ops, void *host_data);
596 static inline struct irq_domain *irq_domain_add_hierarchy(struct irq_domain *parent,
599 struct device_node *node,
600 const struct irq_domain_ops *ops,
603 return irq_domain_create_hierarchy(parent, flags, size,
604 of_node_to_fwnode(node),
608 extern int __irq_domain_alloc_irqs(struct irq_domain *domain, int irq_base,
609 unsigned int nr_irqs, int node, void *arg,
611 const struct irq_affinity_desc *affinity);
612 extern void irq_domain_free_irqs(unsigned int virq, unsigned int nr_irqs);
613 extern int irq_domain_activate_irq(struct irq_data *irq_data, bool early);
614 extern void irq_domain_deactivate_irq(struct irq_data *irq_data);
616 static inline int irq_domain_alloc_irqs(struct irq_domain *domain,
617 unsigned int nr_irqs, int node, void *arg)
619 return __irq_domain_alloc_irqs(domain, -1, nr_irqs, node, arg, false,
623 extern int irq_domain_alloc_irqs_hierarchy(struct irq_domain *domain,
624 unsigned int irq_base,
625 unsigned int nr_irqs, void *arg);
626 extern int irq_domain_set_hwirq_and_chip(struct irq_domain *domain,
628 irq_hw_number_t hwirq,
629 const struct irq_chip *chip,
631 extern void irq_domain_free_irqs_common(struct irq_domain *domain,
633 unsigned int nr_irqs);
634 extern void irq_domain_free_irqs_top(struct irq_domain *domain,
635 unsigned int virq, unsigned int nr_irqs);
637 extern int irq_domain_push_irq(struct irq_domain *domain, int virq, void *arg);
638 extern int irq_domain_pop_irq(struct irq_domain *domain, int virq);
640 extern int irq_domain_alloc_irqs_parent(struct irq_domain *domain,
641 unsigned int irq_base,
642 unsigned int nr_irqs, void *arg);
644 extern void irq_domain_free_irqs_parent(struct irq_domain *domain,
645 unsigned int irq_base,
646 unsigned int nr_irqs);
648 extern int irq_domain_disconnect_hierarchy(struct irq_domain *domain,
651 static inline bool irq_domain_is_hierarchy(struct irq_domain *domain)
653 return domain->flags & IRQ_DOMAIN_FLAG_HIERARCHY;
656 static inline bool irq_domain_is_ipi(struct irq_domain *domain)
658 return domain->flags &
659 (IRQ_DOMAIN_FLAG_IPI_PER_CPU | IRQ_DOMAIN_FLAG_IPI_SINGLE);
662 static inline bool irq_domain_is_ipi_per_cpu(struct irq_domain *domain)
664 return domain->flags & IRQ_DOMAIN_FLAG_IPI_PER_CPU;
667 static inline bool irq_domain_is_ipi_single(struct irq_domain *domain)
669 return domain->flags & IRQ_DOMAIN_FLAG_IPI_SINGLE;
672 static inline bool irq_domain_is_msi(struct irq_domain *domain)
674 return domain->flags & IRQ_DOMAIN_FLAG_MSI;
677 static inline bool irq_domain_is_msi_parent(struct irq_domain *domain)
679 return domain->flags & IRQ_DOMAIN_FLAG_MSI_PARENT;
682 static inline bool irq_domain_is_msi_device(struct irq_domain *domain)
684 return domain->flags & IRQ_DOMAIN_FLAG_MSI_DEVICE;
687 #else /* CONFIG_IRQ_DOMAIN_HIERARCHY */
688 static inline int irq_domain_alloc_irqs(struct irq_domain *domain,
689 unsigned int nr_irqs, int node, void *arg)
694 static inline void irq_domain_free_irqs(unsigned int virq,
695 unsigned int nr_irqs) { }
697 static inline bool irq_domain_is_hierarchy(struct irq_domain *domain)
702 static inline bool irq_domain_is_ipi(struct irq_domain *domain)
707 static inline bool irq_domain_is_ipi_per_cpu(struct irq_domain *domain)
712 static inline bool irq_domain_is_ipi_single(struct irq_domain *domain)
717 static inline bool irq_domain_is_msi(struct irq_domain *domain)
722 static inline bool irq_domain_is_msi_parent(struct irq_domain *domain)
727 static inline bool irq_domain_is_msi_device(struct irq_domain *domain)
732 #endif /* CONFIG_IRQ_DOMAIN_HIERARCHY */
734 #ifdef CONFIG_GENERIC_MSI_IRQ
735 int msi_device_domain_alloc_wired(struct irq_domain *domain, unsigned int hwirq,
737 void msi_device_domain_free_wired(struct irq_domain *domain, unsigned int virq);
739 static inline int msi_device_domain_alloc_wired(struct irq_domain *domain, unsigned int hwirq,
745 static inline void msi_device_domain_free_wired(struct irq_domain *domain, unsigned int virq)
751 #else /* CONFIG_IRQ_DOMAIN */
752 static inline void irq_dispose_mapping(unsigned int virq) { }
753 static inline struct irq_domain *irq_find_matching_fwnode(
754 struct fwnode_handle *fwnode, enum irq_domain_bus_token bus_token)
758 #endif /* !CONFIG_IRQ_DOMAIN */
760 #endif /* _LINUX_IRQDOMAIN_H */