linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [RFC v1 00/25] Optimize irq flow handler
@ 2015-05-20  9:59 Jiang Liu
  2015-05-20  9:59 ` [RFC v1 01/25] ARM, irq: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc Jiang Liu
                   ` (10 more replies)
  0 siblings, 11 replies; 24+ messages in thread
From: Jiang Liu @ 2015-05-20  9:59 UTC (permalink / raw)
  To: linux-arm-kernel

This is an patch set to optimize irq flow handler. It could be split
into three part.
1) Patch 1-12 get rid of redundant looking up of irq_desc and irq_data
   when we already had an pointer to corresponding irq_desc in irq
   flow handler. This part should be pretty safe.
2) Patch 13 is a perparation patch.
3) Patch 14-25 should be merge into one big fat patch, which kills
   the first parameter 'irq' of irq_flow_handler_t. I hope I have
   made all needed changes, but there are still some handler missed.
   After the conversion, there are only about 20 irq handlers which
   really access the irq number. This part is still in early stage
   and may cause building failures.

Please comment on whether we should be go on with the third part to
kill 'irq' of irq_flow_handler_t.

Thanks!
Gerry

Jiang Liu (25):
  ARM, irq: Use irq_desc_get_xxx() to avoid redundant lookup of
    irq_desc
  avr32, irq: Use irq_desc_get_xxx() to avoid redundant lookup of
    irq_desc
  MIPS, irq: Use irq_desc_get_xxx() to avoid redundant lookup of
    irq_desc
  powerpc, irq: Use irq_desc_get_xxx() to avoid redundant lookup of
    irq_desc
  gpio: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc
  pinctrl: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc
  irqchip: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc
  mfd: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc
  ipu: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc
  sh: intc: Use irq_desc_get_xxx() to avoid redundant lookup of
    irq_desc
  keystone, irq: Use irq_data_get_xxx() to avoid redundant lookup of
    irq_data
  spmi: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc
  genirq: Kill the parameter 'irq' of kstat_incr_irqs_this_cpu()
  genirq: Kill the first parameter 'irq' of irq_flow_handler_t
  genirq: Kill the first parameter 'irq' of irq_flow_handler_t
  genirq: Kill the first parameter 'irq' of irq_flow_handler_t
  genirq: Kill the first parameter 'irq' of irq_flow_handler_t
  genirq: Kill the first parameter 'irq' of irq_flow_handler_t
  genirq: Kill the first parameter 'irq' of irq_flow_handler_t
  genirq: Kill the first parameter 'irq' of irq_flow_handler_t
  genirq: Kill the first parameter 'irq' of irq_flow_handler_t
  genirq: Kill the first parameter 'irq' of irq_flow_handler_t
  genirq: Kill the first parameter 'irq' of irq_flow_handler_t
  genirq: Kill the first parameter 'irq' of irq_flow_handler_t
  genirq: Kill the first parameter 'irq' of irq_flow_handler_t

 arch/alpha/kernel/irq.c                         |    2 +-
 arch/arm/common/it8152.c                        |    2 +-
 arch/arm/common/locomo.c                        |    5 +--
 arch/arm/common/sa1111.c                        |    6 ++--
 arch/arm/include/asm/hardware/it8152.h          |    2 +-
 arch/arm/include/asm/mach/irq.h                 |    4 +--
 arch/arm/mach-dove/irq.c                        |    5 +--
 arch/arm/mach-footbridge/isa-irq.c              |    4 +--
 arch/arm/mach-gemini/gpio.c                     |    2 +-
 arch/arm/mach-imx/3ds_debugboard.c              |    2 +-
 arch/arm/mach-imx/mach-mx31ads.c                |    2 +-
 arch/arm/mach-iop13xx/msi.c                     |    2 +-
 arch/arm/mach-lpc32xx/irq.c                     |    4 +--
 arch/arm/mach-omap1/fpga.c                      |    2 +-
 arch/arm/mach-omap2/prm_common.c                |    2 +-
 arch/arm/mach-pxa/balloon3.c                    |    3 +-
 arch/arm/mach-pxa/cm-x2xx-pci.c                 |    4 +--
 arch/arm/mach-pxa/lpd270.c                      |    3 +-
 arch/arm/mach-pxa/pcm990-baseboard.c            |    1 +
 arch/arm/mach-pxa/viper.c                       |    3 +-
 arch/arm/mach-pxa/zeus.c                        |    3 +-
 arch/arm/mach-rpc/ecard.c                       |    2 +-
 arch/arm/mach-s3c64xx/common.c                  |    8 ++---
 arch/arm/mach-sa1100/neponset.c                 |    2 +-
 arch/arm/plat-orion/gpio.c                      |    4 +--
 arch/avr32/mach-at32ap/extint.c                 |    2 +-
 arch/avr32/mach-at32ap/pio.c                    |    4 +--
 arch/blackfin/kernel/ipipe.c                    |    4 +--
 arch/c6x/platforms/megamod-pic.c                |    3 +-
 arch/m68k/amiga/amiints.c                       |    8 ++---
 arch/m68k/coldfire/intc-5272.c                  |    4 +--
 arch/m68k/include/asm/mac_via.h                 |    2 +-
 arch/m68k/mac/baboon.c                          |    2 +-
 arch/m68k/mac/oss.c                             |    4 +--
 arch/m68k/mac/psc.c                             |    3 +-
 arch/m68k/mac/via.c                             |    6 ++--
 arch/mips/alchemy/common/irq.c                  |    4 +--
 arch/mips/alchemy/devboards/bcsr.c              |    3 +-
 arch/mips/ath25/ar2315.c                        |    4 +--
 arch/mips/ath25/ar5312.c                        |    4 +--
 arch/mips/ath79/irq.c                           |   11 ++++---
 arch/mips/cavium-octeon/octeon-irq.c            |   12 ++++---
 arch/mips/include/asm/netlogic/common.h         |    4 +--
 arch/mips/jz4740/gpio.c                         |    2 +-
 arch/mips/netlogic/common/smp.c                 |    4 +--
 arch/mips/pci/pci-ar2315.c                      |    4 +--
 arch/mips/pci/pci-ar71xx.c                      |    4 +--
 arch/mips/pci/pci-ar724x.c                      |    4 +--
 arch/mips/pci/pci-rt3883.c                      |    5 +--
 arch/mips/ralink/irq.c                          |    4 +--
 arch/powerpc/include/asm/qe_ic.h                |   23 ++++++--------
 arch/powerpc/include/asm/tsi108_pci.h           |    2 +-
 arch/powerpc/platforms/512x/mpc5121_ads_cpld.c  |    4 ++-
 arch/powerpc/platforms/52xx/media5200.c         |    2 +-
 arch/powerpc/platforms/52xx/mpc52xx_gpt.c       |    4 +--
 arch/powerpc/platforms/82xx/pq2ads-pci-pic.c    |    2 +-
 arch/powerpc/platforms/85xx/common.c            |    2 +-
 arch/powerpc/platforms/85xx/mpc85xx_ds.c        |    2 +-
 arch/powerpc/platforms/85xx/socrates_fpga_pic.c |    3 +-
 arch/powerpc/platforms/86xx/pic.c               |    2 +-
 arch/powerpc/platforms/8xx/m8xx_setup.c         |    2 +-
 arch/powerpc/platforms/cell/axon_msi.c          |    4 +--
 arch/powerpc/platforms/cell/interrupt.c         |    3 +-
 arch/powerpc/platforms/cell/spider-pic.c        |    2 +-
 arch/powerpc/platforms/chrp/setup.c             |    2 +-
 arch/powerpc/platforms/embedded6xx/hlwd-pic.c   |    2 +-
 arch/powerpc/platforms/embedded6xx/mvme5100.c   |    2 +-
 arch/powerpc/platforms/pseries/setup.c          |    2 +-
 arch/powerpc/sysdev/ge/ge_pic.c                 |    2 +-
 arch/powerpc/sysdev/mpic.c                      |    2 +-
 arch/powerpc/sysdev/qe_lib/qe_ic.c              |    4 +--
 arch/powerpc/sysdev/tsi108_pci.c                |    2 +-
 arch/powerpc/sysdev/uic.c                       |    4 +--
 arch/powerpc/sysdev/xics/xics-common.c          |    2 +-
 arch/powerpc/sysdev/xilinx_intc.c               |    2 +-
 arch/sh/boards/mach-se/7343/irq.c               |    4 +--
 arch/sh/boards/mach-se/7722/irq.c               |    3 +-
 arch/sh/boards/mach-se/7724/irq.c               |    3 +-
 arch/sh/boards/mach-x3proto/gpio.c              |    4 +--
 arch/sh/cchips/hd6446x/hd64461.c                |    2 +-
 arch/sparc/kernel/leon_kernel.c                 |    2 +-
 arch/sparc/kernel/leon_pci_grpci1.c             |    2 +-
 arch/sparc/kernel/leon_pci_grpci2.c             |    2 +-
 arch/tile/kernel/pci_gx.c                       |    4 +--
 arch/unicore32/kernel/irq.c                     |    3 +-
 arch/x86/kernel/irq_64.c                        |    2 +-
 arch/x86/lguest/boot.c                          |    2 +-
 drivers/dma/ipu/ipu_irq.c                       |    8 +++--
 drivers/gpio/gpio-altera.c                      |    6 ++--
 drivers/gpio/gpio-bcm-kona.c                    |    4 +--
 drivers/gpio/gpio-davinci.c                     |    3 +-
 drivers/gpio/gpio-dwapb.c                       |    4 +--
 drivers/gpio/gpio-ep93xx.c                      |    5 +--
 drivers/gpio/gpio-intel-mid.c                   |    2 +-
 drivers/gpio/gpio-lynxpoint.c                   |    2 +-
 drivers/gpio/gpio-mpc8xxx.c                     |    2 +-
 drivers/gpio/gpio-msic.c                        |    2 +-
 drivers/gpio/gpio-msm-v2.c                      |    2 +-
 drivers/gpio/gpio-mvebu.c                       |    4 +--
 drivers/gpio/gpio-mxc.c                         |   10 +++---
 drivers/gpio/gpio-mxs.c                         |    4 +--
 drivers/gpio/gpio-omap.c                        |    4 +--
 drivers/gpio/gpio-pl061.c                       |    2 +-
 drivers/gpio/gpio-pxa.c                         |    2 +-
 drivers/gpio/gpio-sa1100.c                      |    4 +--
 drivers/gpio/gpio-tegra.c                       |    6 ++--
 drivers/gpio/gpio-timberdale.c                  |    7 +++--
 drivers/gpio/gpio-tz1090.c                      |    4 +--
 drivers/gpio/gpio-vf610.c                       |    4 +--
 drivers/gpio/gpio-zynq.c                        |    4 +--
 drivers/gpu/ipu-v3/ipu-common.c                 |    8 ++---
 drivers/irqchip/exynos-combiner.c               |    8 ++---
 drivers/irqchip/irq-armada-370-xp.c             |    2 +-
 drivers/irqchip/irq-bcm7038-l1.c                |    2 +-
 drivers/irqchip/irq-bcm7120-l2.c                |    2 +-
 drivers/irqchip/irq-brcmstb-l2.c                |    6 ++--
 drivers/irqchip/irq-dw-apb-ictl.c               |    6 ++--
 drivers/irqchip/irq-gic.c                       |    6 ++--
 drivers/irqchip/irq-imgpdc.c                    |    5 +--
 drivers/irqchip/irq-keystone.c                  |    3 +-
 drivers/irqchip/irq-metag-ext.c                 |    3 +-
 drivers/irqchip/irq-metag.c                     |    3 +-
 drivers/irqchip/irq-mips-gic.c                  |    2 +-
 drivers/irqchip/irq-mmp.c                       |    3 +-
 drivers/irqchip/irq-orion.c                     |    4 +--
 drivers/irqchip/irq-s3c24xx.c                   |    3 +-
 drivers/irqchip/irq-sunxi-nmi.c                 |    4 +--
 drivers/irqchip/irq-tb10x.c                     |    4 +--
 drivers/irqchip/irq-versatile-fpga.c            |    6 ++--
 drivers/irqchip/irq-vic.c                       |    2 +-
 drivers/irqchip/spear-shirq.c                   |    4 +--
 drivers/mfd/asic3.c                             |    2 +-
 drivers/mfd/ezx-pcap.c                          |    4 +--
 drivers/mfd/htc-egpio.c                         |    2 +-
 drivers/mfd/jz4740-adc.c                        |    2 +-
 drivers/mfd/max8997-irq.c                       |    8 ++---
 drivers/mfd/mt6397-core.c                       |    8 ++---
 drivers/mfd/pm8921-core.c                       |    2 +-
 drivers/mfd/t7l66xb.c                           |    4 +--
 drivers/mfd/tc6393xb.c                          |    4 +--
 drivers/mfd/twl6030-irq.c                       |    2 +-
 drivers/mfd/ucb1x00-core.c                      |    4 +--
 drivers/pci/host/pci-keystone-dw.c              |   15 ++++-----
 drivers/pci/host/pci-keystone.c                 |    7 +++--
 drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c       |    2 +-
 drivers/pinctrl/intel/pinctrl-baytrail.c        |    2 +-
 drivers/pinctrl/intel/pinctrl-cherryview.c      |    4 +--
 drivers/pinctrl/intel/pinctrl-intel.c           |    4 +--
 drivers/pinctrl/mediatek/pinctrl-mtk-common.c   |    6 ++--
 drivers/pinctrl/nomadik/pinctrl-nomadik.c       |   14 ++++-----
 drivers/pinctrl/pinctrl-amd.c                   |    7 +++--
 drivers/pinctrl/pinctrl-at91.c                  |    4 +--
 drivers/pinctrl/pinctrl-coh901.c                |    7 +++--
 drivers/pinctrl/pinctrl-rockchip.c              |    7 +++--
 drivers/pinctrl/pinctrl-single.c                |    4 +--
 drivers/pinctrl/pinctrl-st.c                    |   10 +++---
 drivers/pinctrl/qcom/pinctrl-msm.c              |    6 ++--
 drivers/pinctrl/samsung/pinctrl-exynos.c        |   12 +++----
 drivers/pinctrl/samsung/pinctrl-s3c24xx.c       |   26 ++++++++--------
 drivers/pinctrl/samsung/pinctrl-s3c64xx.c       |   32 +++++++++----------
 drivers/pinctrl/sirf/pinctrl-sirf.c             |    7 +++--
 drivers/pinctrl/spear/pinctrl-plgpio.c          |    2 +-
 drivers/pinctrl/sunxi/pinctrl-sunxi.c           |    7 +++--
 drivers/sh/intc/core.c                          |    4 +--
 drivers/sh/intc/virq.c                          |   17 +++++-----
 drivers/spmi/spmi-pmic-arb.c                    |    6 ++--
 include/linux/irq.h                             |   16 +++++-----
 include/linux/irqdesc.h                         |    9 ++++--
 include/linux/irqhandler.h                      |    2 +-
 kernel/irq/chip.c                               |   38 ++++++++++-------------
 kernel/irq/handle.c                             |    6 ++--
 kernel/irq/internals.h                          |    2 +-
 kernel/irq/irqdesc.c                            |    4 +--
 173 files changed, 420 insertions(+), 398 deletions(-)

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [RFC v1 01/25] ARM, irq: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc
  2015-05-20  9:59 [RFC v1 00/25] Optimize irq flow handler Jiang Liu
@ 2015-05-20  9:59 ` Jiang Liu
  2015-05-20 19:35   ` Russell King - ARM Linux
  2015-05-20  9:59 ` [RFC v1 05/25] gpio: " Jiang Liu
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Jiang Liu @ 2015-05-20  9:59 UTC (permalink / raw)
  To: linux-arm-kernel

Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
already have a pointer to corresponding irq_desc.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
---
 arch/arm/common/locomo.c   |    2 +-
 arch/arm/common/sa1111.c   |    2 +-
 arch/arm/plat-orion/gpio.c |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
index b55c3625d7ee..02af4a07ceca 100644
--- a/arch/arm/common/locomo.c
+++ b/arch/arm/common/locomo.c
@@ -140,7 +140,7 @@ static struct locomo_dev_info locomo_devices[] = {
 
 static void locomo_handler(unsigned int irq, struct irq_desc *desc)
 {
-	struct locomo *lchip = irq_get_chip_data(irq);
+	struct locomo *lchip = irq_desc_get_chip_data(desc);
 	int req, i;
 
 	/* Acknowledge the parent IRQ */
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index 5cc779c8e9c6..0d0844fa54c2 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -200,7 +200,7 @@ static void
 sa1111_irq_handler(unsigned int irq, struct irq_desc *desc)
 {
 	unsigned int stat0, stat1, i;
-	struct sa1111 *sachip = irq_get_handler_data(irq);
+	struct sa1111 *sachip = irq_desc_get_handler_data(desc);
 	void __iomem *mapbase = sachip->base + SA1111_INTC;
 
 	stat0 = sa1111_readl(mapbase + SA1111_INTSTATCLR0);
diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c
index 5168a52a17f9..caba04340619 100644
--- a/arch/arm/plat-orion/gpio.c
+++ b/arch/arm/plat-orion/gpio.c
@@ -409,7 +409,7 @@ static int gpio_irq_set_type(struct irq_data *d, u32 type)
 
 static void gpio_irq_handler(unsigned irq, struct irq_desc *desc)
 {
-	struct orion_gpio_chip *ochip = irq_get_handler_data(irq);
+	struct orion_gpio_chip *ochip = irq_desc_get_handler_data(desc);
 	u32 cause, type;
 	int i;
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [RFC v1 05/25] gpio: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc
  2015-05-20  9:59 [RFC v1 00/25] Optimize irq flow handler Jiang Liu
  2015-05-20  9:59 ` [RFC v1 01/25] ARM, irq: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc Jiang Liu
