1 #include <linux/debugfs.h>
2 #include <linux/hardirq.h>
3 #include <linux/interrupt.h>
5 #include <linux/irqdesc.h>
6 #include <linux/irqdomain.h>
7 #include <linux/module.h>
8 #include <linux/mutex.h>
10 #include <linux/of_address.h>
11 #include <linux/seq_file.h>
12 #include <linux/slab.h>
13 #include <linux/smp.h>
16 #define IRQ_DOMAIN_MAP_LEGACY 0 /* driver allocated fixed range of irqs.
17 * ie. legacy 8259, gets irqs 1..15 */
18 #define IRQ_DOMAIN_MAP_NOMAP 1 /* no fast reverse mapping */
19 #define IRQ_DOMAIN_MAP_LINEAR 2 /* linear map of interrupts */
20 #define IRQ_DOMAIN_MAP_TREE 3 /* radix tree */
22 static LIST_HEAD(irq_domain_list);
23 static DEFINE_MUTEX(irq_domain_mutex);
26 static DEFINE_MUTEX(revmap_trees_mutex);
27 static unsigned int irq_virq_count = NR_IRQS;
28 static struct irq_domain *irq_default_domain;
30 static int default_irq_domain_match(struct irq_domain *d, struct device_node *np)
32 return d->of_node != NULL && d->of_node == np;
36 * irq_domain_alloc() - Allocate a new irq_domain data structure
37 * @of_node: optional device-tree node of the interrupt controller
38 * @revmap_type: type of reverse mapping to use
39 * @ops: map/unmap domain callbacks
40 * @host_data: Controller private data pointer
42 * Allocates and initialize and irq_domain structure. Caller is expected to
43 * register allocated irq_domain with irq_domain_register(). Returns pointer
44 * to IRQ domain, or NULL on failure.
46 static struct irq_domain *irq_domain_alloc(struct device_node *of_node,
47 unsigned int revmap_type,
48 struct irq_domain_ops *ops,
51 struct irq_domain *domain;
53 domain = kzalloc(sizeof(*domain), GFP_KERNEL);
58 domain->revmap_type = revmap_type;
60 domain->host_data = host_data;
61 domain->of_node = of_node_get(of_node);
63 if (domain->ops->match == NULL)
64 domain->ops->match = default_irq_domain_match;
69 static void irq_domain_add(struct irq_domain *domain)
71 mutex_lock(&irq_domain_mutex);
72 list_add(&domain->link, &irq_domain_list);
73 mutex_unlock(&irq_domain_mutex);
74 pr_debug("irq: Allocated domain of type %d @0x%p\n",
75 domain->revmap_type, domain);
78 static unsigned int irq_domain_legacy_revmap(struct irq_domain *domain,
79 irq_hw_number_t hwirq)
81 irq_hw_number_t first_hwirq = domain->revmap_data.legacy.first_hwirq;
82 int size = domain->revmap_data.legacy.size;
84 if (WARN_ON(hwirq < first_hwirq || hwirq >= first_hwirq + size))
86 return hwirq - first_hwirq + domain->revmap_data.legacy.first_irq;
90 * irq_domain_add_legacy() - Allocate and register a legacy revmap irq_domain.
91 * @of_node: pointer to interrupt controller's device tree node.
92 * @size: total number of irqs in legacy mapping
93 * @first_irq: first number of irq block assigned to the domain
94 * @first_hwirq: first hwirq number to use for the translation. Should normally
95 * be '0', but a positive integer can be used if the effective
96 * hwirqs numbering does not begin at zero.
97 * @ops: map/unmap domain callbacks
98 * @host_data: Controller private data pointer
100 * Note: the map() callback will be called before this function returns
101 * for all legacy interrupts except 0 (which is always the invalid irq for
102 * a legacy controller).
104 struct irq_domain *irq_domain_add_legacy(struct device_node *of_node,
106 unsigned int first_irq,
107 irq_hw_number_t first_hwirq,
108 struct irq_domain_ops *ops,
111 struct irq_domain *domain;
114 domain = irq_domain_alloc(of_node, IRQ_DOMAIN_MAP_LEGACY, ops, host_data);
118 domain->revmap_data.legacy.first_irq = first_irq;
119 domain->revmap_data.legacy.first_hwirq = first_hwirq;
120 domain->revmap_data.legacy.size = size;
122 mutex_lock(&irq_domain_mutex);
123 /* Verify that all the irqs are available */
124 for (i = 0; i < size; i++) {
125 int irq = first_irq + i;
126 struct irq_data *irq_data = irq_get_irq_data(irq);
128 if (WARN_ON(!irq_data || irq_data->domain)) {
129 mutex_unlock(&irq_domain_mutex);
130 of_node_put(domain->of_node);
136 /* Claim all of the irqs before registering a legacy domain */
137 for (i = 0; i < size; i++) {
138 struct irq_data *irq_data = irq_get_irq_data(first_irq + i);
139 irq_data->hwirq = first_hwirq + i;
140 irq_data->domain = domain;
142 mutex_unlock(&irq_domain_mutex);
144 for (i = 0; i < size; i++) {
145 int irq = first_irq + i;
146 int hwirq = first_hwirq + i;
148 /* IRQ0 gets ignored */
152 /* Legacy flags are left to default at this point,
153 * one can then use irq_create_mapping() to
154 * explicitly change them
156 ops->map(domain, irq, hwirq);
158 /* Clear norequest flags */
159 irq_clear_status_flags(irq, IRQ_NOREQUEST);
162 irq_domain_add(domain);
167 * irq_domain_add_linear() - Allocate and register a legacy revmap irq_domain.
168 * @of_node: pointer to interrupt controller's device tree node.
169 * @ops: map/unmap domain callbacks
170 * @host_data: Controller private data pointer
172 struct irq_domain *irq_domain_add_linear(struct device_node *of_node,
174 struct irq_domain_ops *ops,
177 struct irq_domain *domain;
178 unsigned int *revmap;
180 revmap = kzalloc(sizeof(*revmap) * size, GFP_KERNEL);
181 if (WARN_ON(!revmap))
184 domain = irq_domain_alloc(of_node, IRQ_DOMAIN_MAP_LINEAR, ops, host_data);
189 domain->revmap_data.linear.size = size;
190 domain->revmap_data.linear.revmap = revmap;
191 irq_domain_add(domain);
195 struct irq_domain *irq_domain_add_nomap(struct device_node *of_node,
196 struct irq_domain_ops *ops,
199 struct irq_domain *domain = irq_domain_alloc(of_node,
200 IRQ_DOMAIN_MAP_NOMAP, ops, host_data);
202 irq_domain_add(domain);
207 * irq_domain_add_tree()
208 * @of_node: pointer to interrupt controller's device tree node.
209 * @ops: map/unmap domain callbacks
211 * Note: The radix tree will be allocated later during boot automatically
212 * (the reverse mapping will use the slow path until that happens).
214 struct irq_domain *irq_domain_add_tree(struct device_node *of_node,
215 struct irq_domain_ops *ops,
218 struct irq_domain *domain = irq_domain_alloc(of_node,
219 IRQ_DOMAIN_MAP_TREE, ops, host_data);
221 INIT_RADIX_TREE(&domain->revmap_data.tree, GFP_KERNEL);
222 irq_domain_add(domain);
228 * irq_find_host() - Locates a domain for a given device node
229 * @node: device-tree node of the interrupt controller
231 struct irq_domain *irq_find_host(struct device_node *node)
233 struct irq_domain *h, *found = NULL;
235 /* We might want to match the legacy controller last since
236 * it might potentially be set to match all interrupts in
237 * the absence of a device node. This isn't a problem so far
240 mutex_lock(&irq_domain_mutex);
241 list_for_each_entry(h, &irq_domain_list, link)
242 if (h->ops->match(h, node)) {
246 mutex_unlock(&irq_domain_mutex);
249 EXPORT_SYMBOL_GPL(irq_find_host);
252 * irq_set_default_host() - Set a "default" irq domain
253 * @domain: default domain pointer
255 * For convenience, it's possible to set a "default" domain that will be used
256 * whenever NULL is passed to irq_create_mapping(). It makes life easier for
257 * platforms that want to manipulate a few hard coded interrupt numbers that
258 * aren't properly represented in the device-tree.
260 void irq_set_default_host(struct irq_domain *domain)
262 pr_debug("irq: Default domain set to @0x%p\n", domain);
264 irq_default_domain = domain;
268 * irq_set_virq_count() - Set the maximum number of linux irqs
269 * @count: number of linux irqs, capped with NR_IRQS
271 * This is mainly for use by platforms like iSeries who want to program
272 * the virtual irq number in the controller to avoid the reverse mapping
274 void irq_set_virq_count(unsigned int count)
276 pr_debug("irq: Trying to set virq count to %d\n", count);
278 BUG_ON(count < NUM_ISA_INTERRUPTS);
280 irq_virq_count = count;
283 static int irq_setup_virq(struct irq_domain *domain, unsigned int virq,
284 irq_hw_number_t hwirq)
286 struct irq_data *irq_data = irq_get_irq_data(virq);
288 irq_data->hwirq = hwirq;
289 irq_data->domain = domain;
290 if (domain->ops->map(domain, virq, hwirq)) {
291 pr_debug("irq: -> mapping failed, freeing\n");
292 irq_data->domain = NULL;
297 irq_clear_status_flags(virq, IRQ_NOREQUEST);
303 * irq_create_direct_mapping() - Allocate an irq for direct mapping
304 * @domain: domain to allocate the irq for or NULL for default domain
306 * This routine is used for irq controllers which can choose the hardware
307 * interrupt numbers they generate. In such a case it's simplest to use
308 * the linux irq as the hardware interrupt number.
310 unsigned int irq_create_direct_mapping(struct irq_domain *domain)
315 domain = irq_default_domain;
317 BUG_ON(domain == NULL);
318 WARN_ON(domain->revmap_type != IRQ_DOMAIN_MAP_NOMAP);
320 virq = irq_alloc_desc_from(1, 0);
322 pr_debug("irq: create_direct virq allocation failed\n");
325 if (virq >= irq_virq_count) {
326 pr_err("ERROR: no free irqs available below %i maximum\n",
332 pr_debug("irq: create_direct obtained virq %d\n", virq);
334 if (irq_setup_virq(domain, virq, virq)) {
343 * irq_create_mapping() - Map a hardware interrupt into linux irq space
344 * @domain: domain owning this hardware interrupt or NULL for default domain
345 * @hwirq: hardware irq number in that domain space
347 * Only one mapping per hardware interrupt is permitted. Returns a linux
349 * If the sense/trigger is to be specified, set_irq_type() should be called
350 * on the number returned from that call.
352 unsigned int irq_create_mapping(struct irq_domain *domain,
353 irq_hw_number_t hwirq)
355 unsigned int virq, hint;
357 pr_debug("irq: irq_create_mapping(0x%p, 0x%lx)\n", domain, hwirq);
359 /* Look for default domain if nececssary */
361 domain = irq_default_domain;
362 if (domain == NULL) {
363 printk(KERN_WARNING "irq_create_mapping called for"
364 " NULL domain, hwirq=%lx\n", hwirq);
368 pr_debug("irq: -> using domain @%p\n", domain);
370 /* Check if mapping already exists */
371 virq = irq_find_mapping(domain, hwirq);
373 pr_debug("irq: -> existing mapping on virq %d\n", virq);
377 /* Get a virtual interrupt number */
378 if (domain->revmap_type == IRQ_DOMAIN_MAP_LEGACY)
379 return irq_domain_legacy_revmap(domain, hwirq);
381 /* Allocate a virtual interrupt number */
382 hint = hwirq % irq_virq_count;
385 virq = irq_alloc_desc_from(hint, 0);
387 virq = irq_alloc_desc_from(1, 0);
389 pr_debug("irq: -> virq allocation failed\n");
393 if (irq_setup_virq(domain, virq, hwirq)) {
394 if (domain->revmap_type != IRQ_DOMAIN_MAP_LEGACY)
399 pr_debug("irq: irq %lu on domain %s mapped to virtual irq %u\n",
400 hwirq, domain->of_node ? domain->of_node->full_name : "null", virq);
404 EXPORT_SYMBOL_GPL(irq_create_mapping);
406 unsigned int irq_create_of_mapping(struct device_node *controller,
407 const u32 *intspec, unsigned int intsize)
409 struct irq_domain *domain;
410 irq_hw_number_t hwirq;
411 unsigned int type = IRQ_TYPE_NONE;
414 domain = controller ? irq_find_host(controller) : irq_default_domain;
416 printk(KERN_WARNING "irq: no irq domain found for %s !\n",
417 controller->full_name);
421 /* If domain has no translation, then we assume interrupt line */
422 if (domain->ops->xlate == NULL)
425 if (domain->ops->xlate(domain, controller, intspec, intsize,
431 virq = irq_create_mapping(domain, hwirq);
435 /* Set type if specified and different than the current one */
436 if (type != IRQ_TYPE_NONE &&
437 type != (irqd_get_trigger_type(irq_get_irq_data(virq))))
438 irq_set_irq_type(virq, type);
441 EXPORT_SYMBOL_GPL(irq_create_of_mapping);
444 * irq_dispose_mapping() - Unmap an interrupt
445 * @virq: linux irq number of the interrupt to unmap
447 void irq_dispose_mapping(unsigned int virq)
449 struct irq_data *irq_data = irq_get_irq_data(virq);
450 struct irq_domain *domain;
451 irq_hw_number_t hwirq;
453 if (!virq || !irq_data)
456 domain = irq_data->domain;
457 if (WARN_ON(domain == NULL))
460 /* Never unmap legacy interrupts */
461 if (domain->revmap_type == IRQ_DOMAIN_MAP_LEGACY)
464 irq_set_status_flags(virq, IRQ_NOREQUEST);
466 /* remove chip and handler */
467 irq_set_chip_and_handler(virq, NULL, NULL);
469 /* Make sure it's completed */
470 synchronize_irq(virq);
472 /* Tell the PIC about it */
473 if (domain->ops->unmap)
474 domain->ops->unmap(domain, virq);
477 /* Clear reverse map */
478 hwirq = irq_data->hwirq;
479 switch(domain->revmap_type) {
480 case IRQ_DOMAIN_MAP_LINEAR:
481 if (hwirq < domain->revmap_data.linear.size)
482 domain->revmap_data.linear.revmap[hwirq] = 0;
484 case IRQ_DOMAIN_MAP_TREE:
485 mutex_lock(&revmap_trees_mutex);
486 radix_tree_delete(&domain->revmap_data.tree, hwirq);
487 mutex_unlock(&revmap_trees_mutex);
493 EXPORT_SYMBOL_GPL(irq_dispose_mapping);
496 * irq_find_mapping() - Find a linux irq from an hw irq number.
497 * @domain: domain owning this hardware interrupt
498 * @hwirq: hardware irq number in that domain space
500 * This is a slow path, for use by generic code. It's expected that an
501 * irq controller implementation directly calls the appropriate low level
504 unsigned int irq_find_mapping(struct irq_domain *domain,
505 irq_hw_number_t hwirq)
508 unsigned int hint = hwirq % irq_virq_count;
510 /* Look for default domain if nececssary */
512 domain = irq_default_domain;
516 /* legacy -> bail early */
517 if (domain->revmap_type == IRQ_DOMAIN_MAP_LEGACY)
518 return irq_domain_legacy_revmap(domain, hwirq);
520 /* Slow path does a linear search of the map */
525 struct irq_data *data = irq_get_irq_data(i);
526 if (data && (data->domain == domain) && (data->hwirq == hwirq))
529 if (i >= irq_virq_count)
534 EXPORT_SYMBOL_GPL(irq_find_mapping);
537 * irq_radix_revmap_lookup() - Find a linux irq from a hw irq number.
538 * @domain: domain owning this hardware interrupt
539 * @hwirq: hardware irq number in that domain space
541 * This is a fast path, for use by irq controller code that uses radix tree
544 unsigned int irq_radix_revmap_lookup(struct irq_domain *domain,
545 irq_hw_number_t hwirq)
547 struct irq_data *irq_data;
549 if (WARN_ON_ONCE(domain->revmap_type != IRQ_DOMAIN_MAP_TREE))
550 return irq_find_mapping(domain, hwirq);
553 * Freeing an irq can delete nodes along the path to
554 * do the lookup via call_rcu.
557 irq_data = radix_tree_lookup(&domain->revmap_data.tree, hwirq);
561 * If found in radix tree, then fine.
562 * Else fallback to linear lookup - this should not happen in practice
563 * as it means that we failed to insert the node in the radix tree.
565 return irq_data ? irq_data->irq : irq_find_mapping(domain, hwirq);
569 * irq_radix_revmap_insert() - Insert a hw irq to linux irq number mapping.
570 * @domain: domain owning this hardware interrupt
571 * @virq: linux irq number
572 * @hwirq: hardware irq number in that domain space
574 * This is for use by irq controllers that use a radix tree reverse
575 * mapping for fast lookup.
577 void irq_radix_revmap_insert(struct irq_domain *domain, unsigned int virq,
578 irq_hw_number_t hwirq)
580 struct irq_data *irq_data = irq_get_irq_data(virq);
582 if (WARN_ON(domain->revmap_type != IRQ_DOMAIN_MAP_TREE))
586 mutex_lock(&revmap_trees_mutex);
587 radix_tree_insert(&domain->revmap_data.tree, hwirq, irq_data);
588 mutex_unlock(&revmap_trees_mutex);
593 * irq_linear_revmap() - Find a linux irq from a hw irq number.
594 * @domain: domain owning this hardware interrupt
595 * @hwirq: hardware irq number in that domain space
597 * This is a fast path, for use by irq controller code that uses linear
598 * revmaps. It does fallback to the slow path if the revmap doesn't exist
599 * yet and will create the revmap entry with appropriate locking
601 unsigned int irq_linear_revmap(struct irq_domain *domain,
602 irq_hw_number_t hwirq)
604 unsigned int *revmap;
606 if (WARN_ON_ONCE(domain->revmap_type != IRQ_DOMAIN_MAP_LINEAR))
607 return irq_find_mapping(domain, hwirq);
609 /* Check revmap bounds */
610 if (unlikely(hwirq >= domain->revmap_data.linear.size))
611 return irq_find_mapping(domain, hwirq);
613 /* Check if revmap was allocated */
614 revmap = domain->revmap_data.linear.revmap;
615 if (unlikely(revmap == NULL))
616 return irq_find_mapping(domain, hwirq);
618 /* Fill up revmap with slow path if no mapping found */
619 if (unlikely(!revmap[hwirq]))
620 revmap[hwirq] = irq_find_mapping(domain, hwirq);
622 return revmap[hwirq];
625 #ifdef CONFIG_VIRQ_DEBUG
626 static int virq_debug_show(struct seq_file *m, void *private)
629 struct irq_desc *desc;
631 static const char none[] = "none";
635 seq_printf(m, "%-5s %-7s %-15s %-18s %s\n", "virq", "hwirq",
636 "chip name", "chip data", "domain name");
638 for (i = 1; i < nr_irqs; i++) {
639 desc = irq_to_desc(i);
643 raw_spin_lock_irqsave(&desc->lock, flags);
645 if (desc->action && desc->action->handler) {
646 struct irq_chip *chip;
648 seq_printf(m, "%5d ", i);
649 seq_printf(m, "0x%05lx ", desc->irq_data.hwirq);
651 chip = irq_desc_get_chip(desc);
652 if (chip && chip->name)
656 seq_printf(m, "%-15s ", p);
658 data = irq_desc_get_chip_data(desc);
659 seq_printf(m, "0x%16p ", data);
661 if (desc->irq_data.domain->of_node)
662 p = desc->irq_data.domain->of_node->full_name;
665 seq_printf(m, "%s\n", p);
668 raw_spin_unlock_irqrestore(&desc->lock, flags);
674 static int virq_debug_open(struct inode *inode, struct file *file)
676 return single_open(file, virq_debug_show, inode->i_private);
679 static const struct file_operations virq_debug_fops = {
680 .open = virq_debug_open,
683 .release = single_release,
686 static int __init irq_debugfs_init(void)
688 if (debugfs_create_file("virq_mapping", S_IRUGO, powerpc_debugfs_root,
689 NULL, &virq_debug_fops) == NULL)
694 __initcall(irq_debugfs_init);
695 #endif /* CONFIG_VIRQ_DEBUG */
697 #else /* CONFIG_PPC */
700 * irq_domain_add() - Register an irq_domain
701 * @domain: ptr to initialized irq_domain structure
703 * Registers an irq_domain structure. The irq_domain must at a minimum be
704 * initialized with an ops structure pointer, and either a ->to_irq hook or
705 * a valid irq_base value. Everything else is optional.
707 void irq_domain_add(struct irq_domain *domain)
713 * This assumes that the irq_domain owner has already allocated
714 * the irq_descs. This block will be removed when support for dynamic
715 * allocation of irq_descs is added to irq_domain.
717 irq_domain_for_each_irq(domain, hwirq, irq) {
718 d = irq_get_irq_data(irq);
720 WARN(1, "error: assigning domain to non existant irq_desc");
724 /* things are broken; just report, don't clean up */
725 WARN(1, "error: irq_desc already assigned to a domain");
732 mutex_lock(&irq_domain_mutex);
733 list_add(&domain->link, &irq_domain_list);
734 mutex_unlock(&irq_domain_mutex);
738 * irq_domain_del() - Unregister an irq_domain
739 * @domain: ptr to registered irq_domain.
741 void irq_domain_del(struct irq_domain *domain)
746 mutex_lock(&irq_domain_mutex);
747 list_del(&domain->link);
748 mutex_unlock(&irq_domain_mutex);
750 /* Clear the irq_domain assignments */
751 irq_domain_for_each_irq(domain, hwirq, irq) {
752 d = irq_get_irq_data(irq);
757 #if defined(CONFIG_OF_IRQ)
759 * irq_create_of_mapping() - Map a linux irq number from a DT interrupt spec
761 * Used by the device tree interrupt mapping code to translate a device tree
762 * interrupt specifier to a valid linux irq number. Returns either a valid
763 * linux IRQ number or 0.
765 * When the caller no longer need the irq number returned by this function it
766 * should arrange to call irq_dispose_mapping().
768 unsigned int irq_create_of_mapping(struct device_node *controller,
769 const u32 *intspec, unsigned int intsize)
771 struct irq_domain *domain;
773 unsigned int irq, type;
776 /* Find a domain which can translate the irq spec */
777 mutex_lock(&irq_domain_mutex);
778 list_for_each_entry(domain, &irq_domain_list, link) {
779 if (!domain->ops->xlate)
781 rc = domain->ops->xlate(domain, controller,
782 intspec, intsize, &hwirq, &type);
786 mutex_unlock(&irq_domain_mutex);
791 irq = irq_domain_to_irq(domain, hwirq);
792 if (type != IRQ_TYPE_NONE)
793 irq_set_irq_type(irq, type);
794 pr_debug("%s: mapped hwirq=%i to irq=%i, flags=%x\n",
795 controller->full_name, (int)hwirq, irq, type);
798 EXPORT_SYMBOL_GPL(irq_create_of_mapping);
801 * irq_dispose_mapping() - Discard a mapping created by irq_create_of_mapping()
802 * @irq: linux irq number to be discarded
804 * Calling this function indicates the caller no longer needs a reference to
805 * the linux irq number returned by a prior call to irq_create_of_mapping().
807 void irq_dispose_mapping(unsigned int irq)
810 * nothing yet; will be filled when support for dynamic allocation of
811 * irq_descs is added to irq_domain
814 EXPORT_SYMBOL_GPL(irq_dispose_mapping);
816 int irq_domain_simple_xlate(struct irq_domain *d,
817 struct device_node *controller,
818 const u32 *intspec, unsigned int intsize,
819 unsigned long *out_hwirq, unsigned int *out_type)
821 if (d->of_node != controller)
825 if (d->nr_irq && ((intspec[0] < d->hwirq_base) ||
826 (intspec[0] >= d->hwirq_base + d->nr_irq)))
829 *out_hwirq = intspec[0];
830 *out_type = IRQ_TYPE_NONE;
832 *out_type = intspec[1] & IRQ_TYPE_SENSE_MASK;
837 * irq_domain_create_simple() - Set up a 'simple' translation range
839 void irq_domain_add_simple(struct device_node *controller, int irq_base)
841 struct irq_domain *domain;
843 domain = kzalloc(sizeof(*domain), GFP_KERNEL);
849 domain->irq_base = irq_base;
850 domain->of_node = of_node_get(controller);
851 domain->ops = &irq_domain_simple_ops;
852 irq_domain_add(domain);
854 EXPORT_SYMBOL_GPL(irq_domain_add_simple);
856 void irq_domain_generate_simple(const struct of_device_id *match,
857 u64 phys_base, unsigned int irq_start)
859 struct device_node *node;
860 pr_debug("looking for phys_base=%llx, irq_start=%i\n",
861 (unsigned long long) phys_base, (int) irq_start);
862 node = of_find_matching_node_by_address(NULL, match, phys_base);
864 irq_domain_add_simple(node, irq_start);
866 EXPORT_SYMBOL_GPL(irq_domain_generate_simple);
867 #endif /* CONFIG_OF_IRQ */
869 struct irq_domain_ops irq_domain_simple_ops = {
871 .xlate = irq_domain_simple_xlate,
872 #endif /* CONFIG_OF_IRQ */
874 EXPORT_SYMBOL_GPL(irq_domain_simple_ops);
876 #endif /* !CONFIG_PPC */