Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 31 Jan 2016 22:48:58 +0000 (14:48 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 31 Jan 2016 22:48:58 +0000 (14:48 -0800)
Pull IRQ fixes from Ingo Molnar:
 "Mostly irqchip driver fixes, but also an irq core crash fix and a
  build fix"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip/mxs: Add missing set_handle_irq()
  irqchip/atmel-aic: Fix wrong bit operation for IRQ priority
  irqchip/gic-v3-its: Recompute the number of pages on page size change
  base: Export platform_msi_domain_[alloc,free]_irqs
  of: MSI: Simplify irqdomain lookup
  irqdomain: Allow domain lookup with DOMAIN_BUS_WIRED token
  irqchip: Fix dependencies for archs w/o HAS_IOMEM
  irqchip/s3c24xx: Mark init_eint as __maybe_unused
  genirq: Validate action before dereferencing it in handle_irq_event_percpu()

1  2 
drivers/irqchip/Kconfig
drivers/of/irq.c
kernel/irq/irqdomain.c

diff --combined drivers/irqchip/Kconfig
index 715923d5236cc9a3cb721d2f91508e420d64ff47,90ab5910783037ebcf603d83e79f5604a9d5cdbd..fb50911b3940c0bd7234a1312e320ccff020f492
@@@ -130,11 -130,6 +130,11 @@@ config ORION_IRQCHI
        select IRQ_DOMAIN
        select MULTI_IRQ_HANDLER
  
 +config PIC32_EVIC
 +      bool
 +      select GENERIC_IRQ_CHIP
 +      select IRQ_DOMAIN
 +
  config RENESAS_INTC_IRQPIN
        bool
        select IRQ_DOMAIN
@@@ -159,6 -154,7 +159,7 @@@ config TB10X_IRQ
  config TS4800_IRQ
        tristate "TS-4800 IRQ controller"
        select IRQ_DOMAIN
+       depends on HAS_IOMEM
        help
          Support for the TS-4800 FPGA IRQ controller
  
diff --combined drivers/of/irq.c
index 706e3ff67f8b02f4403a841c8b92f66f3c0e5678,a9ea5525109b5efa1277791136dcc08bb1a8864e..7ee21ae305ae10d480adce961ad59fe284ca366e
@@@ -473,7 -473,6 +473,7 @@@ EXPORT_SYMBOL_GPL(of_irq_to_resource_ta
  
  struct of_intc_desc {
        struct list_head        list;
 +      of_irq_init_cb_t        irq_init_cb;
        struct device_node      *dev;
        struct device_node      *interrupt_parent;
  };
   */
  void __init of_irq_init(const struct of_device_id *matches)
  {
 +      const struct of_device_id *match;
        struct device_node *np, *parent = NULL;
        struct of_intc_desc *desc, *temp_desc;
        struct list_head intc_desc_list, intc_parent_list;
        INIT_LIST_HEAD(&intc_desc_list);
        INIT_LIST_HEAD(&intc_parent_list);
  
 -      for_each_matching_node(np, matches) {
 +      for_each_matching_node_and_match(np, matches, &match) {
                if (!of_find_property(np, "interrupt-controller", NULL) ||
                                !of_device_is_available(np))
                        continue;
 +
 +              if (WARN(!match->data, "of_irq_init: no init function for %s\n",
 +                       match->compatible))
 +                      continue;
 +
                /*
                 * Here, we allocate and populate an of_intc_desc with the node
                 * pointer, interrupt-parent device_node etc.
                        goto err;
                }
  
 +              desc->irq_init_cb = match->data;
                desc->dev = of_node_get(np);
                desc->interrupt_parent = of_irq_find_parent(np);
                if (desc->interrupt_parent == np)
                 * The assumption is that NULL parent means a root controller.
                 */
                list_for_each_entry_safe(desc, temp_desc, &intc_desc_list, list) {
 -                      const struct of_device_id *match;
                        int ret;
 -                      of_irq_init_cb_t irq_init_cb;
  
                        if (desc->interrupt_parent != parent)
                                continue;
  
                        list_del(&desc->list);
 -                      match = of_match_node(matches, desc->dev);
 -                      if (WARN(!match->data,
 -                          "of_irq_init: no init function for %s\n",
 -                          match->compatible)) {
 -                              kfree(desc);
 -                              continue;
 -                      }
  
 -                      pr_debug("of_irq_init: init %s @ %p, parent %p\n",
 -                               match->compatible,
 +                      pr_debug("of_irq_init: init %s (%p), parent %p\n",
 +                               desc->dev->full_name,
                                 desc->dev, desc->interrupt_parent);
 -                      irq_init_cb = (of_irq_init_cb_t)match->data;
 -                      ret = irq_init_cb(desc->dev, desc->interrupt_parent);
 +                      ret = desc->irq_init_cb(desc->dev,
 +                                              desc->interrupt_parent);
                        if (ret) {
                                kfree(desc);
                                continue;
@@@ -679,18 -680,6 +679,6 @@@ u32 of_msi_map_rid(struct device *dev, 
        return __of_msi_map_rid(dev, &msi_np, rid_in);
  }
  
- static struct irq_domain *__of_get_msi_domain(struct device_node *np,
-                                             enum irq_domain_bus_token token)
- {
-       struct irq_domain *d;
-       d = irq_find_matching_host(np, token);
-       if (!d)
-               d = irq_find_host(np);
-       return d;
- }
  /**
   * of_msi_map_get_device_domain - Use msi-map to find the relevant MSI domain
   * @dev: device for which the mapping is to be done.
@@@ -706,7 -695,7 +694,7 @@@ struct irq_domain *of_msi_map_get_devic
        struct device_node *np = NULL;
  
        __of_msi_map_rid(dev, &np, rid);
-       return __of_get_msi_domain(np, DOMAIN_BUS_PCI_MSI);
+       return irq_find_matching_host(np, DOMAIN_BUS_PCI_MSI);
  }
  
  /**
@@@ -730,7 -719,7 +718,7 @@@ struct irq_domain *of_msi_get_domain(st
        /* Check for a single msi-parent property */
        msi_np = of_parse_phandle(np, "msi-parent", 0);
        if (msi_np && !of_property_read_bool(msi_np, "#msi-cells")) {
-               d = __of_get_msi_domain(msi_np, token);
+               d = irq_find_matching_host(msi_np, token);
                if (!d)
                        of_node_put(msi_np);
                return d;
                while (!of_parse_phandle_with_args(np, "msi-parent",
                                                   "#msi-cells",
                                                   index, &args)) {
-                       d = __of_get_msi_domain(args.np, token);
+                       d = irq_find_matching_host(args.np, token);
                        if (d)
                                return d;
  
diff --combined kernel/irq/irqdomain.c
index 6e655f7acd3bf79b68f62fc4fbdf6806cfd11884,d75179735a28f8827927c0bc5093be6456c3ac91..3e56d2f03e24e6ee147e837727e6aac7a479f9aa
@@@ -575,10 -575,15 +575,15 @@@ unsigned int irq_create_fwspec_mapping(
        unsigned int type = IRQ_TYPE_NONE;
        int virq;
  
-       if (fwspec->fwnode)
-               domain = irq_find_matching_fwnode(fwspec->fwnode, DOMAIN_BUS_ANY);
-       else
+       if (fwspec->fwnode) {
+               domain = irq_find_matching_fwnode(fwspec->fwnode,
+                                                 DOMAIN_BUS_WIRED);
+               if (!domain)
+                       domain = irq_find_matching_fwnode(fwspec->fwnode,
+                                                         DOMAIN_BUS_ANY);
+       } else {
                domain = irq_default_domain;
+       }
  
        if (!domain) {
                pr_warn("no irq domain found for %s !\n",
@@@ -1061,7 -1066,6 +1066,7 @@@ void irq_domain_set_info(struct irq_dom
        __irq_set_handler(virq, handler, 0, handler_name);
        irq_set_handler_data(virq, handler_data);
  }
 +EXPORT_SYMBOL(irq_domain_set_info);
  
  /**
   * irq_domain_reset_irq_data - Clear hwirq, chip and chip_data in @irq_data
This page took 0.031003 seconds and 5 git commands to generate.