@ 2015-05-20  9:59 ` Jiang Liu
  2015-06-01 12:45   ` Linus Walleij
  2015-05-20  9:59 ` [RFC v1 07/25] irqchip: " Jiang Liu
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Jiang Liu @ 2015-05-20  9:59 UTC (permalink / raw)
  To: linux-arm-kernel

Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
already have a pointer to corresponding irq_desc.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
---
 drivers/gpio/gpio-bcm-kona.c   |    2 +-
 drivers/gpio/gpio-dwapb.c      |    2 +-
 drivers/gpio/gpio-mvebu.c      |    2 +-
 drivers/gpio/gpio-mxc.c        |    6 +++---
 drivers/gpio/gpio-mxs.c        |    2 +-
 drivers/gpio/gpio-omap.c       |    2 +-
 drivers/gpio/gpio-tegra.c      |    4 +---
 drivers/gpio/gpio-timberdale.c |    2 +-
 drivers/gpio/gpio-vf610.c      |    2 +-
 drivers/gpio/gpio-zynq.c       |    2 +-
 10 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c
index b164ce837b43..2e7a8c66fe57 100644
--- a/drivers/gpio/gpio-bcm-kona.c
+++ b/drivers/gpio/gpio-bcm-kona.c
@@ -432,7 +432,7 @@ static void bcm_kona_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
 	void __iomem *reg_base;
 	int bit, bank_id;
 	unsigned long sta;
-	struct bcm_kona_gpio_bank *bank = irq_get_handler_data(irq);
+	struct bcm_kona_gpio_bank *bank = irq_desc_get_handler_data(desc);
 	struct irq_chip *chip = irq_desc_get_chip(desc);
 
 	chained_irq_enter(chip, desc);
diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c
index 58faf04fce5d..649be07a845d 100644
--- a/drivers/gpio/gpio-dwapb.c
+++ b/drivers/gpio/gpio-dwapb.c
@@ -149,7 +149,7 @@ static u32 dwapb_do_irq(struct dwapb_gpio *gpio)
 
 static void dwapb_irq_handler(u32 irq, struct irq_desc *desc)
 {
-	struct dwapb_gpio *gpio = irq_get_handler_data(irq);
+	struct dwapb_gpio *gpio = irq_desc_get_handler_data(desc);
 	struct irq_chip *chip = irq_desc_get_chip(desc);
 
 	dwapb_do_irq(gpio);
diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index 1a54205860f5..a8c302ef7bc4 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -460,7 +460,7 @@ static int mvebu_gpio_irq_set_type(struct irq_data *d, unsigned int type)
 
 static void mvebu_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
 {
-	struct mvebu_gpio_chip *mvchip = irq_get_handler_data(irq);
+	struct mvebu_gpio_chip *mvchip = irq_desc_get_handler_data(desc);
 	struct irq_chip *chip = irq_desc_get_chip(desc);
 	u32 cause, type;
 	int i;
diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c
index 9f7446a7ac64..f10948c04f7c 100644
--- a/drivers/gpio/gpio-mxc.c
+++ b/drivers/gpio/gpio-mxc.c
@@ -275,8 +275,8 @@ static void mxc_gpio_irq_handler(struct mxc_gpio_port *port, u32 irq_stat)
 static void mx3_gpio_irq_handler(u32 irq, struct irq_desc *desc)
 {
 	u32 irq_stat;
-	struct mxc_gpio_port *port = irq_get_handler_data(irq);
-	struct irq_chip *chip = irq_get_chip(irq);
+	struct mxc_gpio_port *port = irq_desc_get_handler_data(desc);
+	struct irq_chip *chip = irq_desc_get_chip(desc);
 
 	chained_irq_enter(chip, desc);
 
@@ -292,7 +292,7 @@ static void mx2_gpio_irq_handler(u32 irq, struct irq_desc *desc)
 {
 	u32 irq_msk, irq_stat;
 	struct mxc_gpio_port *port;
-	struct irq_chip *chip = irq_get_chip(irq);
+	struct irq_chip *chip = irq_desc_get_chip(desc);
 
 	chained_irq_enter(chip, desc);
 
diff --git a/drivers/gpio/gpio-mxs.c b/drivers/gpio/gpio-mxs.c
index 84cbda6acdda..039c7d50e64f 100644
--- a/drivers/gpio/gpio-mxs.c
+++ b/drivers/gpio/gpio-mxs.c
@@ -157,7 +157,7 @@ static void mxs_flip_edge(struct mxs_gpio_port *port, u32 gpio)
 static void mxs_gpio_irq_handler(u32 irq, struct irq_desc *desc)
 {
 	u32 irq_stat;
-	struct mxs_gpio_port *port = irq_get_handler_data(irq);
+	struct mxs_gpio_port *port = irq_desc_get_handler_data(desc);
 
 	desc->irq_data.chip->irq_ack(&desc->irq_data);
 
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index b232397ad7ec..acbf3feff1e2 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -719,7 +719,7 @@ static void omap_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
 	struct gpio_bank *bank;
 	int unmasked = 0;
 	struct irq_chip *irqchip = irq_desc_get_chip(desc);
-	struct gpio_chip *chip = irq_get_handler_data(irq);
+	struct gpio_chip *chip = irq_desc_get_handler_data(desc);
 
 	chained_irq_enter(irqchip, desc);
 
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index 1741981d53c8..89ed8a56eb0b 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -268,16 +268,14 @@ static void tegra_gpio_irq_shutdown(struct irq_data *d)
 
 static void tegra_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
 {
-	struct tegra_gpio_bank *bank;
 	int port;
 	int pin;
 	int unmasked = 0;
 	struct irq_chip *chip = irq_desc_get_chip(desc);
+	struct tegra_gpio_bank *bank = irq_desc_get_handler_data(desc);
 
 	chained_irq_enter(chip, desc);
 
-	bank = irq_get_handler_data(irq);
-
 	for (port = 0; port < 4; port++) {
 		int gpio = tegra_gpio_compose(bank->bank, port, 0);
 		unsigned long sta = tegra_gpio_readl(GPIO_INT_STA(gpio)) &
diff --git a/drivers/gpio/gpio-timberdale.c b/drivers/gpio/gpio-timberdale.c
index e8f97e03c9bb..d4e8cb4f2e53 100644
--- a/drivers/gpio/gpio-timberdale.c
+++ b/drivers/gpio/gpio-timberdale.c
@@ -194,7 +194,7 @@ out:
 
 static void timbgpio_irq(unsigned int irq, struct irq_desc *desc)
 {
-	struct timbgpio *tgpio = irq_get_handler_data(irq);
+	struct timbgpio *tgpio = irq_desc_get_handler_data(desc);
 	unsigned long ipr;
 	int offset;
 
diff --git a/drivers/gpio/gpio-vf610.c b/drivers/gpio/gpio-vf610.c
index 7bd9f209ffa8..fa344388f4da 100644
--- a/drivers/gpio/gpio-vf610.c
+++ b/drivers/gpio/gpio-vf610.c
@@ -120,7 +120,7 @@ static int vf610_gpio_direction_output(struct gpio_chip *chip, unsigned gpio,
 
 static void vf610_gpio_irq_handler(u32 irq, struct irq_desc *desc)
 {
-	struct vf610_gpio_port *port = irq_get_handler_data(irq);
+	struct vf610_gpio_port *port = irq_desc_get_handler_data(desc);
 	struct irq_chip *chip = irq_desc_get_chip(desc);
 	int pin;
 	unsigned long irq_isfr;
diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c
index aea6075e5b2e..70e3a568b1cb 100644
--- a/drivers/gpio/gpio-zynq.c
+++ b/drivers/gpio/gpio-zynq.c
@@ -499,7 +499,7 @@ static void zynq_gpio_irqhandler(unsigned int irq, struct irq_desc *desc)
 {
 	u32 int_sts, int_enb;
 	unsigned int bank_num;
-	struct zynq_gpio *gpio = irq_get_handler_data(irq);
+	struct zynq_gpio *gpio = irq_desc_get_handler_data(desc);
 	struct irq_chip *irqchip = irq_desc_get_chip(desc);
 
 	chained_irq_enter(irqchip, desc);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [RFC v1 07/25] irqchip: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc
  2015-05-20  9:59 [RFC v1 00/25] Optimize irq flow handler Jiang Liu
  2015-05-20  9:59 ` [RFC v1 01/25] ARM, irq: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc Jiang Liu
  2015-05-20  9:59 ` [RFC v1 05/25] gpio: " Jiang Liu
@ 2015-05-20  9:59 ` Jiang Liu
  2015-05-20  9:59 ` [RFC v1 11/25] keystone, irq: Use irq_data_get_xxx() to avoid redundant lookup of irq_data Jiang Liu
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 24+ messages in thread
From: Jiang Liu @ 2015-05-20  9:59 UTC (permalink / raw)
  To: linux-arm-kernel

Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
already have a pointer to corresponding irq_desc.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
---
 drivers/irqchip/exynos-combiner.c   |    4 ++--
 drivers/irqchip/irq-armada-370-xp.c |    2 +-
 drivers/irqchip/irq-dw-apb-ictl.c   |    4 ++--
 drivers/irqchip/irq-gic.c           |    4 ++--
 drivers/irqchip/irq-orion.c         |    2 +-
 drivers/irqchip/irq-sunxi-nmi.c     |    2 +-
 drivers/irqchip/spear-shirq.c       |    2 +-
 7 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/irqchip/exynos-combiner.c b/drivers/irqchip/exynos-combiner.c
index 5945223b73fa..039ceb46fcc0 100644
--- a/drivers/irqchip/exynos-combiner.c
+++ b/drivers/irqchip/exynos-combiner.c
@@ -62,8 +62,8 @@ static void combiner_unmask_irq(struct irq_data *data)
 
 static void combiner_handle_cascade_irq(unsigned int irq, struct irq_desc *desc)
 {
-	struct combiner_chip_data *chip_data = irq_get_handler_data(irq);
-	struct irq_chip *chip = irq_get_chip(irq);
+	struct combiner_chip_data *chip_data = irq_desc_get_handler_data(desc);
+	struct irq_chip *chip = irq_desc_get_chip(desc);
 	unsigned int cascade_irq, combiner_irq;
 	unsigned long status;
 
diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c
index daccc8bdbb42..40b5fe99a1d5 100644
--- a/drivers/irqchip/irq-armada-370-xp.c
+++ b/drivers/irqchip/irq-armada-370-xp.c
@@ -451,7 +451,7 @@ static void armada_370_xp_handle_msi_irq(struct pt_regs *r, bool b) {}
 static void armada_370_xp_mpic_handle_cascade_irq(unsigned int irq,
 						  struct irq_desc *desc)
 {
-	struct irq_chip *chip = irq_get_chip(irq);
+	struct irq_chip *chip = irq_desc_get_chip(desc);
 	unsigned long irqmap, irqn, irqsrc, cpuid;
 	unsigned int cascade_irq;
 
diff --git a/drivers/irqchip/irq-dw-apb-ictl.c b/drivers/irqchip/irq-dw-apb-ictl.c
index 53bb7326a60a..cddcd3b75f00 100644
--- a/drivers/irqchip/irq-dw-apb-ictl.c
+++ b/drivers/irqchip/irq-dw-apb-ictl.c
@@ -28,8 +28,8 @@
 
 static void dw_apb_ictl_handler(unsigned int irq, struct irq_desc *desc)
 {
-	struct irq_chip *chip = irq_get_chip(irq);
-	struct irq_chip_generic *gc = irq_get_handler_data(irq);
+	struct irq_chip *chip = irq_desc_get_chip(desc);
+	struct irq_chip_generic *gc = irq_desc_get_handler_data(desc);
 	struct irq_domain *d = gc->private;
 	u32 stat;
 	int n;
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index 01999d74bd3a..6c8a5a7fb4a0 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -288,8 +288,8 @@ static void __exception_irq_entry gic_handle_irq(struct pt_regs *regs)
 
 static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc)
 {
-	struct gic_chip_data *chip_data = irq_get_handler_data(irq);
-	struct irq_chip *chip = irq_get_chip(irq);
+	struct gic_chip_data *chip_data = irq_desc_get_handler_data(desc);
+	struct irq_chip *chip = irq_desc_get_chip(desc);
 	unsigned int cascade_irq, gic_irq;
 	unsigned long status;
 
diff --git a/drivers/irqchip/irq-orion.c b/drivers/irqchip/irq-orion.c
index ad0c0f6f1d65..58e034db0e7c 100644
--- a/drivers/irqchip/irq-orion.c
+++ b/drivers/irqchip/irq-orion.c
@@ -109,7 +109,7 @@ IRQCHIP_DECLARE(orion_intc, "marvell,orion-intc", orion_irq_init);
 
 static void orion_bridge_irq_handler(unsigned int irq, struct irq_desc *desc)
 {
-	struct irq_domain *d = irq_get_handler_data(irq);
+	struct irq_domain *d = irq_desc_get_handler_data(desc);
 
 	struct irq_chip_generic *gc = irq_get_domain_generic_chip(d, 0);
 	u32 stat = readl_relaxed(gc->reg_base + ORION_BRIDGE_IRQ_CAUSE) &
diff --git a/drivers/irqchip/irq-sunxi-nmi.c b/drivers/irqchip/irq-sunxi-nmi.c
index 4a9ce5b50c5b..2eaa9d9df241 100644
--- a/drivers/irqchip/irq-sunxi-nmi.c
+++ b/drivers/irqchip/irq-sunxi-nmi.c
@@ -61,7 +61,7 @@ static inline u32 sunxi_sc_nmi_read(struct irq_chip_generic *gc, u32 off)
 static void sunxi_sc_nmi_handle_irq(unsigned int irq, struct irq_desc *desc)
 {
 	struct irq_domain *domain = irq_desc_get_handler_data(desc);
-	struct irq_chip *chip = irq_get_chip(irq);
+	struct irq_chip *chip = irq_desc_get_chip(desc);
 	unsigned int virq = irq_find_mapping(domain, 0);
 
 	chained_irq_enter(chip, desc);
diff --git a/drivers/irqchip/spear-shirq.c b/drivers/irqchip/spear-shirq.c
index 9c145a7cb056..fb68ee9c0424 100644
--- a/drivers/irqchip/spear-shirq.c
+++ b/drivers/irqchip/spear-shirq.c
@@ -185,7 +185,7 @@ static struct spear_shirq *spear320_shirq_blocks[] = {
 
 static void shirq_handler(unsigned irq, struct irq_desc *desc)
 {
-	struct spear_shirq *shirq = irq_get_handler_data(irq);
+	struct spear_shirq *shirq = irq_desc_get_handler_data(desc);
 	u32 pend;
 
 	pend = readl(shirq->base + shirq->status_reg) & shirq->mask;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [RFC v1 11/25] keystone, irq: Use irq_data_get_xxx() to avoid redundant lookup of irq_data
  2015-05-20  9:59 [RFC v1 00/25] Optimize irq flow handler Jiang Liu
                   ` (2 preceding siblings ...)
  2015-05-20  9:59 ` [RFC v1 07/25] irqchip: " Jiang Liu
@ 2015-05-20  9:59 ` Jiang Liu
  2015-05-20 10:00 ` [RFC v1 15/25] genirq: Kill the first parameter 'irq' of irq_flow_handler_t Jiang Liu
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 24+ messages in thread
From: Jiang Liu @ 2015-05-20  9:59 UTC (permalink / raw)
  To: linux-arm-kernel

Use irq_data_get_xxx() to avoid redundant lookup of irq_data while we
already have a pointer to corresponding irq_data.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
---
 drivers/pci/host/pci-keystone-dw.c |   15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/pci/host/pci-keystone-dw.c b/drivers/pci/host/pci-keystone-dw.c
index f34892e0edb4..e42d077039d3 100644
--- a/drivers/pci/host/pci-keystone-dw.c
+++ b/drivers/pci/host/pci-keystone-dw.c
@@ -104,14 +104,13 @@ static void ks_dw_pcie_msi_irq_ack(struct irq_data *d)
 {
 	u32 offset, reg_offset, bit_pos;
 	struct keystone_pcie *ks_pcie;
-	unsigned int irq = d->irq;
 	struct msi_desc *msi;
 	struct pcie_port *pp;
 
-	msi = irq_get_msi_desc(irq);
+	msi = irq_data_get_msi_desc(d);
 	pp = sys_to_pcie(msi->dev->bus->sysdata);
 	ks_pcie = to_keystone_pcie(pp);
-	offset = irq - irq_linear_revmap(pp->irq_domain, 0);
+	offset = d->irq - irq_linear_revmap(pp->irq_domain, 0);
 	update_reg_offset_bit_pos(offset, &reg_offset, &bit_pos);
 
 	writel(BIT(bit_pos),
@@ -142,15 +141,14 @@ void ks_dw_pcie_msi_clear_irq(struct pcie_port *pp, int irq)
 static void ks_dw_pcie_msi_irq_mask(struct irq_data *d)
 {
 	struct keystone_pcie *ks_pcie;
-	unsigned int irq = d->irq;
 	struct msi_desc *msi;
 	struct pcie_port *pp;
 	u32 offset;
 
-	msi = irq_get_msi_desc(irq);
+	msi = irq_data_get_msi_desc(d);
 	pp = sys_to_pcie(msi->dev->bus->sysdata);
 	ks_pcie = to_keystone_pcie(pp);
-	offset = irq - irq_linear_revmap(pp->irq_domain, 0);
+	offset = d->irq - irq_linear_revmap(pp->irq_domain, 0);
 
 	/* Mask the end point if PVM implemented */
 	if (IS_ENABLED(CONFIG_PCI_MSI)) {
@@ -164,15 +162,14 @@ static void ks_dw_pcie_msi_irq_mask(struct irq_data *d)
 static void ks_dw_pcie_msi_irq_unmask(struct irq_data *d)
 {
 	struct keystone_pcie *ks_pcie;
-	unsigned int irq = d->irq;
 	struct msi_desc *msi;
 	struct pcie_port *pp;
 	u32 offset;
 
-	msi = irq_get_msi_desc(irq);
+	msi = irq_data_get_msi_desc(d);
 	pp = sys_to_pcie(msi->dev->bus->sysdata);
 	ks_pcie = to_keystone_pcie(pp);
-	offset = irq - irq_linear_revmap(pp->irq_domain, 0);
+	offset = d->irq - irq_linear_revmap(pp->irq_domain, 0);
 
 	/* Mask the end point if PVM implemented */
 	if (IS_ENABLED(CONFIG_PCI_MSI)) {
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [RFC v1 15/25] genirq: Kill the first parameter 'irq' of irq_flow_handler_t
  2015-05-20  9:59 [RFC v1 00/25] Optimize irq flow handler Jiang Liu
                   ` (3 preceding siblings ...)
  2015-05-20  9:59 ` [RFC v1 11/25] keystone, irq: Use irq_data_get_xxx() to avoid redundant lookup of irq_data Jiang Liu
@ 2015-05-20 10:00 ` Jiang Liu
  2015-05-20 15:28   ` Thomas Gleixner
                     ` (2 more replies)
  2015-05-20 10:00 ` [RFC v1 16/25] " Jiang Liu
                   ` (5 subsequent siblings)
  10 siblings, 3 replies; 24+ messages in thread
From: Jiang Liu @ 2015-05-20 10:00 UTC (permalink / raw)
  To: linux-arm-kernel

Now most IRQ flow handlers make no use of the first parameter 'irq'.
And for those who do make use of 'irq', we could easily get the irq
number through irq_desc->irq_data->irq. So kill the first parameter
'irq' of irq_flow_handler_t.

To ease review, I have split the changes into several parts, though
they should be merge as one to support bisecting.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
---
 arch/arm/common/it8152.c               |    2 +-
 arch/arm/common/locomo.c               |    3 ++-
 arch/arm/common/sa1111.c               |    4 ++--
 arch/arm/include/asm/hardware/it8152.h |    2 +-
 arch/arm/include/asm/mach/irq.h        |    4 ++--
 arch/arm/mach-dove/irq.c               |    5 +++--
 arch/arm/mach-footbridge/isa-irq.c     |    4 ++--
 arch/arm/mach-gemini/gpio.c            |    2 +-
 arch/arm/mach-imx/3ds_debugboard.c     |    2 +-
 arch/arm/mach-imx/mach-mx31ads.c       |    2 +-
 arch/arm/mach-iop13xx/msi.c            |    2 +-
 arch/arm/mach-lpc32xx/irq.c            |    4 ++--
 arch/arm/mach-omap1/fpga.c             |    2 +-
 arch/arm/mach-omap2/prm_common.c       |    2 +-
 arch/arm/mach-pxa/balloon3.c           |    3 ++-
 arch/arm/mach-pxa/cm-x2xx-pci.c        |    4 ++--
 arch/arm/mach-pxa/lpd270.c             |    3 ++-
 arch/arm/mach-pxa/pcm990-baseboard.c   |    1 +
 arch/arm/mach-pxa/viper.c              |    3 ++-
 arch/arm/mach-pxa/zeus.c               |    3 ++-
 arch/arm/mach-rpc/ecard.c              |    2 +-
 arch/arm/mach-s3c64xx/common.c         |    8 ++++----
 arch/arm/mach-sa1100/neponset.c        |    2 +-
 arch/arm/plat-orion/gpio.c             |    2 +-
 24 files changed, 39 insertions(+), 32 deletions(-)

diff --git a/arch/arm/common/it8152.c b/arch/arm/common/it8152.c
index 5114b68e99d5..aaa206181f92 100644
--- a/arch/arm/common/it8152.c
+++ b/arch/arm/common/it8152.c
@@ -95,7 +95,7 @@ void it8152_init_irq(void)
 	}
 }
 
-void it8152_irq_demux(unsigned int irq, struct irq_desc *desc)
+void it8152_irq_demux(struct irq_desc *desc)
 {
        int bits_pd, bits_lp, bits_ld;
        int i;
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
index 02af4a07ceca..99d4535d7cc6 100644
--- a/arch/arm/common/locomo.c
+++ b/arch/arm/common/locomo.c
@@ -138,9 +138,10 @@ static struct locomo_dev_info locomo_devices[] = {
 	},
 };
 
