Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 18 Sep 2015 15:11:42 +0000 (08:11 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 18 Sep 2015 15:11:42 +0000 (08:11 -0700)
Pull irq updates from Thomas Gleixner:
 "This is a rather large update post rc1 due to the final steps of
  cleanups and API changes which had to wait for the preparatory patches
  to hit your tree.

   - Regression fixes for ARM GIC irqchips

   - Regression fixes and lockdep anotations for renesas irq chips

   - The leftovers of the cleanup and preparatory patches which have
     been ignored by maintainers

   - Final conversions of the newly merged users of obsolete APIs

   - Final removal of obsolete APIs

   - Final removal of ARM artifacts which had been introduced during the
     conversion of ARM to the generic interrupt code.

   - Final split of the irq_data into chip specific and common data to
     reflect the needs of hierarchical irq domains.

   - Treewide removal of the first argument of interrupt flow handlers,
     i.e. the irq number, which is not used by the majority of handlers
     and simple to retrieve from the other argument the irq descriptor.

   - A few comment updates and build warning fixes"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (40 commits)
  arm64: Remove ununsed set_irq_flags
  ARM: Remove ununsed set_irq_flags
  sh: Kill off set_irq_flags usage
  irqchip: Kill off set_irq_flags usage
  gpu/drm: Kill off set_irq_flags usage
  genirq: Remove irq argument from irq flow handlers
  genirq: Move field 'msi_desc' from irq_data into irq_common_data
  genirq: Move field 'affinity' from irq_data into irq_common_data
  genirq: Move field 'handler_data' from irq_data into irq_common_data
  genirq: Move field 'node' from irq_data into irq_common_data
  irqchip/gic-v3: Use IRQD_FORWARDED_TO_VCPU flag
  irqchip/gic: Use IRQD_FORWARDED_TO_VCPU flag
  genirq: Provide IRQD_FORWARDED_TO_VCPU status flag
  genirq: Simplify irq_data_to_desc()
  genirq: Remove __irq_set_handler_locked()
  pinctrl/pistachio: Use irq_set_handler_locked
  gpio: vf610: Use irq_set_handler_locked
  powerpc/mpc8xx: Use irq_set_handler_locked()
  powerpc/ipic: Use irq_set_handler_locked()
  powerpc/cpm2: Use irq_set_handler_locked()
  ...

1  2 
drivers/gpio/gpio-mxc.c
drivers/gpio/gpio-mxs.c
drivers/gpio/gpio-omap.c
drivers/pinctrl/samsung/pinctrl-s3c24xx.c

diff --combined drivers/gpio/gpio-mxc.c
index 8813abab9736e86246d0ab90740fbbf89c70fbbc,5e3235a73bf94b9462dc165cc799142decd937a0..b8dd847443c50750429a0d2a4b00407351490fd7
@@@ -272,7 -272,7 +272,7 @@@ static void mxc_gpio_irq_handler(struc
  }
  
  /* MX1 and MX3 has one interrupt *per* gpio port */
- static void mx3_gpio_irq_handler(u32 irq, struct irq_desc *desc)
+ static void mx3_gpio_irq_handler(struct irq_desc *desc)
  {
        u32 irq_stat;
        struct mxc_gpio_port *port = irq_desc_get_handler_data(desc);
  }
  
  /* MX2 has one interrupt *for all* gpio ports */
- static void mx2_gpio_irq_handler(u32 irq, struct irq_desc *desc)
+ static void mx2_gpio_irq_handler(struct irq_desc *desc)
  {
        u32 irq_msk, irq_stat;
        struct mxc_gpio_port *port;
@@@ -339,15 -339,13 +339,15 @@@ static int gpio_set_wake_irq(struct irq
        return 0;
  }
  
 -static void mxc_gpio_init_gc(struct mxc_gpio_port *port, int irq_base)
 +static int mxc_gpio_init_gc(struct mxc_gpio_port *port, int irq_base)
  {
        struct irq_chip_generic *gc;
        struct irq_chip_type *ct;
  
        gc = irq_alloc_generic_chip("gpio-mxc", 1, irq_base,
                                    port->base, handle_level_irq);
 +      if (!gc)
 +              return -ENOMEM;
        gc->private = port;
  
        ct = gc->chip_types;
  
        irq_setup_generic_chip(gc, IRQ_MSK(32), IRQ_GC_INIT_NESTED_LOCK,
                               IRQ_NOREQUEST, 0);
 +
 +      return 0;
  }
  
  static void mxc_gpio_get_hw(struct platform_device *pdev)
@@@ -481,16 -477,12 +481,16 @@@ static int mxc_gpio_probe(struct platfo
        }
  
        /* gpio-mxc can be a generic irq chip */
 -      mxc_gpio_init_gc(port, irq_base);
 +      err = mxc_gpio_init_gc(port, irq_base);
 +      if (err < 0)
 +              goto out_irqdomain_remove;
  
        list_add_tail(&port->node, &mxc_gpio_ports);
  
        return 0;
  
 +out_irqdomain_remove:
 +      irq_domain_remove(port->domain);
  out_irqdesc_free:
        irq_free_descs(irq_base, 32);
  out_gpiochip_remove:
diff --combined drivers/gpio/gpio-mxs.c
index 1387385e66978cbf096d033e8db152d88e8b1a8a,b7763f078b234fdb1e15092d5fb08cfa0ab77d96..a4288f428819a3175d2e74cb2feec138ffacb4dc
@@@ -154,7 -154,7 +154,7 @@@ static void mxs_flip_edge(struct mxs_gp
  }
  
  /* MXS has one interrupt *per* gpio port */
- static void mxs_gpio_irq_handler(u32 irq, struct irq_desc *desc)
+ static void mxs_gpio_irq_handler(struct irq_desc *desc)
  {
        u32 irq_stat;
        struct mxs_gpio_port *port = irq_desc_get_handler_data(desc);
@@@ -196,16 -196,13 +196,16 @@@ static int mxs_gpio_set_wake_irq(struc
        return 0;
  }
  
 -static void __init mxs_gpio_init_gc(struct mxs_gpio_port *port, int irq_base)
 +static int __init mxs_gpio_init_gc(struct mxs_gpio_port *port, int irq_base)
  {
        struct irq_chip_generic *gc;
        struct irq_chip_type *ct;
  
        gc = irq_alloc_generic_chip("gpio-mxs", 1, irq_base,
                                    port->base, handle_level_irq);
 +      if (!gc)
 +              return -ENOMEM;
 +
        gc->private = port;
  
        ct = gc->chip_types;
  
        irq_setup_generic_chip(gc, IRQ_MSK(32), IRQ_GC_INIT_NESTED_LOCK,
                               IRQ_NOREQUEST, 0);
 +
 +      return 0;
  }
  
  static int mxs_gpio_to_irq(struct gpio_chip *gc, unsigned offset)
@@@ -322,9 -317,7 +322,9 @@@ static int mxs_gpio_probe(struct platfo
        }
  
        /* gpio-mxs can be a generic irq chip */
 -      mxs_gpio_init_gc(port, irq_base);
 +      err = mxs_gpio_init_gc(port, irq_base);
 +      if (err < 0)
 +              goto out_irqdomain_remove;
  
        /* setup one handler for each entry */
        irq_set_chained_handler_and_data(port->irq, mxs_gpio_irq_handler,
  
  out_bgpio_remove:
        bgpio_remove(&port->bgc);
 +out_irqdomain_remove:
 +      irq_domain_remove(port->domain);
  out_irqdesc_free:
        irq_free_descs(irq_base, 32);
        return err;
diff --combined drivers/gpio/gpio-omap.c
index 072af5239bc14867ab38d69dbe04d9ce68e5d925,9df014c0e3e478cd4319b78ab274b65c7177032f..5236db161e76047db31bf8c8e5ae7299f12fd06d
@@@ -709,7 -709,7 +709,7 @@@ static void omap_gpio_free(struct gpio_
   * line's interrupt handler has been run, we may miss some nested
   * interrupts.
   */
- static void omap_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
+ static void omap_gpio_irq_handler(struct irq_desc *desc)
  {
        void __iomem *isr_reg = NULL;
        u32 isr;
@@@ -1098,6 -1098,7 +1098,6 @@@ static int omap_gpio_chip_init(struct g
        } else {
                bank->chip.label = "gpio";
                bank->chip.base = gpio;
 -              gpio += bank->width;
        }
        bank->chip.ngpio = bank->width;
  
                return ret;
        }
  
 +      if (!bank->is_mpuio)
 +              gpio += bank->width;
 +
  #ifdef CONFIG_ARCH_OMAP1
        /*
         * REVISIT: Once we have OMAP1 supporting SPARSE_IRQ, we can drop
@@@ -1255,11 -1253,8 +1255,11 @@@ static int omap_gpio_probe(struct platf
        omap_gpio_mod_init(bank);
  
        ret = omap_gpio_chip_init(bank, irqc);
 -      if (ret)
 +      if (ret) {
 +              pm_runtime_put_sync(bank->dev);
 +              pm_runtime_disable(bank->dev);
                return ret;
 +      }
  
        omap_gpio_show_rev(bank);
  
index d168b39dd7fdccf5b134e20230ec00a7320f2423,b3cd9ae3f4a293f6f8d95836dce1246a7d52c716..3d92f827da7a83fc08a0d24e86347004ff01ba0b
@@@ -240,7 -240,7 +240,7 @@@ static struct irq_chip s3c2410_eint0_3_
        .irq_set_type   = s3c24xx_eint_type,
  };
  
- static void s3c2410_demux_eint0_3(unsigned int irq, struct irq_desc *desc)
+ static void s3c2410_demux_eint0_3(struct irq_desc *desc)
  {
        struct irq_data *data = irq_desc_get_irq_data(desc);
        struct s3c24xx_eint_data *eint_data = irq_desc_get_handler_data(desc);
@@@ -295,7 -295,7 +295,7 @@@ static struct irq_chip s3c2412_eint0_3_
        .irq_set_type   = s3c24xx_eint_type,
  };
  
- static void s3c2412_demux_eint0_3(unsigned int irq, struct irq_desc *desc)
+ static void s3c2412_demux_eint0_3(struct irq_desc *desc)
  {
        struct s3c24xx_eint_data *eint_data = irq_desc_get_handler_data(desc);
        struct irq_data *data = irq_desc_get_irq_data(desc);
@@@ -361,7 -361,7 +361,7 @@@ static inline void s3c24xx_demux_eint(s
                                      u32 offset, u32 range)
  {
        struct s3c24xx_eint_data *data = irq_desc_get_handler_data(desc);
 -      struct irq_chip *chip = irq_desc_get_irq_chip(desc);
 +      struct irq_chip *chip = irq_desc_get_chip(desc);
        struct samsung_pinctrl_drv_data *d = data->drvdata;
        unsigned int pend, mask;
  
        chained_irq_exit(chip, desc);
  }
  
- static void s3c24xx_demux_eint4_7(unsigned int irq, struct irq_desc *desc)
+ static void s3c24xx_demux_eint4_7(struct irq_desc *desc)
  {
        s3c24xx_demux_eint(desc, 0, 0xf0);
  }
  
- static void s3c24xx_demux_eint8_23(unsigned int irq, struct irq_desc *desc)
+ static void s3c24xx_demux_eint8_23(struct irq_desc *desc)
  {
        s3c24xx_demux_eint(desc, 8, 0xffff00);
  }