-static void locomo_handler(unsigned int irq, struct irq_desc *desc)
+static void locomo_handler(struct irq_desc *desc)
 {
 	struct locomo *lchip = irq_desc_get_chip_data(desc);
+	unsigned int irq;
 	int req, i;
 
 	/* Acknowledge the parent IRQ */
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index 0d0844fa54c2..762dfe7081f0 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -197,7 +197,7 @@ static struct sa1111_dev_info sa1111_devices[] = {
  * will call us again if there are more interrupts to process.
  */
 static void
-sa1111_irq_handler(unsigned int irq, struct irq_desc *desc)
+sa1111_irq_handler(struct irq_desc *desc)
 {
 	unsigned int stat0, stat1, i;
 	struct sa1111 *sachip = irq_desc_get_handler_data(desc);
@@ -213,7 +213,7 @@ sa1111_irq_handler(unsigned int irq, struct irq_desc *desc)
 	sa1111_writel(stat1, mapbase + SA1111_INTSTATCLR1);
 
 	if (stat0 == 0 && stat1 == 0) {
-		do_bad_IRQ(irq, desc);
+		do_bad_IRQ(desc);
 		return;
 	}
 
diff --git a/arch/arm/include/asm/hardware/it8152.h b/arch/arm/include/asm/hardware/it8152.h
index d36a73d7c0e8..076777ff3daa 100644
--- a/arch/arm/include/asm/hardware/it8152.h
+++ b/arch/arm/include/asm/hardware/it8152.h
@@ -106,7 +106,7 @@ extern void __iomem *it8152_base_address;
 struct pci_dev;
 struct pci_sys_data;
 
-extern void it8152_irq_demux(unsigned int irq, struct irq_desc *desc);
+extern void it8152_irq_demux(struct irq_desc *desc);
 extern void it8152_init_irq(void);
 extern int it8152_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin);
 extern int it8152_pci_setup(int nr, struct pci_sys_data *sys);
diff --git a/arch/arm/include/asm/mach/irq.h b/arch/arm/include/asm/mach/irq.h
index 2092ee1e1300..4703e00283db 100644
--- a/arch/arm/include/asm/mach/irq.h
+++ b/arch/arm/include/asm/mach/irq.h
@@ -23,10 +23,10 @@ extern int show_fiq_list(struct seq_file *, int);
 /*
  * This is for easy migration, but should be changed in the source
  */
-#define do_bad_IRQ(irq,desc)				\
+#define do_bad_IRQ(desc)				\
 do {							\
 	raw_spin_lock(&desc->lock);			\
-	handle_bad_irq(irq, desc);			\
+	handle_bad_irq(desc);			\
 	raw_spin_unlock(&desc->lock);			\
 } while(0)
 
diff --git a/arch/arm/mach-dove/irq.c b/arch/arm/mach-dove/irq.c
index 4a5a7aedcb76..30140cbdb249 100644
--- a/arch/arm/mach-dove/irq.c
+++ b/arch/arm/mach-dove/irq.c
@@ -69,13 +69,14 @@ static struct irq_chip pmu_irq_chip = {
 	.irq_ack	= pmu_irq_ack,
 };
 
-static void pmu_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void pmu_irq_handler(struct irq_desc *desc)
 {
 	unsigned long cause = readl(PMU_INTERRUPT_CAUSE);
+	unsigned int irq;
 
 	cause &= readl(PMU_INTERRUPT_MASK);
 	if (cause == 0) {
-		do_bad_IRQ(irq, desc);
+		do_bad_IRQ(desc);
 		return;
 	}
 
diff --git a/arch/arm/mach-footbridge/isa-irq.c b/arch/arm/mach-footbridge/isa-irq.c
index c3a0abbc9049..f78e46662447 100644
--- a/arch/arm/mach-footbridge/isa-irq.c
+++ b/arch/arm/mach-footbridge/isa-irq.c
@@ -88,12 +88,12 @@ static struct irq_chip isa_hi_chip = {
 };
 
 static void
-isa_irq_handler(unsigned int irq, struct irq_desc *desc)
+isa_irq_handler(struct irq_desc *desc)
 {
 	unsigned int isa_irq = *(unsigned char *)PCIIACK_BASE;
 
 	if (isa_irq < _ISA_IRQ(0) || isa_irq >= _ISA_IRQ(16)) {
-		do_bad_IRQ(isa_irq, desc);
+		do_bad_IRQ(desc);
 		return;
 	}
 
diff --git a/arch/arm/mach-gemini/gpio.c b/arch/arm/mach-gemini/gpio.c
index f8cb5710d6ee..713f655bcc74 100644
--- a/arch/arm/mach-gemini/gpio.c
+++ b/arch/arm/mach-gemini/gpio.c
@@ -126,7 +126,7 @@ static int gpio_set_irq_type(struct irq_data *d, unsigned int type)
 	return 0;
 }
 
-static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void gpio_irq_handler(struct irq_desc *desc)
 {
 	unsigned int port = (unsigned int)irq_desc_get_handler_data(desc);
 	unsigned int gpio_irq_no, irq_stat;
diff --git a/arch/arm/mach-imx/3ds_debugboard.c b/arch/arm/mach-imx/3ds_debugboard.c
index 134377352966..d93d3337b579 100644
--- a/arch/arm/mach-imx/3ds_debugboard.c
+++ b/arch/arm/mach-imx/3ds_debugboard.c
@@ -85,7 +85,7 @@ static struct platform_device smsc_lan9217_device = {
 	.resource = smsc911x_resources,
 };
 
-static void mxc_expio_irq_handler(u32 irq, struct irq_desc *desc)
+static void mxc_expio_irq_handler(struct irq_desc *desc)
 {
 	u32 imr_val;
 	u32 int_valid;
diff --git a/arch/arm/mach-imx/mach-mx31ads.c b/arch/arm/mach-imx/mach-mx31ads.c
index d08c37c696f6..07aef418a0e1 100644
--- a/arch/arm/mach-imx/mach-mx31ads.c
+++ b/arch/arm/mach-imx/mach-mx31ads.c
@@ -154,7 +154,7 @@ static inline void mxc_init_imx_uart(void)
 	imx31_add_imx_uart0(&uart_pdata);
 }
 
-static void mx31ads_expio_irq_handler(u32 irq, struct irq_desc *desc)
+static void mx31ads_expio_irq_handler(struct irq_desc *desc)
 {
 	u32 imr_val;
 	u32 int_valid;
diff --git a/arch/arm/mach-iop13xx/msi.c b/arch/arm/mach-iop13xx/msi.c
index 9f89e76dfbb9..f6235b28578c 100644
--- a/arch/arm/mach-iop13xx/msi.c
+++ b/arch/arm/mach-iop13xx/msi.c
@@ -91,7 +91,7 @@ static void (*write_imipr[])(u32) = {
 	write_imipr_3,
 };
 
-static void iop13xx_msi_handler(unsigned int irq, struct irq_desc *desc)
+static void iop13xx_msi_handler(struct irq_desc *desc)
 {
 	int i, j;
 	unsigned long status;
diff --git a/arch/arm/mach-lpc32xx/irq.c b/arch/arm/mach-lpc32xx/irq.c
index 9ecb8f9c4ef5..f361fed99105 100644
--- a/arch/arm/mach-lpc32xx/irq.c
+++ b/arch/arm/mach-lpc32xx/irq.c
@@ -370,7 +370,7 @@ static struct irq_chip lpc32xx_irq_chip = {
 	.irq_set_wake = lpc32xx_irq_wake
 };
 
-static void lpc32xx_sic1_handler(unsigned int irq, struct irq_desc *desc)
+static void lpc32xx_sic1_handler(struct irq_desc *desc)
 {
 	unsigned long ints = __raw_readl(LPC32XX_INTC_STAT(LPC32XX_SIC1_BASE));
 
@@ -383,7 +383,7 @@ static void lpc32xx_sic1_handler(unsigned int irq, struct irq_desc *desc)
 	}
 }
 
-static void lpc32xx_sic2_handler(unsigned int irq, struct irq_desc *desc)
+static void lpc32xx_sic2_handler(struct irq_desc *desc)
 {
 	unsigned long ints = __raw_readl(LPC32XX_INTC_STAT(LPC32XX_SIC2_BASE));
 
diff --git a/arch/arm/mach-omap1/fpga.c b/arch/arm/mach-omap1/fpga.c
index 3c0e42219200..374bccf5ce24 100644
--- a/arch/arm/mach-omap1/fpga.c
+++ b/arch/arm/mach-omap1/fpga.c
@@ -87,7 +87,7 @@ static void fpga_mask_ack_irq(struct irq_data *d)
 	fpga_ack_irq(d);
 }
 
-static void innovator_fpga_IRQ_demux(unsigned int irq, struct irq_desc *desc)
+static void innovator_fpga_IRQ_demux(struct irq_desc *desc)
 {
 	u32 stat;
 	int fpga_irq;
diff --git a/arch/arm/mach-omap2/prm_common.c b/arch/arm/mach-omap2/prm_common.c
index 7add7994dbfc..6cfc1e54d41f 100644
--- a/arch/arm/mach-omap2/prm_common.c
+++ b/arch/arm/mach-omap2/prm_common.c
@@ -102,7 +102,7 @@ static void omap_prcm_events_filter_priority(unsigned long *events,
  * dispatched accordingly. Clearing of the wakeup events should be
  * done by the SoC specific individual handlers.
  */
-static void omap_prcm_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void omap_prcm_irq_handler(struct irq_desc *desc)
 {
 	unsigned long pending[OMAP_PRCM_MAX_NR_PENDING_REG];
 	unsigned long priority_pending[OMAP_PRCM_MAX_NR_PENDING_REG];
diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c
index d897292712eb..506365cdd58b 100644
--- a/arch/arm/mach-pxa/balloon3.c
+++ b/arch/arm/mach-pxa/balloon3.c
@@ -496,8 +496,9 @@ static struct irq_chip balloon3_irq_chip = {
 	.irq_unmask	= balloon3_unmask_irq,
 };
 
-static void balloon3_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void balloon3_irq_handler(struct irq_desc *desc)
 {
+	unsigned int irq;
 	unsigned long pending = __raw_readl(BALLOON3_INT_CONTROL_REG) &
 					balloon3_irq_enabled;
 	do {
diff --git a/arch/arm/mach-pxa/cm-x2xx-pci.c b/arch/arm/mach-pxa/cm-x2xx-pci.c
index d8f816c24a2f..3221ae15bef7 100644
--- a/arch/arm/mach-pxa/cm-x2xx-pci.c
+++ b/arch/arm/mach-pxa/cm-x2xx-pci.c
@@ -29,12 +29,12 @@
 void __iomem *it8152_base_address;
 static int cmx2xx_it8152_irq_gpio;
 
-static void cmx2xx_it8152_irq_demux(unsigned int irq, struct irq_desc *desc)
+static void cmx2xx_it8152_irq_demux(struct irq_desc *desc)
 {
 	/* clear our parent irq */
 	desc->irq_data.chip->irq_ack(&desc->irq_data);
 
-	it8152_irq_demux(irq, desc);
+	it8152_irq_demux(desc);
 }
 
 void __cmx2xx_pci_init_irq(int irq_gpio)
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c
index eaee2c20b189..cbf00f51808f 100644
--- a/arch/arm/mach-pxa/lpd270.c
+++ b/arch/arm/mach-pxa/lpd270.c
@@ -120,9 +120,10 @@ static struct irq_chip lpd270_irq_chip = {
 	.irq_unmask	= lpd270_unmask_irq,
 };
 
-static void lpd270_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void lpd270_irq_handler(struct irq_desc *desc)
 {
 	unsigned long pending;
+	unsigned int irq;
 
 	pending = __raw_readw(LPD270_INT_STATUS) & lpd270_irq_enabled;
 	do {
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c
index 2897da2a5df6..0d8331f8536e 100644
--- a/arch/arm/mach-pxa/pcm990-baseboard.c
+++ b/arch/arm/mach-pxa/pcm990-baseboard.c
@@ -287,6 +287,7 @@ static struct irq_chip pcm990_irq_chip = {
 static void pcm990_irq_handler(unsigned int irq, struct irq_desc *desc)
 {
 	unsigned long pending;
+	unsigned int irq;
 
 	pending = ~pcm990_cpld_readb(PCM990_CTRL_INTSETCLR);
 	pending &= pcm990_irq_enabled;
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c
index de3b08073fe7..bd52fb914d6a 100644
--- a/arch/arm/mach-pxa/viper.c
+++ b/arch/arm/mach-pxa/viper.c
@@ -276,9 +276,10 @@ static inline unsigned long viper_irq_pending(void)
 			viper_irq_enabled_mask;
 }
 
-static void viper_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void viper_irq_handler(struct irq_desc *desc)
 {
 	unsigned long pending;
+	unsigned int irq;
 
 	pending = viper_irq_pending();
 	do {
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c
index ac2ae5c71ab4..7ffff0b424c2 100644
--- a/arch/arm/mach-pxa/zeus.c
+++ b/arch/arm/mach-pxa/zeus.c
@@ -105,9 +105,10 @@ static inline unsigned long zeus_irq_pending(void)
 	return __raw_readw(ZEUS_CPLD_ISA_IRQ) & zeus_irq_enabled_mask;
 }
 
-static void zeus_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void zeus_irq_handler(struct irq_desc *desc)
 {
 	unsigned long pending;
+	unsigned int irq;
 
 	pending = zeus_irq_pending();
 	do {
diff --git a/arch/arm/mach-rpc/ecard.c b/arch/arm/mach-rpc/ecard.c
index fcb1d59f7aec..b7074cd5ebfd 100644
--- a/arch/arm/mach-rpc/ecard.c
+++ b/arch/arm/mach-rpc/ecard.c
@@ -552,7 +552,7 @@ static void ecard_check_lockup(struct irq_desc *desc)
 }
 
 static void
-ecard_irq_handler(unsigned int irq, struct irq_desc *desc)
+ecard_irq_handler(struct irq_desc *desc)
 {
 	ecard_t *ec;
 	int called = 0;
diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c
index 16547f2641a3..5c9ca33f61e5 100644
--- a/arch/arm/mach-s3c64xx/common.c
+++ b/arch/arm/mach-s3c64xx/common.c
@@ -389,22 +389,22 @@ static inline void s3c_irq_demux_eint(unsigned int start, unsigned int end)
 	}
 }
 
-static void s3c_irq_demux_eint0_3(unsigned int irq, struct irq_desc *desc)
+static void s3c_irq_demux_eint0_3(struct irq_desc *desc)
 {
 	s3c_irq_demux_eint(0, 3);
 }
 
-static void s3c_irq_demux_eint4_11(unsigned int irq, struct irq_desc *desc)
+static void s3c_irq_demux_eint4_11(struct irq_desc *desc)
 {
 	s3c_irq_demux_eint(4, 11);
 }
 
-static void s3c_irq_demux_eint12_19(unsigned int irq, struct irq_desc *desc)
+static void s3c_irq_demux_eint12_19(struct irq_desc *desc)
 {
 	s3c_irq_demux_eint(12, 19);
 }
 
-static void s3c_irq_demux_eint20_27(unsigned int irq, struct irq_desc *desc)
+static void s3c_irq_demux_eint20_27(struct irq_desc *desc)
 {
 	s3c_irq_demux_eint(20, 27);
 }
diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c
index af868d258e66..cc73c885d6a1 100644
--- a/arch/arm/mach-sa1100/neponset.c
+++ b/arch/arm/mach-sa1100/neponset.c
@@ -166,7 +166,7 @@ static struct sa1100_port_fns neponset_port_fns = {
  * ensure that the IRQ signal is deasserted before returning.  This
  * is rather unfortunate.
  */
-static void neponset_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void neponset_irq_handler(struct irq_desc *desc)
 {
 	struct neponset_drvdata *d = irq_desc_get_handler_data(desc);
 	unsigned int irr;
diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c
index caba04340619..dc91cfa5483f 100644
--- a/arch/arm/plat-orion/gpio.c
+++ b/arch/arm/plat-orion/gpio.c
@@ -407,7 +407,7 @@ static int gpio_irq_set_type(struct irq_data *d, u32 type)
 	return 0;
 }
 
-static void gpio_irq_handler(unsigned irq, struct irq_desc *desc)
+static void gpio_irq_handler(struct irq_desc *desc)
 {
 	struct orion_gpio_chip *ochip = irq_desc_get_handler_data(desc);
 	u32 cause, type;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [RFC v1 16/25] genirq: Kill the first parameter 'irq' of irq_flow_handler_t
  2015-05-20  9:59 [RFC v1 00/25] Optimize irq flow handler Jiang Liu
                   ` (4 preceding siblings ...)
  2015-05-20 10:00 ` [RFC v1 15/25] genirq: Kill the first parameter 'irq' of irq_flow_handler_t Jiang Liu
@ 2015-05-20 10:00 ` Jiang Liu
  2015-05-20 10:00 ` [RFC v1 22/25] " Jiang Liu
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 24+ messages in thread
From: Jiang Liu @ 2015-05-20 10:00 UTC (permalink / raw)
  To: linux-arm-kernel

Now most IRQ flow handlers make no use of the first parameter 'irq'.
And for those who do make use of 'irq', we could easily get the irq
number through irq_desc->irq_data->irq. So kill the first parameter
'irq' of irq_flow_handler_t.

To ease review, I have split the changes into several parts, though
they should be merge as one to support bisecting.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
---
 arch/powerpc/include/asm/qe_ic.h                |   23 +++++++++--------------
 arch/powerpc/include/asm/tsi108_pci.h           |    2 +-
 arch/powerpc/platforms/512x/mpc5121_ads_cpld.c  |    4 +++-
 arch/powerpc/platforms/52xx/media5200.c         |    2 +-
 arch/powerpc/platforms/52xx/mpc52xx_gpt.c       |    2 +-
 arch/powerpc/platforms/82xx/pq2ads-pci-pic.c    |    2 +-
 arch/powerpc/platforms/85xx/common.c            |    2 +-
 arch/powerpc/platforms/85xx/mpc85xx_ds.c        |    2 +-
 arch/powerpc/platforms/85xx/socrates_fpga_pic.c |    3 ++-
 arch/powerpc/platforms/86xx/pic.c               |    2 +-
 arch/powerpc/platforms/8xx/m8xx_setup.c         |    2 +-
 arch/powerpc/platforms/cell/axon_msi.c          |    2 +-
 arch/powerpc/platforms/cell/interrupt.c         |    3 ++-
 arch/powerpc/platforms/cell/spider-pic.c        |    2 +-
 arch/powerpc/platforms/chrp/setup.c             |    2 +-
 arch/powerpc/platforms/embedded6xx/mvme5100.c   |    2 +-
 arch/powerpc/platforms/pseries/setup.c          |    2 +-
 arch/powerpc/sysdev/ge/ge_pic.c                 |    2 +-
 arch/powerpc/sysdev/mpic.c                      |    2 +-
 arch/powerpc/sysdev/qe_lib/qe_ic.c              |    4 ++--
 arch/powerpc/sysdev/tsi108_pci.c                |    2 +-
 arch/powerpc/sysdev/uic.c                       |    2 +-
 arch/powerpc/sysdev/xilinx_intc.c               |    2 +-
 23 files changed, 36 insertions(+), 37 deletions(-)

diff --git a/arch/powerpc/include/asm/qe_ic.h b/arch/powerpc/include/asm/qe_ic.h
index 25784cc959a0..1e155ca6d33c 100644
--- a/arch/powerpc/include/asm/qe_ic.h
+++ b/arch/powerpc/include/asm/qe_ic.h
@@ -59,14 +59,14 @@ enum qe_ic_grp_id {
 
 #ifdef CONFIG_QUICC_ENGINE
 void qe_ic_init(struct device_node *node, unsigned int flags,
-		void (*low_handler)(unsigned int irq, struct irq_desc *desc),
-		void (*high_handler)(unsigned int irq, struct irq_desc *desc));
+		void (*low_handler)(struct irq_desc *desc),
+		void (*high_handler)(struct irq_desc *desc));
 unsigned int qe_ic_get_low_irq(struct qe_ic *qe_ic);
 unsigned int qe_ic_get_high_irq(struct qe_ic *qe_ic);
 #else
 static inline void qe_ic_init(struct device_node *node, unsigned int flags,
-		void (*low_handler)(unsigned int irq, struct irq_desc *desc),
-		void (*high_handler)(unsigned int irq, struct irq_desc *desc))
+		void (*low_handler)(struct irq_desc *desc),
+		void (*high_handler)(struct irq_desc *desc))
 {}
 static inline unsigned int qe_ic_get_low_irq(struct qe_ic *qe_ic)
 { return 0; }
@@ -78,8 +78,7 @@ void qe_ic_set_highest_priority(unsigned int virq, int high);
 int qe_ic_set_priority(unsigned int virq, unsigned int priority);
 int qe_ic_set_high_priority(unsigned int virq, unsigned int priority, int high);
 
-static inline void qe_ic_cascade_low_ipic(unsigned int irq,
-					  struct irq_desc *desc)
+static inline void qe_ic_cascade_low_ipic(struct irq_desc *desc)
 {
 	struct qe_ic *qe_ic = irq_desc_get_handler_data(desc);
 	unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic);
@@ -88,8 +87,7 @@ static inline void qe_ic_cascade_low_ipic(unsigned int irq,
 		generic_handle_irq(cascade_irq);
 }
 
-static inline void qe_ic_cascade_high_ipic(unsigned int irq,
-					   struct irq_desc *desc)
+static inline void qe_ic_cascade_high_ipic(struct irq_desc *desc)
 {
 	struct qe_ic *qe_ic = irq_desc_get_handler_data(desc);
 	unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic);
@@ -98,8 +96,7 @@ static inline void qe_ic_cascade_high_ipic(unsigned int irq,
 		generic_handle_irq(cascade_irq);
 }
 
-static inline void qe_ic_cascade_low_mpic(unsigned int irq,
-					  struct irq_desc *desc)
+static inline void qe_ic_cascade_low_mpic(struct irq_desc *desc)
 {
 	struct qe_ic *qe_ic = irq_desc_get_handler_data(desc);
 	unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic);
@@ -111,8 +108,7 @@ static inline void qe_ic_cascade_low_mpic(unsigned int irq,
 	chip->irq_eoi(&desc->irq_data);
 }
 
-static inline void qe_ic_cascade_high_mpic(unsigned int irq,
-					   struct irq_desc *desc)
+static inline void qe_ic_cascade_high_mpic(struct irq_desc *desc)
 {
 	struct qe_ic *qe_ic = irq_desc_get_handler_data(desc);
 	unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic);
@@ -124,8 +120,7 @@ static inline void qe_ic_cascade_high_mpic(unsigned int irq,
 	chip->irq_eoi(&desc->irq_data);
 }
 
-static inline void qe_ic_cascade_muxed_mpic(unsigned int irq,
-					    struct irq_desc *desc)
+static inline void qe_ic_cascade_muxed_mpic(struct irq_desc *desc)
 {
 	struct qe_ic *qe_ic = irq_desc_get_handler_data(desc);
 	unsigned int cascade_irq;
diff --git a/arch/powerpc/include/asm/tsi108_pci.h b/arch/powerpc/include/asm/tsi108_pci.h
index 5653d7cc3e24..ae59d5b672b0 100644
--- a/arch/powerpc/include/asm/tsi108_pci.h
+++ b/arch/powerpc/include/asm/tsi108_pci.h
@@ -39,7 +39,7 @@
 
 extern int tsi108_setup_pci(struct device_node *dev, u32 cfg_phys, int primary);
 extern void tsi108_pci_int_init(struct device_node *node);
-extern void tsi108_irq_cascade(unsigned int irq, struct irq_desc *desc);
+extern void tsi108_irq_cascade(struct irq_desc *desc);
 extern void tsi108_clear_pci_cfg_error(void);
 
 #endif				/*  _ASM_POWERPC_TSI108_PCI_H */
diff --git a/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c b/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
index ca3a062ed1b9..4dc8f4f3d5ac 100644
--- a/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
+++ b/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
@@ -105,8 +105,10 @@ cpld_pic_get_irq(int offset, u8 ignore, u8 __iomem *statusp,
 }
 
 static void
-cpld_pic_cascade(unsigned int irq, struct irq_desc *desc)
+cpld_pic_cascade(struct irq_desc *desc)
 {
+	unsigned int irq;
+
 	irq = cpld_pic_get_irq(0, PCI_IGNORE, &cpld_regs->pci_status,
 		&cpld_regs->pci_mask);
 	if (irq != NO_IRQ) {
diff --git a/arch/powerpc/platforms/52xx/media5200.c b/arch/powerpc/platforms/52xx/media5200.c
index 32cae33c4266..0c64f63cc187 100644
--- a/arch/powerpc/platforms/52xx/media5200.c
+++ b/arch/powerpc/platforms/52xx/media5200.c
@@ -80,7 +80,7 @@ static struct irq_chip media5200_irq_chip = {
 	.irq_mask_ack = media5200_irq_mask,
 };
 
-void media5200_irq_cascade(unsigned int virq, struct irq_desc *desc)
+void media5200_irq_cascade(struct irq_desc *desc)
 {
 	struct irq_chip *chip = irq_desc_get_chip(desc);
 	int sub_virq, val;
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
index 63016621aff8..1f5f4775930c 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
@@ -191,7 +191,7 @@ static struct irq_chip mpc52xx_gpt_irq_chip = {
 	.irq_set_type = mpc52xx_gpt_irq_set_type,
 };
 
-void mpc52xx_gpt_irq_cascade(unsigned int virq, struct irq_desc *desc)
+void mpc52xx_gpt_irq_cascade(struct irq_desc *desc)
 {
 	struct mpc52xx_gpt_priv *gpt = irq_desc_get_handler_data(desc);
 	int sub_virq;
diff --git a/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c b/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c
index 74861a7fb807..60e89fc9c753 100644
--- a/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c
+++ b/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c
@@ -78,7 +78,7 @@ static struct irq_chip pq2ads_pci_ic = {
 	.irq_disable = pq2ads_pci_mask_irq
 };
 
-static void pq2ads_pci_irq_demux(unsigned int irq, struct irq_desc *desc)
+static void pq2ads_pci_irq_demux(struct irq_desc *desc)
 {
 	struct pq2ads_pci_pic *priv = irq_desc_get_handler_data(desc);
 	u32 stat, mask, pend;
diff --git a/arch/powerpc/platforms/85xx/common.c b/arch/powerpc/platforms/85xx/common.c
index 7bfb9b184dd4..23791de7b688 100644
--- a/arch/powerpc/platforms/85xx/common.c
+++ b/arch/powerpc/platforms/85xx/common.c
@@ -49,7 +49,7 @@ int __init mpc85xx_common_publish_devices(void)
 	return of_platform_bus_probe(NULL, mpc85xx_common_ids, NULL);
 }
 #ifdef CONFIG_CPM2
-static void cpm2_cascade(unsigned int irq, struct irq_desc *desc)
+static void cpm2_cascade(struct irq_desc *desc)
 {
 	struct irq_chip *chip = irq_desc_get_chip(desc);
 	int cascade_irq;
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
index ffdf02121a7c..f858306dba6a 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
@@ -46,7 +46,7 @@
 #endif
 
 #ifdef CONFIG_PPC_I8259
-static void mpc85xx_8259_cascade(unsigned int irq, struct irq_desc *desc)
+static void mpc85xx_8259_cascade(struct irq_desc *desc)
 {
 	struct irq_chip *chip = irq_desc_get_chip(desc);
 	unsigned int cascade_irq = i8259_irq();
diff --git a/arch/powerpc/platforms/85xx/socrates_fpga_pic.c b/arch/powerpc/platforms/85xx/socrates_fpga_pic.c
index 55a9682b9529..b074dae07183 100644
--- a/arch/powerpc/platforms/85xx/socrates_fpga_pic.c
+++ b/arch/powerpc/platforms/85xx/socrates_fpga_pic.c
@@ -91,8 +91,9 @@ static inline unsigned int socrates_fpga_pic_get_irq(unsigned int irq)
 			(irq_hw_number_t)i);
 }
 
-void socrates_fpga_pic_cascade(unsigned int irq, struct irq_desc *desc)
+void socrates_fpga_pic_cascade(struct irq_desc *desc)
 {
+	unsigned int irq = irq_desc_get_irq(desc);
 	struct irq_chip *chip = irq_desc_get_chip(desc);
 	unsigned int cascade_irq;
 
diff --git a/arch/powerpc/platforms/86xx/pic.c b/arch/powerpc/platforms/86xx/pic.c
index d5b98c0f958a..845defa1fd19 100644
--- a/arch/powerpc/platforms/86xx/pic.c
+++ b/arch/powerpc/platforms/86xx/pic.c
@@ -17,7 +17,7 @@
 #include <asm/i8259.h>
 
 #ifdef CONFIG_PPC_I8259
-static void mpc86xx_8259_cascade(unsigned int irq, struct irq_desc *desc)
+static void mpc86xx_8259_cascade(struct irq_desc *desc)
 {
 	struct irq_chip *chip = irq_desc_get_chip(desc);
 	unsigned int cascade_irq = i8259_irq();
diff --git a/arch/powerpc/platforms/8xx/m8xx_setup.c b/arch/powerpc/platforms/8xx/m8xx_setup.c
index d3037747031d..c289fc77b4ba 100644
--- a/arch/powerpc/platforms/8xx/m8xx_setup.c
+++ b/arch/powerpc/platforms/8xx/m8xx_setup.c
@@ -214,7 +214,7 @@ void mpc8xx_restart(char *cmd)
 	panic("Restart failed\n");
 }
 
-static void cpm_cascade(unsigned int irq, struct irq_desc *desc)
+static void cpm_cascade(struct irq_desc *desc)
 {
 	struct irq_chip *chip = irq_desc_get_chip(desc);
 	int cascade_irq = cpm_get_irq();
diff --git a/arch/powerpc/platforms/cell/axon_msi.c b/arch/powerpc/platforms/cell/axon_msi.c
index 817d0e6747ea..677836a1b5e4 100644
--- a/arch/powerpc/platforms/cell/axon_msi.c
+++ b/arch/powerpc/platforms/cell/axon_msi.c
@@ -92,7 +92,7 @@ static void msic_dcr_write(struct axon_msic *msic, unsigned int dcr_n, u32 val)
 	dcr_write(msic->dcr_host, dcr_n, val);
 }
 
-static void axon_msi_cascade(unsigned int irq, struct irq_desc *desc)
+static void axon_msi_cascade(struct irq_desc *desc)
 {
 	struct irq_chip *chip = irq_desc_get_chip(desc);
 	struct axon_msic *msic = irq_desc_get_handler_data(desc);
diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c
index 3af8324c122e..65ea856a583e 100644
--- a/arch/powerpc/platforms/cell/interrupt.c
+++ b/arch/powerpc/platforms/cell/interrupt.c
@@ -99,8 +99,9 @@ static void iic_ioexc_eoi(struct irq_data *d)
 {
 }
 
-static void iic_ioexc_cascade(unsigned int irq, struct irq_desc *desc)
+static void iic_ioexc_cascade(struct irq_desc *desc)
 {
+	unsigned int irq = irq_desc_get_irq(desc);
 	struct irq_chip *chip = irq_desc_get_chip(desc);
 	struct cbe_iic_regs __iomem *node_iic =
 		(void __iomem *)irq_desc_get_handler_data(desc);
diff --git a/arch/powerpc/platforms/cell/spider-pic.c b/arch/powerpc/platforms/cell/spider-pic.c
index 1f72f4ab6353..9d27de62dc62 100644
--- a/arch/powerpc/platforms/cell/spider-pic.c
+++ b/arch/powerpc/platforms/cell/spider-pic.c
@@ -199,7 +199,7 @@ static const struct irq_domain_ops spider_host_ops = {
 	.xlate = spider_host_xlate,
 };
 
-static void spider_irq_cascade(unsigned int irq, struct irq_desc *desc)
+static void spider_irq_cascade(struct irq_desc *desc)
 {
 	struct irq_chip *chip = irq_desc_get_chip(desc);
 	struct spider_pic *pic = irq_desc_get_handler_data(desc);
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c
index 15ebc4e8a151..987d1b8d68e3 100644
--- a/arch/powerpc/platforms/chrp/setup.c
+++ b/arch/powerpc/platforms/chrp/setup.c
@@ -363,7 +363,7 @@ void __init chrp_setup_arch(void)
 	if (ppc_md.progress) ppc_md.progress("Linux/PPC "UTS_RELEASE"\n", 0x0);
 }
 
-static void chrp_8259_cascade(unsigned int irq, struct irq_desc *desc)
+static void chrp_8259_cascade(struct irq_desc *desc)
 {
 	struct irq_chip *chip = irq_desc_get_chip(desc);
 	unsigned int cascade_irq = i8259_irq();
diff --git a/arch/powerpc/platforms/embedded6xx/mvme5100.c b/arch/powerpc/platforms/embedded6xx/mvme5100.c
index 1613303177e6..8f65aa3747f5 100644
--- a/arch/powerpc/platforms/embedded6xx/mvme5100.c
+++ b/arch/powerpc/platforms/embedded6xx/mvme5100.c
@@ -42,7 +42,7 @@
 static phys_addr_t pci_membase;
 static u_char *restart;
 
-static void mvme5100_8259_cascade(unsigned int irq, struct irq_desc *desc)
+static void mvme5100_8259_cascade(struct irq_desc *desc)
 {
 	struct irq_chip *chip = irq_desc_get_chip(desc);
 	unsigned int cascade_irq = i8259_irq();
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index df6a7041922b..642f5a49718b 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -111,7 +111,7 @@ static void __init fwnmi_init(void)
 		fwnmi_active = 1;
 }
 
-static void pseries_8259_cascade(unsigned int irq, struct irq_desc *desc)
+static void pseries_8259_cascade(struct irq_desc *desc)
 {
 	struct irq_chip *chip = irq_desc_get_chip(desc);
 	unsigned int cascade_irq = i8259_irq();
diff --git a/arch/powerpc/sysdev/ge/ge_pic.c b/arch/powerpc/sysdev/ge/ge_pic.c
index 2bcb78bb3a15..bf52768a162e 100644
--- a/arch/powerpc/sysdev/ge/ge_pic.c
+++ b/arch/powerpc/sysdev/ge/ge_pic.c
@@ -91,7 +91,7 @@ static int gef_pic_cascade_irq;
  * should be masked out.
  */
 
-void gef_pic_cascade(unsigned int irq, struct irq_desc *desc)
+void gef_pic_cascade(struct irq_desc *desc)
 {
 	struct irq_chip *chip = irq_desc_get_chip(desc);
 	unsigned int cascade_irq;
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index b2b8447a227a..caed5f221f03 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -1180,7 +1180,7 @@ static int mpic_host_xlate(struct irq_domain *h, struct device_node *ct,
 }
 
 /* IRQ handler for a secondary MPIC cascaded from another IRQ controller */
-static void mpic_cascade(unsigned int irq, struct irq_desc *desc)
+static void mpic_cascade(struct irq_desc *desc)
 {
 	struct irq_chip *chip = irq_desc_get_chip(desc);
 	struct mpic *mpic = irq_desc_get_handler_data(desc);
diff --git a/arch/powerpc/sysdev/qe_lib/qe_ic.c b/arch/powerpc/sysdev/qe_lib/qe_ic.c
index 543765e1ef14..50179099e728 100644
--- a/arch/powerpc/sysdev/qe_lib/qe_ic.c
+++ b/arch/powerpc/sysdev/qe_lib/qe_ic.c
@@ -310,8 +310,8 @@ unsigned int qe_ic_get_high_irq(struct qe_ic *qe_ic)
 }
 
 void __init qe_ic_init(struct device_node *node, unsigned int flags,
-		void (*low_handler)(unsigned int irq, struct irq_desc *desc),
-		void (*high_handler)(unsigned int irq, struct irq_desc *desc))
+		void (*low_handler)(struct irq_desc *desc),
+		void (*high_handler)(struct irq_desc *desc))
 {
 	struct qe_ic *qe_ic;
 	struct resource res;
diff --git a/arch/powerpc/sysdev/tsi108_pci.c b/arch/powerpc/sysdev/tsi108_pci.c
index 188012c58f7f..0b36e6a22d25 100644
--- a/arch/powerpc/sysdev/tsi108_pci.c
+++ b/arch/powerpc/sysdev/tsi108_pci.c
@@ -428,7 +428,7 @@ void __init tsi108_pci_int_init(struct device_node *node)
 	init_pci_source();
 }
 
-void tsi108_irq_cascade(unsigned int irq, struct irq_desc *desc)
+void tsi108_irq_cascade(struct irq_desc *desc)
 {
 	struct irq_chip *chip = irq_desc_get_chip(desc);
 	unsigned int cascade_irq = get_pci_source();
diff --git a/arch/powerpc/sysdev/uic.c b/arch/powerpc/sysdev/uic.c
index e763fe215cf5..902af049b492 100644
--- a/arch/powerpc/sysdev/uic.c
+++ b/arch/powerpc/sysdev/uic.c
@@ -194,7 +194,7 @@ static struct irq_domain_ops uic_host_ops = {
 	.xlate	= irq_domain_xlate_twocell,
 };
 
-void uic_irq_cascade(unsigned int virq, struct irq_desc *desc)
+void uic_irq_cascade(struct irq_desc *desc)
 {
 	struct irq_chip *chip = irq_desc_get_chip(desc);
 	struct irq_data *idata = irq_desc_get_irq_data(desc);
diff --git a/arch/powerpc/sysdev/xilinx_intc.c b/arch/powerpc/sysdev/xilinx_intc.c
index 56f0524e47a6..78e0f1be1474 100644
--- a/arch/powerpc/sysdev/xilinx_intc.c
+++ b/arch/powerpc/sysdev/xilinx_intc.c
@@ -222,7 +222,7 @@ int xilinx_intc_get_irq(void)
 /*
  * Support code for cascading to 8259 interrupt controllers
  */
-static void xilinx_i8259_cascade(unsigned int irq, struct irq_desc *desc)
+static void xilinx_i8259_cascade(struct irq_desc *desc)
 {
 	struct irq_chip *chip = irq_desc_get_chip(desc);
 	unsigned int cascade_irq = i8259_irq();
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [RFC v1 22/25] genirq: Kill the first parameter 'irq' of irq_flow_handler_t
  2015-05-20  9:59 [RFC v1 00/25] Optimize irq flow handler Jiang Liu
                   ` (5 preceding siblings ...)
  2015-05-20 10:00 ` [RFC v1 16/25] " Jiang Liu
@ 2015-05-20 10:00 ` Jiang Liu
  2015-05-20 10:00 ` [RFC v1 23/25] " Jiang Liu
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 24+ messages in thread
From: Jiang Liu @ 2015-05-20 10:00 UTC (permalink / raw)
  To: linux-arm-kernel

Now most IRQ flow handlers make no use of the first parameter 'irq'.
And for those who do make use of 'irq', we could easily get the irq
number through irq_desc->irq_data->irq. So kill the first parameter
'irq' of irq_flow_handler_t.

To ease review, I have split the changes into several parts, though
they should be merge as one to support bisecting.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
---
 drivers/gpio/gpio-altera.c     |    6 ++----
 drivers/gpio/gpio-bcm-kona.c   |    2 +-
 drivers/gpio/gpio-davinci.c    |    3 ++-
 drivers/gpio/gpio-dwapb.c      |    2 +-
 drivers/gpio/gpio-ep93xx.c     |    5 +++--
 drivers/gpio/gpio-intel-mid.c  |    2 +-
 drivers/gpio/gpio-lynxpoint.c  |    2 +-
 drivers/gpio/gpio-mpc8xxx.c    |    2 +-
 drivers/gpio/gpio-msic.c       |    2 +-
 drivers/gpio/gpio-msm-v2.c     |    2 +-
 drivers/gpio/gpio-mvebu.c      |    2 +-
 drivers/gpio/gpio-mxc.c        |    4 ++--
 drivers/gpio/gpio-mxs.c        |    2 +-
 drivers/gpio/gpio-omap.c       |    2 +-
 drivers/gpio/gpio-pl061.c      |    2 +-
 drivers/gpio/gpio-pxa.c        |    2 +-
 drivers/gpio/gpio-sa1100.c     |    4 ++--
 drivers/gpio/gpio-tegra.c      |    2 +-
 drivers/gpio/gpio-timberdale.c |    5 +++--
 drivers/gpio/gpio-tz1090.c     |    4 ++--
 drivers/gpio/gpio-vf610.c      |    2 +-
 drivers/gpio/gpio-zynq.c       |    2 +-
 22 files changed, 31 insertions(+), 30 deletions(-)

diff --git a/drivers/gpio/gpio-altera.c b/drivers/gpio/gpio-altera.c
index 449fb46cb8a0..985c3bd9a03e 100644
--- a/drivers/gpio/gpio-altera.c
+++ b/drivers/gpio/gpio-altera.c
@@ -200,8 +200,7 @@ static int altera_gpio_direction_output(struct gpio_chip *gc,
 	return 0;
 }
 
-static void altera_gpio_irq_edge_handler(unsigned int irq,
-					struct irq_desc *desc)
+static void altera_gpio_irq_edge_handler(struct irq_desc *desc)
 {
 	struct altera_gpio_chip *altera_gc;
 	struct irq_chip *chip;
@@ -230,8 +229,7 @@ static void altera_gpio_irq_edge_handler(unsigned int irq,
 }
 
 
-static void altera_gpio_irq_leveL_high_handler(unsigned int irq,
-					      struct irq_desc *desc)
+static void altera_gpio_irq_leveL_high_handler(struct irq_desc *desc)
 {
 	struct altera_gpio_chip *altera_gc;
 	struct irq_chip *chip;
diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c
index 2e7a8c66fe57..6471892f4f83 100644
--- a/drivers/gpio/gpio-bcm-kona.c
+++ b/drivers/gpio/gpio-bcm-kona.c
@@ -427,7 +427,7 @@ static int bcm_kona_gpio_irq_set_type(struct irq_data *d, unsigned int type)
 	return 0;
 }
 
-static void bcm_kona_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void bcm_kona_gpio_irq_handler(struct irq_desc *desc)
 {
 	void __iomem *reg_base;
 	int bit, bank_id;
diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
index 477d5b8616ab..31206ea4c84e 100644
--- a/drivers/gpio/gpio-davinci.c
+++ b/drivers/gpio/gpio-davinci.c
@@ -327,8 +327,9 @@ static struct irq_chip gpio_irqchip = {
 };
 
 static void
-gpio_irq_handler(unsigned irq, struct irq_desc *desc)
+gpio_irq_handler(struct irq_desc *desc)
 {
+	unsigned irq = irq_desc_get_irq(desc);
 	struct davinci_gpio_regs __iomem *g;
 	u32 mask = 0xffff;
 	struct davinci_gpio_controller *d;
diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c
index 649be07a845d..bf7cb1be756d 100644
--- a/drivers/gpio/gpio-dwapb.c
+++ b/drivers/gpio/gpio-dwapb.c
@@ -147,7 +147,7 @@ static u32 dwapb_do_irq(struct dwapb_gpio *gpio)
 	return ret;
 }
 
-static void dwapb_irq_handler(u32 irq, struct irq_desc *desc)
+static void dwapb_irq_handler(struct irq_desc *desc)
 {
 	struct dwapb_gpio *gpio = irq_desc_get_handler_data(desc);
 	struct irq_chip *chip = irq_desc_get_chip(desc);
diff --git a/drivers/gpio/gpio-ep93xx.c b/drivers/gpio/gpio-ep93xx.c
index 45684f36ddb1..03648a8a6f8e 100644
--- a/drivers/gpio/gpio-ep93xx.c
+++ b/drivers/gpio/gpio-ep93xx.c
@@ -78,7 +78,7 @@ static void ep93xx_gpio_int_debounce(unsigned int irq, bool enable)
 		EP93XX_GPIO_REG(int_debounce_register_offset[port]));
 }
 
-static void ep93xx_gpio_ab_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void ep93xx_gpio_ab_irq_handler(struct irq_desc *desc)
 {
 	unsigned char status;
 	int i;
@@ -100,13 +100,14 @@ static void ep93xx_gpio_ab_irq_handler(unsigned int irq, struct irq_desc *desc)
 	}
 }
 
-static void ep93xx_gpio_f_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void ep93xx_gpio_f_irq_handler(struct irq_desc *desc)
 {
 	/*
 	 * map discontiguous hw irq range to continuous sw irq range:
 	 *
 	 *  IRQ_EP93XX_GPIO{0..7}MUX -> gpio_to_irq(EP93XX_GPIO_LINE_F({0..7})
 	 */
+	unsigned int irq = irq_desc_get_irq(desc);
 	int port_f_idx = ((irq + 1) & 7) ^ 4; /* {19..22,47..50} -> {0..7} */
 	int gpio_irq = gpio_to_irq(EP93XX_GPIO_LINE_F(0)) + port_f_idx;
 
diff --git a/drivers/gpio/gpio-intel-mid.c b/drivers/gpio/gpio-intel-mid.c
index aa28c65eb6b4..70097472b02c 100644
--- a/drivers/gpio/gpio-intel-mid.c
+++ b/drivers/gpio/gpio-intel-mid.c
@@ -301,7 +301,7 @@ static const struct pci_device_id intel_gpio_ids[] = {
 };
 MODULE_DEVICE_TABLE(pci, intel_gpio_ids);
 
-static void intel_mid_irq_handler(unsigned irq, struct irq_desc *desc)
+static void intel_mid_irq_handler(struct irq_desc *desc)
 {
 	struct gpio_chip *gc = irq_desc_get_handler_data(desc);
 	struct intel_mid_gpio *priv = to_intel_gpio_priv(gc);
diff --git a/drivers/gpio/gpio-lynxpoint.c b/drivers/gpio/gpio-lynxpoint.c
index 127c755b38dc..23e884aefe36 100644
--- a/drivers/gpio/gpio-lynxpoint.c
+++ b/drivers/gpio/gpio-lynxpoint.c
@@ -234,7 +234,7 @@ static int lp_gpio_direction_output(struct gpio_chip *chip,
 	return 0;
 }
 
-static void lp_gpio_irq_handler(unsigned hwirq, struct irq_desc *desc)
+static void lp_gpio_irq_handler(struct irq_desc *desc)
 {
 	struct irq_data *data = irq_desc_get_irq_data(desc);
 	struct gpio_chip *gc = irq_desc_get_handler_data(desc);
diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c
index a65b75161aa4..281dea4d2e39 100644
--- a/drivers/gpio/gpio-mpc8xxx.c
+++ b/drivers/gpio/gpio-mpc8xxx.c
@@ -185,7 +185,7 @@ static int mpc8xxx_gpio_to_irq(struct gpio_chip *gc, unsigned offset)
 		return -ENXIO;
 }
 
-static void mpc8xxx_gpio_irq_cascade(unsigned int irq, struct irq_desc *desc)
+static void mpc8xxx_gpio_irq_cascade(struct irq_desc *desc)
 {
 	struct mpc8xxx_gpio_chip *mpc8xxx_gc = irq_desc_get_handler_data(desc);
 	struct irq_chip *chip = irq_desc_get_chip(desc);
diff --git a/drivers/gpio/gpio-msic.c b/drivers/gpio/gpio-msic.c
index 01acf0a8cdb1..35b3046d1c7d 100644
--- a/drivers/gpio/gpio-msic.c
+++ b/drivers/gpio/gpio-msic.c
@@ -232,7 +232,7 @@ static struct irq_chip msic_irqchip = {
 	.irq_bus_sync_unlock	= msic_bus_sync_unlock,
 };
 
-static void msic_gpio_irq_handler(unsigned irq, struct irq_desc *desc)
+static void msic_gpio_irq_handler(struct irq_desc *desc)
 {
 	struct irq_data *data = irq_desc_get_irq_data(desc);
 	struct msic_gpio *mg = irq_data_get_irq_handler_data(data);
diff --git a/drivers/gpio/gpio-msm-v2.c b/drivers/gpio/gpio-msm-v2.c
index 52ff18229fdc..f4a69e005409 100644
--- a/drivers/gpio/gpio-msm-v2.c
+++ b/drivers/gpio/gpio-msm-v2.c
@@ -313,7 +313,7 @@ static int msm_gpio_irq_set_type(struct irq_data *d, unsigned int flow_type)
  * which have been set as summary IRQ lines and which are triggered,
  * and to call their interrupt handlers.
  */
-static void msm_summary_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void msm_summary_irq_handler(struct irq_desc *desc)
 {
 	unsigned long i;
 	struct irq_chip *chip = irq_desc_get_chip(desc);
diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index a8c302ef7bc4..5b12549e3d6c 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -458,7 +458,7 @@ static int mvebu_gpio_irq_set_type(struct irq_data *d, unsigned int type)
 	return 0;
 }
 
-static void mvebu_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void mvebu_gpio_irq_handler(struct irq_desc *desc)
 {
 	struct mvebu_gpio_chip *mvchip = irq_desc_get_handler_data(desc);
 	struct irq_chip *chip = irq_desc_get_chip(desc);
diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c
index f10948c04f7c..1f5186002326 100644
--- a/drivers/gpio/gpio-mxc.c
+++ b/drivers/gpio/gpio-mxc.c
@@ -272,7 +272,7 @@ static void mxc_gpio_irq_handler(struct mxc_gpio_port *port, u32 irq_stat)
 }
 
 /* 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);
@@ -288,7 +288,7 @@ static void mx3_gpio_irq_handler(u32 irq, struct irq_desc *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;
diff --git a/drivers/gpio/gpio-mxs.c b/drivers/gpio/gpio-mxs.c
index 039c7d50e64f..e5b286e9f016 100644
--- a/drivers/gpio/gpio-mxs.c
+++ b/drivers/gpio/gpio-mxs.c
@@ -154,7 +154,7 @@ static void mxs_flip_edge(struct mxs_gpio_port *port, u32 gpio)
 }
 
 /* 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);
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index acbf3feff1e2..7f764d786efe 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -711,7 +711,7 @@ static void omap_gpio_free(struct gpio_chip *chip, unsigned offset)
  * 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;
diff --git a/drivers/gpio/gpio-pl061.c b/drivers/gpio/gpio-pl061.c
index 04756130437f..229ef653e0f8 100644
--- a/drivers/gpio/gpio-pl061.c
+++ b/drivers/gpio/gpio-pl061.c
@@ -187,7 +187,7 @@ static int pl061_irq_type(struct irq_data *d, unsigned trigger)
 	return 0;
 }
 
-static void pl061_irq_handler(unsigned irq, struct irq_desc *desc)
+static void pl061_irq_handler(struct irq_desc *desc)
 {
 	unsigned long pending;
 	int offset;
diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c
index cdbbcf0faf9d..a6d51338b86e 100644
--- a/drivers/gpio/gpio-pxa.c
+++ b/drivers/gpio/gpio-pxa.c
@@ -401,7 +401,7 @@ static int pxa_gpio_irq_type(struct irq_data *d, unsigned int type)
 	return 0;
 }
 
-static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc)
+static void pxa_gpio_demux_handler(struct irq_desc *desc)
 {
 	struct pxa_gpio_chip *c;
 	int loop, gpio, gpio_base, n;
diff --git a/drivers/gpio/gpio-sa1100.c b/drivers/gpio/gpio-sa1100.c
index bec397a60204..cde43049d5f6 100644
--- a/drivers/gpio/gpio-sa1100.c
+++ b/drivers/gpio/gpio-sa1100.c
@@ -173,9 +173,9 @@ static struct irq_domain *sa1100_gpio_irqdomain;
  * and call the handler.
  */
 static void
-sa1100_gpio_handler(unsigned int irq, struct irq_desc *desc)
+sa1100_gpio_handler(struct irq_desc *desc)
 {
-	unsigned int mask;
+	unsigned int mask, irq;
 
 	mask = GEDR;
 	do {
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index 89ed8a56eb0b..bfd5f39d1bc3 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -266,7 +266,7 @@ static void tegra_gpio_irq_shutdown(struct irq_data *d)
 	gpiochip_unlock_as_irq(&tegra_gpio_chip, gpio);
 }
 
-static void tegra_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void tegra_gpio_irq_handler(struct irq_desc *desc)
 {
 	int port;
 	int pin;
diff --git a/drivers/gpio/gpio-timberdale.c b/drivers/gpio/gpio-timberdale.c
index d4e8cb4f2e53..107094139ec4 100644
--- a/drivers/gpio/gpio-timberdale.c
+++ b/drivers/gpio/gpio-timberdale.c
@@ -192,13 +192,14 @@ out:
 	return ret;
 }
 
-static void timbgpio_irq(unsigned int irq, struct irq_desc *desc)
+static void timbgpio_irq(struct irq_desc *desc)
 {
 	struct timbgpio *tgpio = irq_desc_get_handler_data(desc);
+	struct irq_data *data = irq_desc_get_irq_data(desc);
 	unsigned long ipr;
 	int offset;
 
-	desc->irq_data.chip->irq_ack(irq_get_irq_data(irq));
+	data->chip->irq_ack(data);
 	ipr = ioread32(tgpio->membase + TGPIO_IPR);
 	iowrite32(ipr, tgpio->membase + TGPIO_ICR);
 
diff --git a/drivers/gpio/gpio-tz1090.c b/drivers/gpio/gpio-tz1090.c
index 445660adc898..58dfa595dbd7 100644
--- a/drivers/gpio/gpio-tz1090.c
+++ b/drivers/gpio/gpio-tz1090.c
@@ -375,7 +375,7 @@ static int gpio_set_irq_wake(struct irq_data *data, unsigned int on)
 #define gpio_set_irq_wake NULL
 #endif
 
-static void tz1090_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void tz1090_gpio_irq_handler(struct irq_desc *desc)
 {
 	irq_hw_number_t hw;
 	unsigned int irq_stat, irq_no;
@@ -400,7 +400,7 @@ static void tz1090_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
 				== IRQ_TYPE_EDGE_BOTH)
 			tz1090_gpio_irq_next_edge(bank, hw);
 
-		generic_handle_irq_desc(irq_no, child_desc);
+		generic_handle_irq_desc(child_desc);
 	}
 }
 
diff --git a/drivers/gpio/gpio-vf610.c b/drivers/gpio/gpio-vf610.c
index fa344388f4da..18d0ae80dc4a 100644
--- a/drivers/gpio/gpio-vf610.c
+++ b/drivers/gpio/gpio-vf610.c
@@ -118,7 +118,7 @@ static int vf610_gpio_direction_output(struct gpio_chip *chip, unsigned gpio,
 	return pinctrl_gpio_direction_output(chip->base + gpio);
 }
 
-static void vf610_gpio_irq_handler(u32 irq, struct irq_desc *desc)
+static void vf610_gpio_irq_handler(struct irq_desc *desc)
 {
 	struct vf610_gpio_port *port = irq_desc_get_handler_data(desc);
 	struct irq_chip *chip = irq_desc_get_chip(desc);
diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c
index 70e3a568b1cb..92d91d3b6dd7 100644
--- a/drivers/gpio/gpio-zynq.c
+++ b/drivers/gpio/gpio-zynq.c
@@ -495,7 +495,7 @@ static void zynq_gpio_handle_bank_irq(struct zynq_gpio *gpio,
  * application for that pin.
  * Note: A bug is reported if no handler is set for the gpio pin.
  */
-static void zynq_gpio_irqhandler(unsigned int irq, struct irq_desc *desc)
+static void zynq_gpio_irqhandler(struct irq_desc *desc)
 {
 	u32 int_sts, int_enb;
 	unsigned int bank_num;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [RFC v1 23/25] genirq: Kill the first parameter 'irq' of irq_flow_handler_t
  2015-05-20  9:59 [RFC v1 00/25] Optimize irq flow handler Jiang Liu
                   ` (6 preceding siblings ...)
  2015-05-20 10:00 ` [RFC v1 22/25] " Jiang Liu
@ 2015-05-20 10:00 ` Jiang Liu
  2015-05-20 10:00 ` [RFC v1 25/25] " Jiang Liu
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 24+ messages in thread
From: Jiang Liu @ 2015-05-20 10:00 UTC (permalink / raw)
  To: linux-arm-kernel

Now most IRQ flow handlers make no use of the first parameter 'irq'.
And for those who do make use of 'irq', we could easily get the irq
number through irq_desc->irq_data->irq. So kill the first parameter
'irq' of irq_flow_handler_t.

To ease review, I have split the changes into several parts, though
they should be merge as one to support bisecting.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
---
 drivers/irqchip/exynos-combiner.c    |    4 ++--
 drivers/irqchip/irq-bcm7038-l1.c     |    2 +-
 drivers/irqchip/irq-bcm7120-l2.c     |    2 +-
 drivers/irqchip/irq-brcmstb-l2.c     |    6 +++---
 drivers/irqchip/irq-dw-apb-ictl.c    |    2 +-
 drivers/irqchip/irq-gic.c            |    2 +-
 drivers/irqchip/irq-imgpdc.c         |    5 +++--
 drivers/irqchip/irq-keystone.c       |    3 ++-
 drivers/irqchip/irq-metag-ext.c      |    3 +--
 drivers/irqchip/irq-metag.c          |    3 +--
 drivers/irqchip/irq-mips-gic.c       |    2 +-
 drivers/irqchip/irq-mmp.c            |    3 ++-
 drivers/irqchip/irq-orion.c          |    2 +-
 drivers/irqchip/irq-s3c24xx.c        |    3 ++-
 drivers/irqchip/irq-sunxi-nmi.c      |    2 +-
 drivers/irqchip/irq-tb10x.c          |    4 ++--
 drivers/irqchip/irq-versatile-fpga.c |    6 +++---
 drivers/irqchip/irq-vic.c            |    2 +-
 drivers/irqchip/spear-shirq.c        |    2 +-
 19 files changed, 30 insertions(+), 28 deletions(-)

diff --git a/drivers/irqchip/exynos-combiner.c b/drivers/irqchip/exynos-combiner.c
index 039ceb46fcc0..2bf152307bac 100644
--- a/drivers/irqchip/exynos-combiner.c
+++ b/drivers/irqchip/exynos-combiner.c
@@ -60,7 +60,7 @@ static void combiner_unmask_irq(struct irq_data *data)
 	__raw_writel(mask, combiner_base(data) + COMBINER_ENABLE_SET);
 }
 
-static void combiner_handle_cascade_irq(unsigned int irq, struct irq_desc *desc)
+static void combiner_handle_cascade_irq(struct irq_desc *desc)
 {
 	struct combiner_chip_data *chip_data = irq_desc_get_handler_data(desc);
 	struct irq_chip *chip = irq_desc_get_chip(desc);
@@ -81,7 +81,7 @@ static void combiner_handle_cascade_irq(unsigned int irq, struct irq_desc *desc)
 	cascade_irq = irq_find_mapping(combiner_irq_domain, combiner_irq);
 
 	if (unlikely(!cascade_irq))
-		handle_bad_irq(irq, desc);
+		handle_bad_irq(desc);
 	else
 		generic_handle_irq(cascade_irq);
 
diff --git a/drivers/irqchip/irq-bcm7038-l1.c b/drivers/irqchip/irq-bcm7038-l1.c
index d3b8c8be15f6..9ad6540bd57e 100644
--- a/drivers/irqchip/irq-bcm7038-l1.c
+++ b/drivers/irqchip/irq-bcm7038-l1.c
@@ -116,7 +116,7 @@ static inline void l1_writel(u32 val, void __iomem *reg)
 		writel(val, reg);
 }
 
-static void bcm7038_l1_irq_handle(unsigned int irq, struct irq_desc *desc)
+static void bcm7038_l1_irq_handle(struct irq_desc *desc)
 {
 	struct bcm7038_l1_chip *intc = irq_desc_get_handler_data(desc);
 	struct bcm7038_l1_cpu *cpu;
diff --git a/drivers/irqchip/irq-bcm7120-l2.c b/drivers/irqchip/irq-bcm7120-l2.c
index 3ba5cc780fcb..4ee0d839009e 100644
--- a/drivers/irqchip/irq-bcm7120-l2.c
+++ b/drivers/irqchip/irq-bcm7120-l2.c
@@ -52,7 +52,7 @@ struct bcm7120_l2_intc_data {
 	const __be32 *map_mask_prop;
 };
 
-static void bcm7120_l2_intc_irq_handle(unsigned int irq, struct irq_desc *desc)
+static void bcm7120_l2_intc_irq_handle(struct irq_desc *desc)
 {
 	struct bcm7120_l2_intc_data *b = irq_desc_get_handler_data(desc);
 	struct irq_chip *chip = irq_desc_get_chip(desc);
diff --git a/drivers/irqchip/irq-brcmstb-l2.c b/drivers/irqchip/irq-brcmstb-l2.c
index d6bcc6be0777..f82b96a514fe 100644
--- a/drivers/irqchip/irq-brcmstb-l2.c
+++ b/drivers/irqchip/irq-brcmstb-l2.c
@@ -51,7 +51,7 @@ struct brcmstb_l2_intc_data {
 	u32 saved_mask; /* for suspend/resume */
 };
 
-static void brcmstb_l2_intc_irq_handle(unsigned int irq, struct irq_desc *desc)
+static void brcmstb_l2_intc_irq_handle(struct irq_desc *desc)
 {
 	struct brcmstb_l2_intc_data *b = irq_desc_get_handler_data(desc);
 	struct irq_chip_generic *gc = irq_get_domain_generic_chip(b->domain, 0);
@@ -65,13 +65,13 @@ static void brcmstb_l2_intc_irq_handle(unsigned int irq, struct irq_desc *desc)
 
 	if (status == 0) {
 		raw_spin_lock(&desc->lock);
-		handle_bad_irq(irq, desc);
+		handle_bad_irq(desc);
 		raw_spin_unlock(&desc->lock);
 		goto out;
 	}
 
 	do {
-		irq = ffs(status) - 1;
+		unsigned int irq = ffs(status) - 1;
 		/* ack at our level */
 		irq_reg_writel(gc, 1 << irq, CPU_CLEAR);
 		status &= ~(1 << irq);
diff --git a/drivers/irqchip/irq-dw-apb-ictl.c b/drivers/irqchip/irq-dw-apb-ictl.c
index cddcd3b75f00..7a00d7822228 100644
--- a/drivers/irqchip/irq-dw-apb-ictl.c
+++ b/drivers/irqchip/irq-dw-apb-ictl.c
@@ -26,7 +26,7 @@
 #define APB_INT_FINALSTATUS_L	0x30
 #define APB_INT_FINALSTATUS_H	0x34
 
-static void dw_apb_ictl_handler(unsigned int irq, struct irq_desc *desc)
+static void dw_apb_ictl_handler(struct irq_desc *desc)
 {
 	struct irq_chip *chip = irq_desc_get_chip(desc);
 	struct irq_chip_generic *gc = irq_desc_get_handler_data(desc);
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index 6c8a5a7fb4a0..e24d240a8fe8 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -286,7 +286,7 @@ static void __exception_irq_entry gic_handle_irq(struct pt_regs *regs)
 	} while (1);
 }
 
-static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc)
+static void gic_handle_cascade_irq(struct irq_desc *desc)
 {
 	struct gic_chip_data *chip_data = irq_desc_get_handler_data(desc);
 	struct irq_chip *chip = irq_desc_get_chip(desc);
diff --git a/drivers/irqchip/irq-imgpdc.c b/drivers/irqchip/irq-imgpdc.c
index 8071c2eb0248..5d8a482100f7 100644
--- a/drivers/irqchip/irq-imgpdc.c
+++ b/drivers/irqchip/irq-imgpdc.c
@@ -218,8 +218,9 @@ static int pdc_irq_set_wake(struct irq_data *data, unsigned int on)
 	return 0;
 }
 
-static void pdc_intc_perip_isr(unsigned int irq, struct irq_desc *desc)
+static void pdc_intc_perip_isr(struct irq_desc *desc)
 {
+	unsigned int irq = irq_desc_get_irq(desc);
 	struct pdc_intc_priv *priv;
 	unsigned int i, irq_no;
 
@@ -239,7 +240,7 @@ found:
 	generic_handle_irq(irq_no);
 }
 
-static void pdc_intc_syswake_isr(unsigned int irq, struct irq_desc *desc)
+static void pdc_intc_syswake_isr(struct irq_desc *desc)
 {
 	struct pdc_intc_priv *priv;
 	unsigned int syswake, irq_no;
diff --git a/drivers/irqchip/irq-keystone.c b/drivers/irqchip/irq-keystone.c
index 78e8b3ce5252..f97a65ef5f8c 100644
--- a/drivers/irqchip/irq-keystone.c
+++ b/drivers/irqchip/irq-keystone.c
@@ -84,8 +84,9 @@ static void keystone_irq_ack(struct irq_data *d)
 	/* nothing to do here */
 }
 
-static void keystone_irq_handler(unsigned irq, struct irq_desc *desc)
+static void keystone_irq_handler(struct irq_desc *desc)
 {
+	unsigned int irq = irq_desc_get_irq(desc);
 	struct keystone_irq_device *kirq = irq_desc_get_handler_data(desc);
 	unsigned long pending;
 	int src, virq;
diff --git a/drivers/irqchip/irq-metag-ext.c b/drivers/irqchip/irq-metag-ext.c
index 52e501d8c8f0..f4b46643f2d2 100644
--- a/drivers/irqchip/irq-metag-ext.c
+++ b/drivers/irqchip/irq-metag-ext.c
@@ -436,7 +436,6 @@ static int meta_intc_irq_set_type(struct irq_data *data, unsigned int flow_type)
 
 /**
  * meta_intc_irq_demux() - external irq de-multiplexer
- * @irq:	the virtual interrupt number
  * @desc:	the interrupt description structure for this irq
  *
  * The cpu receives an interrupt on TR2 when a SoC interrupt has occurred. It is
@@ -446,7 +445,7 @@ static int meta_intc_irq_set_type(struct irq_data *data, unsigned int flow_type)
  * Whilst using TR2 to detect external interrupts is a software convention it is
  * (hopefully) unlikely to change.
  */
-static void meta_intc_irq_demux(unsigned int irq, struct irq_desc *desc)
+static void meta_intc_irq_demux(struct irq_desc *desc)
 {
 	struct meta_intc_priv *priv = &meta_intc_priv;
 	irq_hw_number_t hw;
diff --git a/drivers/irqchip/irq-metag.c b/drivers/irqchip/irq-metag.c
index c16c186d97d3..f806a61d6660 100644
--- a/drivers/irqchip/irq-metag.c
+++ b/drivers/irqchip/irq-metag.c
@@ -213,14 +213,13 @@ static int metag_internal_irq_set_affinity(struct irq_data *data,
 
 /*
  *	metag_internal_irq_demux - irq de-multiplexer
- *	@irq:	the interrupt number
  *	@desc:	the interrupt description structure for this irq
  *
  *	The cpu receives an interrupt on TR1 when an interrupt has
  *	occurred. It is this function's job to demux this irq and
  *	figure out exactly which trigger needs servicing.
  */
-static void metag_internal_irq_demux(unsigned int irq, struct irq_desc *desc)
+static void metag_internal_irq_demux(struct irq_desc *desc)
 {
 	struct metag_internal_irq_priv *priv = irq_desc_get_handler_data(desc);
 	irq_hw_number_t hw;
diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
index fb2e64b1f414..36d6b457e8e9 100644
--- a/drivers/irqchip/irq-mips-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c
@@ -510,7 +510,7 @@ static void __gic_irq_dispatch(void)
 	gic_handle_shared_int();
 }
 
-static void gic_irq_dispatch(unsigned int irq, struct irq_desc *desc)
+static void gic_irq_dispatch(struct irq_desc *desc)
 {
 	__gic_irq_dispatch();
 }
diff --git a/drivers/irqchip/irq-mmp.c b/drivers/irqchip/irq-mmp.c
index c0da57bdb89d..bde3bbd245a4 100644
--- a/drivers/irqchip/irq-mmp.c
+++ b/drivers/irqchip/irq-mmp.c
@@ -130,8 +130,9 @@ struct irq_chip icu_irq_chip = {
 	.irq_unmask	= icu_unmask_irq,
 };
 
-static void icu_mux_irq_demux(unsigned int irq, struct irq_desc *desc)
+static void icu_mux_irq_demux(struct irq_desc *desc)
 {
+	unsigned int irq = irq_desc_get_irq(desc);
 	struct irq_domain *domain;
 	struct icu_chip_data *data;
 	int i;
diff --git a/drivers/irqchip/irq-orion.c b/drivers/irqchip/irq-orion.c
index 58e034db0e7c..9e5a36cd1b8f 100644
--- a/drivers/irqchip/irq-orion.c
+++ b/drivers/irqchip/irq-orion.c
@@ -107,7 +107,7 @@ IRQCHIP_DECLARE(orion_intc, "marvell,orion-intc", orion_irq_init);
 #define ORION_BRIDGE_IRQ_CAUSE	0x00
 #define ORION_BRIDGE_IRQ_MASK	0x04
 
-static void orion_bridge_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void orion_bridge_irq_handler(struct irq_desc *desc)
 {
 	struct irq_domain *d = irq_desc_get_handler_data(desc);
 
diff --git a/drivers/irqchip/irq-s3c24xx.c b/drivers/irqchip/irq-s3c24xx.c
index c8d373fcd823..885b4bacf5ad 100644
--- a/drivers/irqchip/irq-s3c24xx.c
+++ b/drivers/irqchip/irq-s3c24xx.c
@@ -299,7 +299,7 @@ static struct irq_chip s3c_irq_eint0t4 = {
 	.irq_set_type	= s3c_irqext0_type,
 };
 
-static void s3c_irq_demux(unsigned int irq, struct irq_desc *desc)
+static void s3c_irq_demux(struct irq_desc *desc)
 {
 	struct irq_chip *chip = irq_desc_get_chip(desc);
 	struct s3c_irq_data *irq_data = irq_desc_get_chip_data(desc);
@@ -309,6 +309,7 @@ static void s3c_irq_demux(unsigned int irq, struct irq_desc *desc)
 	unsigned long msk;
 	unsigned int n;
 	unsigned int offset;
+	unsigned int irq;
 
 	/* we're using individual domains for the non-dt case
 	 * and one big domain for the dt case where the subintc
diff --git a/drivers/irqchip/irq-sunxi-nmi.c b/drivers/irqchip/irq-sunxi-nmi.c
index 2eaa9d9df241..4e16ccd398f8 100644
--- a/drivers/irqchip/irq-sunxi-nmi.c
+++ b/drivers/irqchip/irq-sunxi-nmi.c
@@ -58,7 +58,7 @@ static inline u32 sunxi_sc_nmi_read(struct irq_chip_generic *gc, u32 off)
 	return irq_reg_readl(gc, off);
 }
 
-static void sunxi_sc_nmi_handle_irq(unsigned int irq, struct irq_desc *desc)
+static void sunxi_sc_nmi_handle_irq(struct irq_desc *desc)
 {
 	struct irq_domain *domain = irq_desc_get_handler_data(desc);
 	struct irq_chip *chip = irq_desc_get_chip(desc);
diff --git a/drivers/irqchip/irq-tb10x.c b/drivers/irqchip/irq-tb10x.c
index accc20036a3c..bdcc39218d46 100644
--- a/drivers/irqchip/irq-tb10x.c
+++ b/drivers/irqchip/irq-tb10x.c
@@ -97,11 +97,11 @@ static int tb10x_irq_set_type(struct irq_data *data, unsigned int flow_type)
 	return IRQ_SET_MASK_OK;
 }
 
-static void tb10x_irq_cascade(unsigned int irq, struct irq_desc *desc)
+static void tb10x_irq_cascade(struct irq_desc *desc)
 {
 	struct irq_domain *domain = irq_desc_get_handler_data(desc);
 
-	generic_handle_irq(irq_find_mapping(domain, irq));
+	generic_handle_irq(irq_find_mapping(domain, irq_desc_get_irq(desc)));
 }
 
 static int __init of_tb10x_init_irq(struct device_node *ictl,
diff --git a/drivers/irqchip/irq-versatile-fpga.c b/drivers/irqchip/irq-versatile-fpga.c
index 1ab451729a5c..6ce21c1e9fff 100644
--- a/drivers/irqchip/irq-versatile-fpga.c
+++ b/drivers/irqchip/irq-versatile-fpga.c
@@ -66,18 +66,18 @@ static void fpga_irq_unmask(struct irq_data *d)
 	writel(mask, f->base + IRQ_ENABLE_SET);
 }
 
-static void fpga_irq_handle(unsigned int irq, struct irq_desc *desc)
+static void fpga_irq_handle(struct irq_desc *desc)
 {
 	struct fpga_irq_data *f = irq_desc_get_handler_data(desc);
 	u32 status = readl(f->base + IRQ_STATUS);
 
 	if (status == 0) {
-		do_bad_IRQ(irq, desc);
+		do_bad_IRQ(desc);
 		return;
 	}
 
 	do {
-		irq = ffs(status) - 1;
+		unsigned int irq = ffs(status) - 1;
 		status &= ~(1 << irq);
 		generic_handle_irq(irq_find_mapping(f->domain, irq));
 	} while (status);
diff --git a/drivers/irqchip/irq-vic.c b/drivers/irqchip/irq-vic.c
index 54089debf2dc..9f090e4284e4 100644
--- a/drivers/irqchip/irq-vic.c
+++ b/drivers/irqchip/irq-vic.c
@@ -226,7 +226,7 @@ static int handle_one_vic(struct vic_device *vic, struct pt_regs *regs)
 	return handled;
 }
 
-static void vic_handle_irq_cascaded(unsigned int irq, struct irq_desc *desc)
+static void vic_handle_irq_cascaded(struct irq_desc *desc)
 {
 	u32 stat, hwirq;
 	struct irq_chip *host_chip = irq_desc_get_chip(desc);
diff --git a/drivers/irqchip/spear-shirq.c b/drivers/irqchip/spear-shirq.c
index fb68ee9c0424..1396f0fad479 100644
--- a/drivers/irqchip/spear-shirq.c
+++ b/drivers/irqchip/spear-shirq.c
@@ -183,7 +183,7 @@ static struct spear_shirq *spear320_shirq_blocks[] = {
 	&spear320_shirq_intrcomm_ras,
 };
 
-static void shirq_handler(unsigned irq, struct irq_desc *desc)
+static void shirq_handler(struct irq_desc *desc)
 {
 	struct spear_shirq *shirq = irq_desc_get_handler_data(desc);
 	u32 pend;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [RFC v1 25/25] genirq: Kill the first parameter 'irq' of irq_flow_handler_t
  2015-05-20  9:59 [RFC v1 00/25] Optimize irq flow handler Jiang Liu
                   ` (7 preceding siblings ...)
  2015-05-20 10:00 ` [RFC v1 23/25] " Jiang Liu
@ 2015-05-20 10:00 ` Jiang Liu
  2015-05-20 15:40   ` Thomas Gleixner
  2015-05-20 10:16 ` [RFC v1 00/25] Optimize irq flow handler Ingo Molnar
       [not found] ` <1432116013-25902-7-git-send-email-jiang.liu@linux.intel.com>
  10 siblings, 1 reply; 24+ messages in thread
From: Jiang Liu @ 2015-05-20 10:00 UTC (permalink / raw)
  To: linux-arm-kernel

Now most IRQ flow handlers make no use of the first parameter 'irq'.
And for those who do make use of 'irq', we could easily get the irq
number through irq_desc->irq_data->irq. So kill the first parameter
'irq' of irq_flow_handler_t.

To ease review, I have split the changes into several parts, though
they should be merge as one to support bisecting.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
---
 drivers/dma/ipu/ipu_irq.c       |    6 ++++--
 drivers/gpu/ipu-v3/ipu-common.c |    4 ++--
 drivers/pci/host/pci-keystone.c |    7 ++++---
 drivers/spmi/spmi-pmic-arb.c    |    2 +-
 4 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/drivers/dma/ipu/ipu_irq.c b/drivers/dma/ipu/ipu_irq.c
index 0e12af37fe2f..edd12278dc3e 100644
--- a/drivers/dma/ipu/ipu_irq.c
+++ b/drivers/dma/ipu/ipu_irq.c
@@ -266,8 +266,9 @@ int ipu_irq_unmap(unsigned int source)
 }
 
 /* Chained IRQ handler for IPU error interrupt */
-static void ipu_irq_err(unsigned int irq, struct irq_desc *desc)
+static void ipu_irq_err(struct irq_desc *desc)
 {
+	unsigned int irq = irq_desc_to_irq(desc);
 	struct ipu *ipu = irq_desc_get_handler_data(desc);
 	u32 status;
 	int i, line;
@@ -307,8 +308,9 @@ static void ipu_irq_err(unsigned int irq, struct irq_desc *desc)
 }
 
 /* Chained IRQ handler for IPU function interrupt */
-static void ipu_irq_fn(unsigned int irq, struct irq_desc *desc)
+static void ipu_irq_fn(struct irq_desc *desc)
 {
+	unsigned int irq = irq_desc_to_irq(desc);
 	struct ipu *ipu = irq_desc_get_handler_data(desc);
 	u32 status;
 	int i, line;
diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c
index 7022825b7a2c..1125b03c36af 100644
--- a/drivers/gpu/ipu-v3/ipu-common.c
+++ b/drivers/gpu/ipu-v3/ipu-common.c
@@ -912,7 +912,7 @@ static void ipu_irq_handle(struct ipu_soc *ipu, const int *regs, int num_regs)
 	}
 }
 
-static void ipu_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void ipu_irq_handler(struct irq_desc *desc)
 {
 	struct ipu_soc *ipu = irq_desc_get_handler_data(desc);
 	struct irq_chip *chip = irq_desc_get_chip(desc);
@@ -925,7 +925,7 @@ static void ipu_irq_handler(unsigned int irq, struct irq_desc *desc)
 	chained_irq_exit(chip, desc);
 }
 
-static void ipu_err_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void ipu_err_irq_handler(struct irq_desc *desc)
 {
 	struct ipu_soc *ipu = irq_desc_get_handler_data(desc);
 	struct irq_chip *chip = irq_desc_get_chip(desc);
diff --git a/drivers/pci/host/pci-keystone.c b/drivers/pci/host/pci-keystone.c
index 75333b0c4f0a..659a73da372c 100644
--- a/drivers/pci/host/pci-keystone.c
+++ b/drivers/pci/host/pci-keystone.c
@@ -112,8 +112,9 @@ static int ks_pcie_establish_link(struct keystone_pcie *ks_pcie)
 	return 0;
 }
 
-static void ks_pcie_msi_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void ks_pcie_msi_irq_handler(struct irq_desc *desc)
 {
+	unsigned int irq = irq_desc_to_irq(desc);
 	struct keystone_pcie *ks_pcie = irq_desc_get_handler_data(desc);
 	u32 offset = irq - ks_pcie->msi_host_irqs[0];
 	struct pcie_port *pp = &ks_pcie->pp;
@@ -133,14 +134,14 @@ static void ks_pcie_msi_irq_handler(unsigned int irq, struct irq_desc *desc)
 
 /**
  * ks_pcie_legacy_irq_handler() - Handle legacy interrupt
- * @irq: IRQ line for legacy interrupts
  * @desc: Pointer to irq descriptor
  *
  * Traverse through pending legacy interrupts and invoke handler for each. Also
  * takes care of interrupt controller level mask/ack operation.
  */
-static void ks_pcie_legacy_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void ks_pcie_legacy_irq_handler(struct irq_desc *desc)
 {
+	unsigned int irq = irq_desc_to_irq(desc);
 	struct keystone_pcie *ks_pcie = irq_desc_get_handler_data(desc);
 	struct pcie_port *pp = &ks_pcie->pp;
 	u32 irq_offset = irq - ks_pcie->legacy_host_irqs[0];
diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c
index b32cb0a813cb..d7e7846917ae 100644
--- a/drivers/spmi/spmi-pmic-arb.c
+++ b/drivers/spmi/spmi-pmic-arb.c
@@ -451,7 +451,7 @@ static void periph_interrupt(struct spmi_pmic_arb_dev *pa, u8 apid)
 	}
 }
 
-static void pmic_arb_chained_irq(unsigned int irq, struct irq_desc *desc)
+static void pmic_arb_chained_irq(struct irq_desc *desc)
 {
 	struct spmi_pmic_arb_dev *pa = irq_desc_get_handler_data(desc);
 	struct irq_chip *chip = irq_desc_get_chip(desc);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [RFC v1 00/25] Optimize irq flow handler
  2015-05-20  9:59 [RFC v1 00/25] Optimize irq flow handler Jiang Liu
                   ` (8 preceding siblings ...)
  2015-05-20 10:00 ` [RFC v1 25/25] " Jiang Liu
@ 2015-05-20 10:16 ` Ingo Molnar
  2015-05-20 10:23   ` Jiang Liu
       [not found] ` <1432116013-25902-7-git-send-email-jiang.liu@linux.intel.com>
  10 siblings, 1 reply; 24+ messages in thread
From: Ingo Molnar @ 2015-05-20 10:16 UTC (permalink / raw)
  To: linux-arm-kernel


* Jiang Liu <jiang.liu@linux.intel.com> wrote:

>   genirq: Kill the first parameter 'irq' of irq_flow_handler_t
>   genirq: Kill the first parameter 'irq' of irq_flow_handler_t
>   genirq: Kill the first parameter 'irq' of irq_flow_handler_t
>   genirq: Kill the first parameter 'irq' of irq_flow_handler_t
>   genirq: Kill the first parameter 'irq' of irq_flow_handler_t
>   genirq: Kill the first parameter 'irq' of irq_flow_handler_t
>   genirq: Kill the first parameter 'irq' of irq_flow_handler_t
>   genirq: Kill the first parameter 'irq' of irq_flow_handler_t
>   genirq: Kill the first parameter 'irq' of irq_flow_handler_t
>   genirq: Kill the first parameter 'irq' of irq_flow_handler_t
>   genirq: Kill the first parameter 'irq' of irq_flow_handler_t
>   genirq: Kill the first parameter 'irq' of irq_flow_handler_t

Those kinds of identical titles are not acceptable.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [RFC v1 00/25] Optimize irq flow handler
  2015-05-20 10:16 ` [RFC v1 00/25] Optimize irq flow handler Ingo Molnar
@ 2015-05-20 10:23   ` Jiang Liu
  0 siblings, 0 replies; 24+ messages in thread
From: Jiang Liu @ 2015-05-20 10:23 UTC (permalink / raw)
  To: linux-arm-kernel

On 2015/5/20 18:16, Ingo Molnar wrote:
> 
> * Jiang Liu <jiang.liu@linux.intel.com> wrote:
> 
>>   genirq: Kill the first parameter 'irq' of irq_flow_handler_t
>>   genirq: Kill the first parameter 'irq' of irq_flow_handler_t
>>   genirq: Kill the first parameter 'irq' of irq_flow_handler_t
>>   genirq: Kill the first parameter 'irq' of irq_flow_handler_t
>>   genirq: Kill the first parameter 'irq' of irq_flow_handler_t
>>   genirq: Kill the first parameter 'irq' of irq_flow_handler_t
>>   genirq: Kill the first parameter 'irq' of irq_flow_handler_t
>>   genirq: Kill the first parameter 'irq' of irq_flow_handler_t
>>   genirq: Kill the first parameter 'irq' of irq_flow_handler_t
>>   genirq: Kill the first parameter 'irq' of irq_flow_handler_t
>>   genirq: Kill the first parameter 'irq' of irq_flow_handler_t
>>   genirq: Kill the first parameter 'irq' of irq_flow_handler_t
> 
> Those kinds of identical titles are not acceptable.
Hi Ingo,
	Those patches with identical titles will be merged into one
when ready for merging, they are split for review only.
Thanks!
Gerry

> 
> Thanks,
> 
> 	Ingo
> 

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [RFC v1 15/25] genirq: Kill the first parameter 'irq' of irq_flow_handler_t
  2015-05-20 10:00 ` [RFC v1 15/25] genirq: Kill the first parameter 'irq' of irq_flow_handler_t Jiang Liu
@ 2015-05-20 15:28   ` Thomas Gleixner
  2015-05-20 15:32     ` Jiang Liu
  2015-05-20 15:38   ` Hans Ulli Kroll
  2015-05-20 18:54   ` Robert Jarzmik
  2 siblings, 1 reply; 24+ messages in thread
From: Thomas Gleixner @ 2015-05-20 15:28 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 20 May 2015, Jiang Liu wrote:
> -static void locomo_handler(unsigned int irq, struct irq_desc *desc)
> +static void locomo_handler(struct irq_desc *desc)
>  {
>  	struct locomo *lchip = irq_desc_get_chip_data(desc);
> +	unsigned int irq;
>  	int req, i;

That leaves irq unitialized ....

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [RFC v1 15/25] genirq: Kill the first parameter 'irq' of irq_flow_handler_t
  2015-05-20 15:28   ` Thomas Gleixner
@ 2015-05-20 15:32     ` Jiang Liu
  2015-05-20 15:48       ` Thomas Gleixner
  0 siblings, 1 reply; 24+ messages in thread
From: Jiang Liu @ 2015-05-20 15:32 UTC (permalink / raw)
  To: linux-arm-kernel

On 2015/5/20 23:28, Thomas Gleixner wrote:
> On Wed, 20 May 2015, Jiang Liu wrote:
>> -static void locomo_handler(unsigned int irq, struct irq_desc *desc)
>> +static void locomo_handler(struct irq_desc *desc)
>>  {
>>  	struct locomo *lchip = irq_desc_get_chip_data(desc);
>> +	unsigned int irq;
>>  	int req, i;
> 
> That leaves irq unitialized ....
That should be OK, 'irq' here is just a local variable.
Actually it may be changed as:
        if (req) {
                /* generate the next interrupt(s) */
-                irq = lchip->irq_base;
+                unsigned int irq = lchip->irq_base;
                for (i = 0; i <= 3; i++, irq++) {
                        if (req & (0x0100 << i)) {
                                generic_handle_irq(irq);
                        }

                }
        }

> 
> Thanks,
> 
> 	tglx
> 

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [RFC v1 15/25] genirq: Kill the first parameter 'irq' of irq_flow_handler_t
  2015-05-20 10:00 ` [RFC v1 15/25] genirq: Kill the first parameter 'irq' of irq_flow_handler_t Jiang Liu
  2015-05-20 15:28   ` Thomas Gleixner
@ 2015-05-20 15:38   ` Hans Ulli Kroll
  2015-05-20 18:54   ` Robert Jarzmik
  2 siblings, 0 replies; 24+ messages in thread
From: Hans Ulli Kroll @ 2015-05-20 15:38 UTC (permalink / raw)
  To: linux-arm-kernel



On Wed, 20 May 2015, Jiang Liu wrote:

> Now most IRQ flow handlers make no use of the first parameter 'irq'.
> And for those who do make use of 'irq', we could easily get the irq
> number through irq_desc->irq_data->irq. So kill the first parameter
> 'irq' of irq_flow_handler_t.
> 
> To ease review, I have split the changes into several parts, though
> they should be merge as one to support bisecting.
> 
> Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
> ---
>  arch/arm/common/it8152.c               |    2 +-
>  arch/arm/common/locomo.c               |    3 ++-
>  arch/arm/common/sa1111.c               |    4 ++--
>  arch/arm/include/asm/hardware/it8152.h |    2 +-
>  arch/arm/include/asm/mach/irq.h        |    4 ++--
>  arch/arm/mach-dove/irq.c               |    5 +++--
>  arch/arm/mach-footbridge/isa-irq.c     |    4 ++--
>  arch/arm/mach-gemini/gpio.c            |    2 +-
>  arch/arm/mach-imx/3ds_debugboard.c     |    2 +-
>  arch/arm/mach-imx/mach-mx31ads.c       |    2 +-
>  arch/arm/mach-iop13xx/msi.c            |    2 +-
>  arch/arm/mach-lpc32xx/irq.c            |    4 ++--
>  arch/arm/mach-omap1/fpga.c             |    2 +-
>  arch/arm/mach-omap2/prm_common.c       |    2 +-
>  arch/arm/mach-pxa/balloon3.c           |    3 ++-
>  arch/arm/mach-pxa/cm-x2xx-pci.c        |    4 ++--
>  arch/arm/mach-pxa/lpd270.c             |    3 ++-
>  arch/arm/mach-pxa/pcm990-baseboard.c   |    1 +
>  arch/arm/mach-pxa/viper.c              |    3 ++-
>  arch/arm/mach-pxa/zeus.c               |    3 ++-
>  arch/arm/mach-rpc/ecard.c              |    2 +-
>  arch/arm/mach-s3c64xx/common.c         |    8 ++++----
>  arch/arm/mach-sa1100/neponset.c        |    2 +-
>  arch/arm/plat-orion/gpio.c             |    2 +-
>  24 files changed, 39 insertions(+), 32 deletions(-)
> 
> diff --git a/arch/arm/common/it8152.c b/arch/arm/common/it8152.c
> index 5114b68e99d5..aaa206181f92 100644
> --- a/arch/arm/common/it8152.c
> +++ b/arch/arm/common/it8152.c
> @@ -95,7 +95,7 @@ void it8152_init_irq(void)
>  	}
>  }
>  
> -void it8152_irq_demux(unsigned int irq, struct irq_desc *desc)
> +void it8152_irq_demux(struct irq_desc *desc)
>  {
>         int bits_pd, bits_lp, bits_ld;
>         int i;
> diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
> index 02af4a07ceca..99d4535d7cc6 100644
> --- a/arch/arm/common/locomo.c
> +++ b/arch/arm/common/locomo.c
> @@ -138,9 +138,10 @@ static struct locomo_dev_info locomo_devices[] = {
>  	},
>  };
>  
> -static void locomo_handler(unsigned int irq, struct irq_desc *desc)
> +static void locomo_handler(struct irq_desc *desc)
>  {
>  	struct locomo *lchip = irq_desc_get_chip_data(desc);
> +	unsigned int irq;
>  	int req, i;
>  
>  	/* Acknowledge the parent IRQ */
> diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
> index 0d0844fa54c2..762dfe7081f0 100644
> --- a/arch/arm/common/sa1111.c
> +++ b/arch/arm/common/sa1111.c
> @@ -197,7 +197,7 @@ static struct sa1111_dev_info sa1111_devices[] = {
>   * will call us again if there are more interrupts to process.
>   */
>  static void
> -sa1111_irq_handler(unsigned int irq, struct irq_desc *desc)
> +sa1111_irq_handler(struct irq_desc *desc)
>  {
>  	unsigned int stat0, stat1, i;
>  	struct sa1111 *sachip = irq_desc_get_handler_data(desc);
> @@ -213,7 +213,7 @@ sa1111_irq_handler(unsigned int irq, struct irq_desc *desc)
>  	sa1111_writel(stat1, mapbase + SA1111_INTSTATCLR1);
>  
>  	if (stat0 == 0 && stat1 == 0) {
> -		do_bad_IRQ(irq, desc);
> +		do_bad_IRQ(desc);
>  		return;
>  	}
>  
> diff --git a/arch/arm/include/asm/hardware/it8152.h b/arch/arm/include/asm/hardware/it8152.h
> index d36a73d7c0e8..076777ff3daa 100644
> --- a/arch/arm/include/asm/hardware/it8152.h
> +++ b/arch/arm/include/asm/hardware/it8152.h
> @@ -106,7 +106,7 @@ extern void __iomem *it8152_base_address;
>  struct pci_dev;
>  struct pci_sys_data;
>  
> -extern void it8152_irq_demux(unsigned int irq, struct irq_desc *desc);
> +extern void it8152_irq_demux(struct irq_desc *desc);
>  extern void it8152_init_irq(void);
>  extern int it8152_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin);
>  extern int it8152_pci_setup(int nr, struct pci_sys_data *sys);
> diff --git a/arch/arm/include/asm/mach/irq.h b/arch/arm/include/asm/mach/irq.h
> index 2092ee1e1300..4703e00283db 100644
> --- a/arch/arm/include/asm/mach/irq.h
> +++ b/arch/arm/include/asm/mach/irq.h
> @@ -23,10 +23,10 @@ extern int show_fiq_list(struct seq_file *, int);
>  /*
>   * This is for easy migration, but should be changed in the source
>   */
> -#define do_bad_IRQ(irq,desc)				\
> +#define do_bad_IRQ(desc)				\
>  do {							\
>  	raw_spin_lock(&desc->lock);			\
> -	handle_bad_irq(irq, desc);			\
> +	handle_bad_irq(desc);			\
>  	raw_spin_unlock(&desc->lock);			\
>  } while(0)
>  
> diff --git a/arch/arm/mach-dove/irq.c b/arch/arm/mach-dove/irq.c
> index 4a5a7aedcb76..30140cbdb249 100644
> --- a/arch/arm/mach-dove/irq.c
> +++ b/arch/arm/mach-dove/irq.c
> @@ -69,13 +69,14 @@ static struct irq_chip pmu_irq_chip = {
>  	.irq_ack	= pmu_irq_ack,
>  };
>  
> -static void pmu_irq_handler(unsigned int irq, struct irq_desc *desc)
> +static void pmu_irq_handler(struct irq_desc *desc)
>  {
>  	unsigned long cause = readl(PMU_INTERRUPT_CAUSE);
> +	unsigned int irq;
>  
>  	cause &= readl(PMU_INTERRUPT_MASK);
>  	if (cause == 0) {
> -		do_bad_IRQ(irq, desc);
> +		do_bad_IRQ(desc);
>  		return;
>  	}
>  
> diff --git a/arch/arm/mach-footbridge/isa-irq.c b/arch/arm/mach-footbridge/isa-irq.c
> index c3a0abbc9049..f78e46662447 100644
> --- a/arch/arm/mach-footbridge/isa-irq.c
> +++ b/arch/arm/mach-footbridge/isa-irq.c
> @@ -88,12 +88,12 @@ static struct irq_chip isa_hi_chip = {
>  };
>  
>  static void
> -isa_irq_handler(unsigned int irq, struct irq_desc *desc)
> +isa_irq_handler(struct irq_desc *desc)
>  {
>  	unsigned int isa_irq = *(unsigned char *)PCIIACK_BASE;
>  
>  	if (isa_irq < _ISA_IRQ(0) || isa_irq >= _ISA_IRQ(16)) {
> -		do_bad_IRQ(isa_irq, desc);
> +		do_bad_IRQ(desc);
>  		return;
>  	}
>  
> diff --git a/arch/arm/mach-gemini/gpio.c b/arch/arm/mach-gemini/gpio.c
> index f8cb5710d6ee..713f655bcc74 100644
> --- a/arch/arm/mach-gemini/gpio.c
> +++ b/arch/arm/mach-gemini/gpio.c
> @@ -126,7 +126,7 @@ static int gpio_set_irq_type(struct irq_data *d, unsigned int type)
>  	return 0;
>  }
>  
> -static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
> +static void gpio_irq_handler(struct irq_desc *desc)
>  {
>  	unsigned int port = (unsigned int)irq_desc_get_handler_data(desc);
>  	unsigned int gpio_irq_no, irq_stat;
> diff --git a/arch/arm/mach-imx/3ds_debugboard.c b/arch/arm/mach-imx/3ds_debugboard.c
> index 134377352966..d93d3337b579 100644
> --- a/arch/arm/mach-imx/3ds_debugboard.c
> +++ b/arch/arm/mach-imx/3ds_debugboard.c
> @@ -85,7 +85,7 @@ static struct platform_device smsc_lan9217_device = {
>  	.resource = smsc911x_resources,
>  };
>  
> -static void mxc_expio_irq_handler(u32 irq, struct irq_desc *desc)
> +static void mxc_expio_irq_handler(struct irq_desc *desc)
>  {
>  	u32 imr_val;
>  	u32 int_valid;
> diff --git a/arch/arm/mach-imx/mach-mx31ads.c b/arch/arm/mach-imx/mach-mx31ads.c
> index d08c37c696f6..07aef418a0e1 100644
> --- a/arch/arm/mach-imx/mach-mx31ads.c
> +++ b/arch/arm/mach-imx/mach-mx31ads.c
> @@ -154,7 +154,7 @@ static inline void mxc_init_imx_uart(void)
>  	imx31_add_imx_uart0(&uart_pdata);
>  }
>  
> -static void mx31ads_expio_irq_handler(u32 irq, struct irq_desc *desc)
> +static void mx31ads_expio_irq_handler(struct irq_desc *desc)
>  {
>  	u32 imr_val;
>  	u32 int_valid;
> diff --git a/arch/arm/mach-iop13xx/msi.c b/arch/arm/mach-iop13xx/msi.c
> index 9f89e76dfbb9..f6235b28578c 100644
> --- a/arch/arm/mach-iop13xx/msi.c
> +++ b/arch/arm/mach-iop13xx/msi.c
> @@ -91,7 +91,7 @@ static void (*write_imipr[])(u32) = {
>  	write_imipr_3,
>  };
>  
> -static void iop13xx_msi_handler(unsigned int irq, struct irq_desc *desc)
> +static void iop13xx_msi_handler(struct irq_desc *desc)
>  {
>  	int i, j;
>  	unsigned long status;
> diff --git a/arch/arm/mach-lpc32xx/irq.c b/arch/arm/mach-lpc32xx/irq.c
> index 9ecb8f9c4ef5..f361fed99105 100644
> --- a/arch/arm/mach-lpc32xx/irq.c
> +++ b/arch/arm/mach-lpc32xx/irq.c
> @@ -370,7 +370,7 @@ static struct irq_chip lpc32xx_irq_chip = {
>  	.irq_set_wake = lpc32xx_irq_wake
>  };
>  
> -static void lpc32xx_sic1_handler(unsigned int irq, struct irq_desc *desc)
> +static void lpc32xx_sic1_handler(struct irq_desc *desc)
>  {
>  	unsigned long ints = __raw_readl(LPC32XX_INTC_STAT(LPC32XX_SIC1_BASE));
>  
> @@ -383,7 +383,7 @@ static void lpc32xx_sic1_handler(unsigned int irq, struct irq_desc *desc)
>  	}
>  }
>  
> -static void lpc32xx_sic2_handler(unsigned int irq, struct irq_desc *desc)
> +static void lpc32xx_sic2_handler(struct irq_desc *desc)
>  {
>  	unsigned long ints = __raw_readl(LPC32XX_INTC_STAT(LPC32XX_SIC2_BASE));
>  
> diff --git a/arch/arm/mach-omap1/fpga.c b/arch/arm/mach-omap1/fpga.c
> index 3c0e42219200..374bccf5ce24 100644
> --- a/arch/arm/mach-omap1/fpga.c
> +++ b/arch/arm/mach-omap1/fpga.c
> @@ -87,7 +87,7 @@ static void fpga_mask_ack_irq(struct irq_data *d)
>  	fpga_ack_irq(d);
>  }
>  
> -static void innovator_fpga_IRQ_demux(unsigned int irq, struct irq_desc *desc)
> +static void innovator_fpga_IRQ_demux(struct irq_desc *desc)
>  {
>  	u32 stat;
>  	int fpga_irq;
> diff --git a/arch/arm/mach-omap2/prm_common.c b/arch/arm/mach-omap2/prm_common.c
> index 7add7994dbfc..6cfc1e54d41f 100644
> --- a/arch/arm/mach-omap2/prm_common.c
> +++ b/arch/arm/mach-omap2/prm_common.c
> @@ -102,7 +102,7 @@ static void omap_prcm_events_filter_priority(unsigned long *events,
>   * dispatched accordingly. Clearing of the wakeup events should be
>   * done by the SoC specific individual handlers.
>   */
> -static void omap_prcm_irq_handler(unsigned int irq, struct irq_desc *desc)
> +static void omap_prcm_irq_handler(struct irq_desc *desc)
>  {
>  	unsigned long pending[OMAP_PRCM_MAX_NR_PENDING_REG];
>  	unsigned long priority_pending[OMAP_PRCM_MAX_NR_PENDING_REG];
> diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c
> index d897292712eb..506365cdd58b 100644
> --- a/arch/arm/mach-pxa/balloon3.c
> +++ b/arch/arm/mach-pxa/balloon3.c
> @@ -496,8 +496,9 @@ static struct irq_chip balloon3_irq_chip = {
>  	.irq_unmask	= balloon3_unmask_irq,
>  };
>  
> -static void balloon3_irq_handler(unsigned int irq, struct irq_desc *desc)
> +static void balloon3_irq_handler(struct irq_desc *desc)
>  {
> +	unsigned int irq;
>  	unsigned long pending = __raw_readl(BALLOON3_INT_CONTROL_REG) &
>  					balloon3_irq_enabled;
>  	do {
> diff --git a/arch/arm/mach-pxa/cm-x2xx-pci.c b/arch/arm/mach-pxa/cm-x2xx-pci.c
> index d8f816c24a2f..3221ae15bef7 100644
> --- a/arch/arm/mach-pxa/cm-x2xx-pci.c
> +++ b/arch/arm/mach-pxa/cm-x2xx-pci.c
> @@ -29,12 +29,12 @@
>  void __iomem *it8152_base_address;
>  static int cmx2xx_it8152_irq_gpio;
>  
> -static void cmx2xx_it8152_irq_demux(unsigned int irq, struct irq_desc *desc)
> +static void cmx2xx_it8152_irq_demux(struct irq_desc *desc)
>  {
>  	/* clear our parent irq */
>  	desc->irq_data.chip->irq_ack(&desc->irq_data);
>  
> -	it8152_irq_demux(irq, desc);
> +	it8152_irq_demux(desc);
>  }
>  
>  void __cmx2xx_pci_init_irq(int irq_gpio)
> diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c
> index eaee2c20b189..cbf00f51808f 100644
> --- a/arch/arm/mach-pxa/lpd270.c
> +++ b/arch/arm/mach-pxa/lpd270.c
> @@ -120,9 +120,10 @@ static struct irq_chip lpd270_irq_chip = {
>  	.irq_unmask	= lpd270_unmask_irq,
>  };
>  
> -static void lpd270_irq_handler(unsigned int irq, struct irq_desc *desc)
> +static void lpd270_irq_handler(struct irq_desc *desc)
>  {
>  	unsigned long pending;
> +	unsigned int irq;
>  
>  	pending = __raw_readw(LPD270_INT_STATUS) & lpd270_irq_enabled;
>  	do {
> diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c
> index 2897da2a5df6..0d8331f8536e 100644
> --- a/arch/arm/mach-pxa/pcm990-baseboard.c
> +++ b/arch/arm/mach-pxa/pcm990-baseboard.c
> @@ -287,6 +287,7 @@ static struct irq_chip pcm990_irq_chip = {
>  static void pcm990_irq_handler(unsigned int irq, struct irq_desc *desc)
>  {
>  	unsigned long pending;
> +	unsigned int irq;
>  
>  	pending = ~pcm990_cpld_readb(PCM990_CTRL_INTSETCLR);
>  	pending &= pcm990_irq_enabled;
> diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c
> index de3b08073fe7..bd52fb914d6a 100644
> --- a/arch/arm/mach-pxa/viper.c
> +++ b/arch/arm/mach-pxa/viper.c
> @@ -276,9 +276,10 @@ static inline unsigned long viper_irq_pending(void)
>  			viper_irq_enabled_mask;
>  }
>  
> -static void viper_irq_handler(unsigned int irq, struct irq_desc *desc)
> +static void viper_irq_handler(struct irq_desc *desc)
>  {
>  	unsigned long pending;
> +	unsigned int irq;
>  
>  	pending = viper_irq_pending();
>  	do {
> diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c
> index ac2ae5c71ab4..7ffff0b424c2 100644
> --- a/arch/arm/mach-pxa/zeus.c
> +++ b/arch/arm/mach-pxa/zeus.c
> @@ -105,9 +105,10 @@ static inline unsigned long zeus_irq_pending(void)
>  	return __raw_readw(ZEUS_CPLD_ISA_IRQ) & zeus_irq_enabled_mask;
>  }
>  
> -static void zeus_irq_handler(unsigned int irq, struct irq_desc *desc)
> +static void zeus_irq_handler(struct irq_desc *desc)
>  {
>  	unsigned long pending;
> +	unsigned int irq;
>  
>  	pending = zeus_irq_pending();
>  	do {
> diff --git a/arch/arm/mach-rpc/ecard.c b/arch/arm/mach-rpc/ecard.c
> index fcb1d59f7aec..b7074cd5ebfd 100644
> --- a/arch/arm/mach-rpc/ecard.c
> +++ b/arch/arm/mach-rpc/ecard.c
> @@ -552,7 +552,7 @@ static void ecard_check_lockup(struct irq_desc *desc)
>  }
>  
>  static void
> -ecard_irq_handler(unsigned int irq, struct irq_desc *desc)
> +ecard_irq_handler(struct irq_desc *desc)
>  {
>  	ecard_t *ec;
>  	int called = 0;
> diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c
> index 16547f2641a3..5c9ca33f61e5 100644
> --- a/arch/arm/mach-s3c64xx/common.c
> +++ b/arch/arm/mach-s3c64xx/common.c
> @@ -389,22 +389,22 @@ static inline void s3c_irq_demux_eint(unsigned int start, unsigned int end)
>  	}
>  }
>  
> -static void s3c_irq_demux_eint0_3(unsigned int irq, struct irq_desc *desc)
> +static void s3c_irq_demux_eint0_3(struct irq_desc *desc)
>  {
>  	s3c_irq_demux_eint(0, 3);
>  }
>  
> -static void s3c_irq_demux_eint4_11(unsigned int irq, struct irq_desc *desc)
> +static void s3c_irq_demux_eint4_11(struct irq_desc *desc)
>  {
>  	s3c_irq_demux_eint(4, 11);
>  }
>  
> -static void s3c_irq_demux_eint12_19(unsigned int irq, struct irq_desc *desc)
> +static void s3c_irq_demux_eint12_19(struct irq_desc *desc)
>  {
>  	s3c_irq_demux_eint(12, 19);
>  }
>  
> -static void s3c_irq_demux_eint20_27(unsigned int irq, struct irq_desc *desc)
> +static void s3c_irq_demux_eint20_27(struct irq_desc *desc)
>  {
>  	s3c_irq_demux_eint(20, 27);
>  }
> diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c
> index af868d258e66..cc73c885d6a1 100644
> --- a/arch/arm/mach-sa1100/neponset.c
> +++ b/arch/arm/mach-sa1100/neponset.c
> @@ -166,7 +166,7 @@ static struct sa1100_port_fns neponset_port_fns = {
>   * ensure that the IRQ signal is deasserted before returning.  This
>   * is rather unfortunate.
>   */
> -static void neponset_irq_handler(unsigned int irq, struct irq_desc *desc)
> +static void neponset_irq_handler(struct irq_desc *desc)
>  {
>  	struct neponset_drvdata *d = irq_desc_get_handler_data(desc);
>  	unsigned int irr;
> diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c
> index caba04340619..dc91cfa5483f 100644
> --- a/arch/arm/plat-orion/gpio.c
> +++ b/arch/arm/plat-orion/gpio.c
> @@ -407,7 +407,7 @@ static int gpio_irq_set_type(struct irq_data *d, u32 type)
>  	return 0;
>  }
>  
> -static void gpio_irq_handler(unsigned irq, struct irq_desc *desc)
> +static void gpio_irq_handler(struct irq_desc *desc)
>  {
>  	struct orion_gpio_chip *ochip = irq_desc_get_handler_data(desc);
>  	u32 cause, type;
> -- 
> 1.7.10.4
> 
> 

for the mach-gemini part

Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [RFC v1 25/25] genirq: Kill the first parameter 'irq' of irq_flow_handler_t
  2015-05-20 10:00 ` [RFC v1 25/25] " Jiang Liu
@ 2015-05-20 15:40   ` Thomas Gleixner
  2015-05-20 15:49     ` Jiang Liu
  0 siblings, 1 reply; 24+ messages in thread
From: Thomas Gleixner @ 2015-05-20 15:40 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 20 May 2015, Jiang Liu wrote:
>  /* Chained IRQ handler for IPU error interrupt */
> -static void ipu_irq_err(unsigned int irq, struct irq_desc *desc)
> +static void ipu_irq_err(struct irq_desc *desc)
>  {
> +	unsigned int irq = irq_desc_to_irq(desc);

Why initializing? It's overwritten in the loop.

>  /* Chained IRQ handler for IPU function interrupt */
> -static void ipu_irq_fn(unsigned int irq, struct irq_desc *desc)
> +static void ipu_irq_fn(struct irq_desc *desc)
>  {
> +	unsigned int irq = irq_desc_to_irq(desc);

Ditto.

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [RFC v1 15/25] genirq: Kill the first parameter 'irq' of irq_flow_handler_t
  2015-05-20 15:32     ` Jiang Liu
@ 2015-05-20 15:48       ` Thomas Gleixner
  0 siblings, 0 replies; 24+ messages in thread
From: Thomas Gleixner @ 2015-05-20 15:48 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 20 May 2015, Jiang Liu wrote:

> On 2015/5/20 23:28, Thomas Gleixner wrote:
> > On Wed, 20 May 2015, Jiang Liu wrote:
> >> -static void locomo_handler(unsigned int irq, struct irq_desc *desc)
> >> +static void locomo_handler(struct irq_desc *desc)
> >>  {
> >>  	struct locomo *lchip = irq_desc_get_chip_data(desc);
> >> +	unsigned int irq;
> >>  	int req, i;
> > 
> > That leaves irq unitialized ....
> That should be OK, 'irq' here is just a local variable.
> Actually it may be changed as:
>         if (req) {
>                 /* generate the next interrupt(s) */
> -                irq = lchip->irq_base;
> +                unsigned int irq = lchip->irq_base;

Indeed. 

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [RFC v1 25/25] genirq: Kill the first parameter 'irq' of irq_flow_handler_t
  2015-05-20 15:40   ` Thomas Gleixner
@ 2015-05-20 15:49     ` Jiang Liu
  2015-05-20 18:43       ` Thomas Gleixner
  0 siblings, 1 reply; 24+ messages in thread
From: Jiang Liu @ 2015-05-20 15:49 UTC (permalink / raw)
  To: linux-arm-kernel

On 2015/5/20 23:40, Thomas Gleixner wrote:
> On Wed, 20 May 2015, Jiang Liu wrote:
>>  /* Chained IRQ handler for IPU error interrupt */
>> -static void ipu_irq_err(unsigned int irq, struct irq_desc *desc)
>> +static void ipu_irq_err(struct irq_desc *desc)
>>  {
>> +	unsigned int irq = irq_desc_to_irq(desc);
> 
> Why initializing? It's overwritten in the loop.
Hi Thomas,

I'm not familiar with the hardware, but if src2map() returns 0
on the first call, we need to initialize irq. Otherwise
generic_handle_irq(irq) will use random value on the first call.
---------------------------------------------------------
                        map = src2map(32 * i + line);
                        if (map)
                                irq = map->irq;
---------------------------------------------------------
Thanks!
Gerry

> 
>>  /* Chained IRQ handler for IPU function interrupt */
>> -static void ipu_irq_fn(unsigned int irq, struct irq_desc *desc)
>> +static void ipu_irq_fn(struct irq_desc *desc)
>>  {
>> +	unsigned int irq = irq_desc_to_irq(desc);
> 
> Ditto.
> 
> Thanks,
> 
> 	tglx
> 

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [RFC v1 25/25] genirq: Kill the first parameter 'irq' of irq_flow_handler_t
  2015-05-20 15:49     ` Jiang Liu
@ 2015-05-20 18:43       ` Thomas Gleixner
  0 siblings, 0 replies; 24+ messages in thread
From: Thomas Gleixner @ 2015-05-20 18:43 UTC (permalink / raw)
  To: linux-arm-kernel



On Wed, 20 May 2015, Jiang Liu wrote:

> On 2015/5/20 23:40, Thomas Gleixner wrote:
> > On Wed, 20 May 2015, Jiang Liu wrote:
> >>  /* Chained IRQ handler for IPU error interrupt */
> >> -static void ipu_irq_err(unsigned int irq, struct irq_desc *desc)
> >> +static void ipu_irq_err(struct irq_desc *desc)
> >>  {
> >> +	unsigned int irq = irq_desc_to_irq(desc);
> > 
> > Why initializing? It's overwritten in the loop.
> Hi Thomas,
> 
> I'm not familiar with the hardware, but if src2map() returns 0
> on the first call, we need to initialize irq. Otherwise
> generic_handle_irq(irq) will use random value on the first call.
> ---------------------------------------------------------
>                         map = src2map(32 * i + line);
>                         if (map)
>                                 irq = map->irq;

You omitted the following code:

                        raw_spin_unlock(&bank_lock);

                        if (!map) {
                                pr_err("IPU: Interrupt on unmapped source %u bank %d\n",
                                       line, i);
                                continue;
			}

So you it does not use irq if map is 0.

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [RFC v1 15/25] genirq: Kill the first parameter 'irq' of irq_flow_handler_t
  2015-05-20 10:00 ` [RFC v1 15/25] genirq: Kill the first parameter 'irq' of irq_flow_handler_t Jiang Liu
  2015-05-20 15:28   ` Thomas Gleixner
  2015-05-20 15:38   ` Hans Ulli Kroll
@ 2015-05-20 18:54   ` Robert Jarzmik
  2 siblings, 0 replies; 24+ messages in thread
From: Robert Jarzmik @ 2015-05-20 18:54 UTC (permalink / raw)
  To: linux-arm-kernel

Jiang Liu <jiang.liu@linux.intel.com> writes:

> diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c
> index 2897da2a5df6..0d8331f8536e 100644
> --- a/arch/arm/mach-pxa/pcm990-baseboard.c
> +++ b/arch/arm/mach-pxa/pcm990-baseboard.c
> @@ -287,6 +287,7 @@ static struct irq_chip pcm990_irq_chip = {
>  static void pcm990_irq_handler(unsigned int irq, struct irq_desc *desc)
>  {
>  	unsigned long pending;
> +	unsigned int irq;
That doesn't look good, double irq definition.

Cheers.

-- 
Robert

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [RFC v1 01/25] ARM, irq: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc
  2015-05-20  9:59 ` [RFC v1 01/25] ARM, irq: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc Jiang Liu
@ 2015-05-20 19:35   ` Russell King - ARM Linux
  0 siblings, 0 replies; 24+ messages in thread
From: Russell King - ARM Linux @ 2015-05-20 19:35 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, May 20, 2015 at 05:59:49PM +0800, Jiang Liu wrote:
> diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
> index 5cc779c8e9c6..0d0844fa54c2 100644
> --- a/arch/arm/common/sa1111.c
> +++ b/arch/arm/common/sa1111.c
> @@ -200,7 +200,7 @@ static void
>  sa1111_irq_handler(unsigned int irq, struct irq_desc *desc)
>  {
>  	unsigned int stat0, stat1, i;
> -	struct sa1111 *sachip = irq_get_handler_data(irq);
> +	struct sa1111 *sachip = irq_desc_get_handler_data(desc);
>  	void __iomem *mapbase = sachip->base + SA1111_INTC;
>  
>  	stat0 = sa1111_readl(mapbase + SA1111_INTSTATCLR0);

For this one only,

Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>

Other maintainers are responsible for the others...

Thanks.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [RFC v1 05/25] gpio: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc
  2015-05-20  9:59 ` [RFC v1 05/25] gpio: " Jiang Liu
@ 2015-06-01 12:45   ` Linus Walleij
  2015-06-01 13:48     ` Jiang Liu
  0 siblings, 1 reply; 24+ messages in thread
From: Linus Walleij @ 2015-06-01 12:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, May 20, 2015 at 11:59 AM, Jiang Liu <jiang.liu@linux.intel.com> wrote:

> Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
> already have a pointer to corresponding irq_desc.
>
> Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Are there dependencies on this patch or can I just apply it
directly to the GPIO tree?

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [RFC v1 06/25] pinctrl: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc
       [not found] ` <1432116013-25902-7-git-send-email-jiang.liu@linux.intel.com>
@ 2015-06-01 12:46   ` Linus Walleij
  0 siblings, 0 replies; 24+ messages in thread
From: Linus Walleij @ 2015-06-01 12:46 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, May 20, 2015 at 11:59 AM, Jiang Liu <jiang.liu@linux.intel.com> wrote:

> Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
> already have a pointer to corresponding irq_desc.
>
> Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Are there dependencies on this patch or can I just apply it
directly to the GPIO tree?

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [RFC v1 05/25] gpio: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc
  2015-06-01 12:45   ` Linus Walleij
@ 2015-06-01 13:48     ` Jiang Liu
  0 siblings, 0 replies; 24+ messages in thread
From: Jiang Liu @ 2015-06-01 13:48 UTC (permalink / raw)
  To: linux-arm-kernel

On 2015/6/1 20:45, Linus Walleij wrote:
> On Wed, May 20, 2015 at 11:59 AM, Jiang Liu <jiang.liu@linux.intel.com> wrote:
> 
>> Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
>> already have a pointer to corresponding irq_desc.
>>
>> Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
> 
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
> 
> Are there dependencies on this patch or can I just apply it
> directly to the GPIO tree?
Hi Linus,
	Thanks for review.
	There's a very long dependency list of this patch set,
so it would be safer to merge this patch set altogether through
the irq tree if that works:)
Thanks!
Gerry

> 
> Yours,
> Linus Walleij
> 

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2015-06-01 13:48 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-20  9:59 [RFC v1 00/25] Optimize irq flow handler Jiang Liu
2015-05-20  9:59 ` [RFC v1 01/25] ARM, irq: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc Jiang Liu
2015-05-20 19:35   ` Russell King - ARM Linux
2015-05-20  9:59 ` [RFC v1 05/25] gpio: " Jiang Liu
2015-06-01 12:45   ` Linus Walleij
2015-06-01 13:48     ` Jiang Liu
2015-05-20  9:59 ` [RFC v1 07/25] irqchip: " Jiang Liu
2015-05-20  9:59 ` [RFC v1 11/25] keystone, irq: Use irq_data_get_xxx() to avoid redundant lookup of irq_data Jiang Liu
2015-05-20 10:00 ` [RFC v1 15/25] genirq: Kill the first parameter 'irq' of irq_flow_handler_t Jiang Liu
2015-05-20 15:28   ` Thomas Gleixner
2015-05-20 15:32     ` Jiang Liu
2015-05-20 15:48       ` Thomas Gleixner
2015-05-20 15:38   ` Hans Ulli Kroll
2015-05-20 18:54   ` Robert Jarzmik
2015-05-20 10:00 ` [RFC v1 16/25] " Jiang Liu
2015-05-20 10:00 ` [RFC v1 22/25] " Jiang Liu
2015-05-20 10:00 ` [RFC v1 23/25] " Jiang Liu
2015-05-20 10:00 ` [RFC v1 25/25] " Jiang Liu
2015-05-20 15:40   ` Thomas Gleixner
2015-05-20 15:49     ` Jiang Liu
2015-05-20 18:43       ` Thomas Gleixner
2015-05-20 10:16 ` [RFC v1 00/25] Optimize irq flow handler Ingo Molnar
2015-05-20 10:23   ` Jiang Liu
     [not found] ` <1432116013-25902-7-git-send-email-jiang.liu@linux.intel.com>
2015-06-01 12:46   ` [RFC v1 06/25] pinctrl: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).