All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/15] Kill off set_irq_flags
@ 2015-06-09 18:26 ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: Russell King, linux-arm-kernel
  Cc: linux-kernel, arm, Rob Herring, Catalin Marinas, Will Deacon,
	Greg Kroah-Hartman, Jiri Slaby, Barry Song, Simon Horman,
	Magnus Damm, Tomasz Figa, Thomas Abraham, Bjorn Helgaas,
	Samuel Ortiz, Lee Jones, Linus Walleij, Roger Quadros,
	Tony Lindgren, Thomas Gleixner, Jason Cooper, David Airlie,
	Alexandre Courbot, Dan Williams, Vinod Koul, Mike Turquette,
	Stephen Boyd, Mark Brown

This series converts all users of ARM specific set_irq_flags to use
common genirq functions. In many cases where irqdomains are used, the
set_irq_flags calls were redundant, so I've removed them.

This is not intended for 4.2, but if any subsystem maintainers want to
pick up their subsystem's change that is fine. All but the last 2
patches stand on their own. Any new drivers going into 4.2 may need a
similar change, but I'm sure people are told not to use set_irq_flags in
reviews. ;)

Rob


Rob Herring (15):
  ARM: kill off set_irq_flags usage
  regmap: kill off set_irq_flags usage
  clk: kill off set_irq_flags usage
  dma: kill off set_irq_flags usage
  gpio: kill off set_irq_flags usage
  gpu/drm: kill off set_irq_flags usage
  irqchip: kill off set_irq_flags usage
  memory: kill off set_irq_flags usage
  mfd: kill off set_irq_flags usage
  PCI: kill off set_irq_flags usage
  pinctrl: kill off set_irq_flags usage
  SH: kill off set_irq_flags usage
  tty/serial: kill off set_irq_flags usage
  ARM: remove ununsed set_irq_flags
  arm64: remove ununsed set_irq_flags

 arch/arm/common/it8152.c                      |  2 +-
 arch/arm/common/locomo.c                      |  2 +-
 arch/arm/common/sa1111.c                      |  4 ++--
 arch/arm/include/asm/hw_irq.h                 |  6 ------
 arch/arm/kernel/irq.c                         | 20 --------------------
 arch/arm/mach-davinci/cp_intc.c               |  2 +-
 arch/arm/mach-dove/irq.c                      |  2 +-
 arch/arm/mach-ebsa110/core.c                  |  2 +-
 arch/arm/mach-footbridge/common.c             |  2 +-
 arch/arm/mach-footbridge/isa-irq.c            |  8 ++++----
 arch/arm/mach-gemini/gpio.c                   |  2 +-
 arch/arm/mach-gemini/irq.c                    |  2 +-
 arch/arm/mach-imx/3ds_debugboard.c            |  2 +-
 arch/arm/mach-imx/mach-mx31ads.c              |  2 +-
 arch/arm/mach-iop13xx/irq.c                   |  2 +-
 arch/arm/mach-iop32x/irq.c                    |  2 +-
 arch/arm/mach-iop33x/irq.c                    |  2 +-
 arch/arm/mach-ixp4xx/common.c                 |  2 +-
 arch/arm/mach-ks8695/irq.c                    |  2 +-
 arch/arm/mach-lpc32xx/irq.c                   |  2 +-
 arch/arm/mach-netx/generic.c                  |  2 +-
 arch/arm/mach-omap1/fpga.c                    |  2 +-
 arch/arm/mach-omap1/irq.c                     |  2 +-
 arch/arm/mach-pxa/balloon3.c                  |  2 +-
 arch/arm/mach-pxa/irq.c                       |  1 -
 arch/arm/mach-pxa/lpd270.c                    |  2 +-
 arch/arm/mach-pxa/pcm990-baseboard.c          |  2 +-
 arch/arm/mach-pxa/pxa3xx.c                    |  2 +-
 arch/arm/mach-pxa/viper.c                     |  2 +-
 arch/arm/mach-pxa/zeus.c                      |  2 +-
 arch/arm/mach-rpc/ecard.c                     |  2 +-
 arch/arm/mach-rpc/irq.c                       | 16 ++++++++--------
 arch/arm/mach-s3c24xx/bast-irq.c              |  2 +-
 arch/arm/mach-s3c64xx/common.c                |  2 +-
 arch/arm/mach-sa1100/irq.c                    |  1 -
 arch/arm/mach-sa1100/neponset.c               |  4 ++--
 arch/arm/mach-w90x900/irq.c                   |  2 +-
 arch/arm64/include/asm/hardirq.h              |  5 -----
 drivers/base/regmap/regmap-irq.c              |  7 -------
 drivers/clk/at91/pmc.c                        |  1 -
 drivers/dma/ipu/ipu_irq.c                     |  8 ++------
 drivers/gpio/gpio-adp5588.c                   | 10 +---------
 drivers/gpio/gpio-bcm-kona.c                  | 15 ---------------
 drivers/gpio/gpio-davinci.c                   |  1 -
 drivers/gpio/gpio-em.c                        |  1 -
 drivers/gpio/gpio-ep93xx.c                    |  2 +-
 drivers/gpio/gpio-grgpio.c                    |  8 --------
 drivers/gpio/gpio-mcp23s08.c                  |  4 ----
 drivers/gpio/gpio-msm-v2.c                    |  1 -
 drivers/gpio/gpio-pxa.c                       |  8 ++++----
 drivers/gpio/gpio-sa1100.c                    |  2 +-
 drivers/gpio/gpio-sta2x11.c                   |  2 +-
 drivers/gpio/gpio-tegra.c                     |  1 -
 drivers/gpio/gpio-timberdale.c                |  4 +---
 drivers/gpio/gpiolib.c                        |  8 +-------
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c       |  1 -
 drivers/gpu/ipu-v3/ipu-common.c               |  3 +--
 drivers/irqchip/exynos-combiner.c             |  2 +-
 drivers/irqchip/irq-armada-370-xp.c           |  3 +--
 drivers/irqchip/irq-bcm2835.c                 |  2 +-
 drivers/irqchip/irq-clps711x.c                |  6 +++---
 drivers/irqchip/irq-gic-v3.c                  |  5 ++---
 drivers/irqchip/irq-gic.c                     |  4 ++--
 drivers/irqchip/irq-hip04.c                   |  4 ++--
 drivers/irqchip/irq-keystone.c                |  2 +-
 drivers/irqchip/irq-mmp.c                     |  3 ---
 drivers/irqchip/irq-mxs.c                     |  1 -
 drivers/irqchip/irq-renesas-intc-irqpin.c     |  1 -
 drivers/irqchip/irq-renesas-irqc.c            |  1 -
 drivers/irqchip/irq-s3c24xx.c                 | 14 ++------------
 drivers/irqchip/irq-sun4i.c                   |  2 +-
 drivers/irqchip/irq-versatile-fpga.c          |  2 +-
 drivers/irqchip/irq-vic.c                     |  2 +-
 drivers/irqchip/irq-vt8500.c                  |  1 -
 drivers/irqchip/spear-shirq.c                 |  1 -
 drivers/memory/omap-gpmc.c                    |  5 ++---
 drivers/mfd/88pm860x-core.c                   |  4 ----
 drivers/mfd/ab8500-core.c                     |  4 ----
 drivers/mfd/arizona-irq.c                     |  7 -------
 drivers/mfd/asic3.c                           |  4 ++--
 drivers/mfd/db8500-prcmu.c                    |  1 -
 drivers/mfd/ezx-pcap.c                        |  6 +-----
 drivers/mfd/htc-egpio.c                       |  4 ++--
 drivers/mfd/htc-i2cpld.c                      |  6 +-----
 drivers/mfd/lp8788-irq.c                      |  5 -----
 drivers/mfd/max8925-core.c                    |  5 +----
 drivers/mfd/max8997-irq.c                     |  5 +----
 drivers/mfd/max8998-irq.c                     |  5 +----
 drivers/mfd/mt6397-core.c                     |  4 ----
 drivers/mfd/pm8921-core.c                     |  5 +----
 drivers/mfd/rc5t583-irq.c                     |  4 +---
 drivers/mfd/stmpe.c                           |  7 -------
 drivers/mfd/t7l66xb.c                         |  6 ------
 drivers/mfd/tc3589x.c                         |  7 -------
 drivers/mfd/tc6393xb.c                        |  4 ++--
 drivers/mfd/tps6586x.c                        |  7 -------
 drivers/mfd/tps65912-irq.c                    |  8 +-------
 drivers/mfd/twl4030-irq.c                     | 11 +----------
 drivers/mfd/twl6030-irq.c                     | 13 -------------
 drivers/mfd/ucb1x00-core.c                    |  2 +-
 drivers/mfd/wm831x-irq.c                      |  7 -------
 drivers/mfd/wm8350-irq.c                      |  8 +-------
 drivers/mfd/wm8994-irq.c                      |  7 -------
 drivers/pci/host/pci-dra7xx.c                 |  1 -
 drivers/pci/host/pci-keystone-dw.c            |  2 --
 drivers/pci/host/pci-tegra.c                  |  1 -
 drivers/pci/host/pcie-designware.c            |  1 -
 drivers/pci/host/pcie-rcar.c                  |  1 -
 drivers/pci/host/pcie-xilinx.c                |  2 --
 drivers/pinctrl/bcm/pinctrl-bcm2835.c         |  1 -
 drivers/pinctrl/mediatek/pinctrl-mtk-common.c |  2 --
 drivers/pinctrl/pinctrl-single.c              |  5 -----
 drivers/pinctrl/samsung/pinctrl-exynos.c      |  1 -
 drivers/pinctrl/samsung/pinctrl-exynos5440.c  |  1 -
 drivers/pinctrl/samsung/pinctrl-s3c24xx.c     |  2 --
 drivers/pinctrl/samsung/pinctrl-s3c64xx.c     |  2 --
 drivers/sh/intc/internals.h                   | 10 +---------
 drivers/tty/serial/serial_ks8695.c            |  2 +-
 drivers/tty/serial/sirfsoc_uart.c             |  6 +++---
 119 files changed, 100 insertions(+), 367 deletions(-)

-- 
2.1.0


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

* [PATCH 00/15] Kill off set_irq_flags
@ 2015-06-09 18:26 ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: linux-arm-kernel

This series converts all users of ARM specific set_irq_flags to use
common genirq functions. In many cases where irqdomains are used, the
set_irq_flags calls were redundant, so I've removed them.

This is not intended for 4.2, but if any subsystem maintainers want to
pick up their subsystem's change that is fine. All but the last 2
patches stand on their own. Any new drivers going into 4.2 may need a
similar change, but I'm sure people are told not to use set_irq_flags in
reviews. ;)

Rob


Rob Herring (15):
  ARM: kill off set_irq_flags usage
  regmap: kill off set_irq_flags usage
  clk: kill off set_irq_flags usage
  dma: kill off set_irq_flags usage
  gpio: kill off set_irq_flags usage
  gpu/drm: kill off set_irq_flags usage
  irqchip: kill off set_irq_flags usage
  memory: kill off set_irq_flags usage
  mfd: kill off set_irq_flags usage
  PCI: kill off set_irq_flags usage
  pinctrl: kill off set_irq_flags usage
  SH: kill off set_irq_flags usage
  tty/serial: kill off set_irq_flags usage
  ARM: remove ununsed set_irq_flags
  arm64: remove ununsed set_irq_flags

 arch/arm/common/it8152.c                      |  2 +-
 arch/arm/common/locomo.c                      |  2 +-
 arch/arm/common/sa1111.c                      |  4 ++--
 arch/arm/include/asm/hw_irq.h                 |  6 ------
 arch/arm/kernel/irq.c                         | 20 --------------------
 arch/arm/mach-davinci/cp_intc.c               |  2 +-
 arch/arm/mach-dove/irq.c                      |  2 +-
 arch/arm/mach-ebsa110/core.c                  |  2 +-
 arch/arm/mach-footbridge/common.c             |  2 +-
 arch/arm/mach-footbridge/isa-irq.c            |  8 ++++----
 arch/arm/mach-gemini/gpio.c                   |  2 +-
 arch/arm/mach-gemini/irq.c                    |  2 +-
 arch/arm/mach-imx/3ds_debugboard.c            |  2 +-
 arch/arm/mach-imx/mach-mx31ads.c              |  2 +-
 arch/arm/mach-iop13xx/irq.c                   |  2 +-
 arch/arm/mach-iop32x/irq.c                    |  2 +-
 arch/arm/mach-iop33x/irq.c                    |  2 +-
 arch/arm/mach-ixp4xx/common.c                 |  2 +-
 arch/arm/mach-ks8695/irq.c                    |  2 +-
 arch/arm/mach-lpc32xx/irq.c                   |  2 +-
 arch/arm/mach-netx/generic.c                  |  2 +-
 arch/arm/mach-omap1/fpga.c                    |  2 +-
 arch/arm/mach-omap1/irq.c                     |  2 +-
 arch/arm/mach-pxa/balloon3.c                  |  2 +-
 arch/arm/mach-pxa/irq.c                       |  1 -
 arch/arm/mach-pxa/lpd270.c                    |  2 +-
 arch/arm/mach-pxa/pcm990-baseboard.c          |  2 +-
 arch/arm/mach-pxa/pxa3xx.c                    |  2 +-
 arch/arm/mach-pxa/viper.c                     |  2 +-
 arch/arm/mach-pxa/zeus.c                      |  2 +-
 arch/arm/mach-rpc/ecard.c                     |  2 +-
 arch/arm/mach-rpc/irq.c                       | 16 ++++++++--------
 arch/arm/mach-s3c24xx/bast-irq.c              |  2 +-
 arch/arm/mach-s3c64xx/common.c                |  2 +-
 arch/arm/mach-sa1100/irq.c                    |  1 -
 arch/arm/mach-sa1100/neponset.c               |  4 ++--
 arch/arm/mach-w90x900/irq.c                   |  2 +-
 arch/arm64/include/asm/hardirq.h              |  5 -----
 drivers/base/regmap/regmap-irq.c              |  7 -------
 drivers/clk/at91/pmc.c                        |  1 -
 drivers/dma/ipu/ipu_irq.c                     |  8 ++------
 drivers/gpio/gpio-adp5588.c                   | 10 +---------
 drivers/gpio/gpio-bcm-kona.c                  | 15 ---------------
 drivers/gpio/gpio-davinci.c                   |  1 -
 drivers/gpio/gpio-em.c                        |  1 -
 drivers/gpio/gpio-ep93xx.c                    |  2 +-
 drivers/gpio/gpio-grgpio.c                    |  8 --------
 drivers/gpio/gpio-mcp23s08.c                  |  4 ----
 drivers/gpio/gpio-msm-v2.c                    |  1 -
 drivers/gpio/gpio-pxa.c                       |  8 ++++----
 drivers/gpio/gpio-sa1100.c                    |  2 +-
 drivers/gpio/gpio-sta2x11.c                   |  2 +-
 drivers/gpio/gpio-tegra.c                     |  1 -
 drivers/gpio/gpio-timberdale.c                |  4 +---
 drivers/gpio/gpiolib.c                        |  8 +-------
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c       |  1 -
 drivers/gpu/ipu-v3/ipu-common.c               |  3 +--
 drivers/irqchip/exynos-combiner.c             |  2 +-
 drivers/irqchip/irq-armada-370-xp.c           |  3 +--
 drivers/irqchip/irq-bcm2835.c                 |  2 +-
 drivers/irqchip/irq-clps711x.c                |  6 +++---
 drivers/irqchip/irq-gic-v3.c                  |  5 ++---
 drivers/irqchip/irq-gic.c                     |  4 ++--
 drivers/irqchip/irq-hip04.c                   |  4 ++--
 drivers/irqchip/irq-keystone.c                |  2 +-
 drivers/irqchip/irq-mmp.c                     |  3 ---
 drivers/irqchip/irq-mxs.c                     |  1 -
 drivers/irqchip/irq-renesas-intc-irqpin.c     |  1 -
 drivers/irqchip/irq-renesas-irqc.c            |  1 -
 drivers/irqchip/irq-s3c24xx.c                 | 14 ++------------
 drivers/irqchip/irq-sun4i.c                   |  2 +-
 drivers/irqchip/irq-versatile-fpga.c          |  2 +-
 drivers/irqchip/irq-vic.c                     |  2 +-
 drivers/irqchip/irq-vt8500.c                  |  1 -
 drivers/irqchip/spear-shirq.c                 |  1 -
 drivers/memory/omap-gpmc.c                    |  5 ++---
 drivers/mfd/88pm860x-core.c                   |  4 ----
 drivers/mfd/ab8500-core.c                     |  4 ----
 drivers/mfd/arizona-irq.c                     |  7 -------
 drivers/mfd/asic3.c                           |  4 ++--
 drivers/mfd/db8500-prcmu.c                    |  1 -
 drivers/mfd/ezx-pcap.c                        |  6 +-----
 drivers/mfd/htc-egpio.c                       |  4 ++--
 drivers/mfd/htc-i2cpld.c                      |  6 +-----
 drivers/mfd/lp8788-irq.c                      |  5 -----
 drivers/mfd/max8925-core.c                    |  5 +----
 drivers/mfd/max8997-irq.c                     |  5 +----
 drivers/mfd/max8998-irq.c                     |  5 +----
 drivers/mfd/mt6397-core.c                     |  4 ----
 drivers/mfd/pm8921-core.c                     |  5 +----
 drivers/mfd/rc5t583-irq.c                     |  4 +---
 drivers/mfd/stmpe.c                           |  7 -------
 drivers/mfd/t7l66xb.c                         |  6 ------
 drivers/mfd/tc3589x.c                         |  7 -------
 drivers/mfd/tc6393xb.c                        |  4 ++--
 drivers/mfd/tps6586x.c                        |  7 -------
 drivers/mfd/tps65912-irq.c                    |  8 +-------
 drivers/mfd/twl4030-irq.c                     | 11 +----------
 drivers/mfd/twl6030-irq.c                     | 13 -------------
 drivers/mfd/ucb1x00-core.c                    |  2 +-
 drivers/mfd/wm831x-irq.c                      |  7 -------
 drivers/mfd/wm8350-irq.c                      |  8 +-------
 drivers/mfd/wm8994-irq.c                      |  7 -------
 drivers/pci/host/pci-dra7xx.c                 |  1 -
 drivers/pci/host/pci-keystone-dw.c            |  2 --
 drivers/pci/host/pci-tegra.c                  |  1 -
 drivers/pci/host/pcie-designware.c            |  1 -
 drivers/pci/host/pcie-rcar.c                  |  1 -
 drivers/pci/host/pcie-xilinx.c                |  2 --
 drivers/pinctrl/bcm/pinctrl-bcm2835.c         |  1 -
 drivers/pinctrl/mediatek/pinctrl-mtk-common.c |  2 --
 drivers/pinctrl/pinctrl-single.c              |  5 -----
 drivers/pinctrl/samsung/pinctrl-exynos.c      |  1 -
 drivers/pinctrl/samsung/pinctrl-exynos5440.c  |  1 -
 drivers/pinctrl/samsung/pinctrl-s3c24xx.c     |  2 --
 drivers/pinctrl/samsung/pinctrl-s3c64xx.c     |  2 --
 drivers/sh/intc/internals.h                   | 10 +---------
 drivers/tty/serial/serial_ks8695.c            |  2 +-
 drivers/tty/serial/sirfsoc_uart.c             |  6 +++---
 119 files changed, 100 insertions(+), 367 deletions(-)

-- 
2.1.0

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

* [PATCH 01/15] ARM: kill off set_irq_flags usage
  2015-06-09 18:26 ` Rob Herring
  (?)
@ 2015-06-09 18:26   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: Russell King, linux-arm-kernel
  Cc: linux-kernel, arm, Rob Herring, Sekhar Nori, Kevin Hilman,
	Jason Cooper, Andrew Lunn, Sebastian Hesselbarth,
	Gregory Clement, Hans Ulli Kroll, Shawn Guo, Sascha Hauer,
	Imre Kaloz, Krzysztof Halasa, Greg Ungerer, Roland Stigge,
	Tony Lindgren, Daniel Mack, Haojian Zhuang, Robert Jarzmik,
	Simtec Linux Team, Kukjin Kim, Krzysztof Kozlowski, Wan ZongShun,
	linux-omap, linux-samsung-soc

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: Krzysztof Halasa <khalasa@piap.pl>
Cc: Greg Ungerer <gerg@uclinux.org>
Cc: Roland Stigge <stigge@antcom.de>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Daniel Mack <daniel@zonque.org>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Simtec Linux Team <linux@simtec.co.uk>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Wan ZongShun <mcuos.com@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-omap@vger.kernel.org
Cc: linux-samsung-soc@vger.kernel.org
---
 arch/arm/common/it8152.c             |  2 +-
 arch/arm/common/locomo.c             |  2 +-
 arch/arm/common/sa1111.c             |  4 ++--
 arch/arm/mach-davinci/cp_intc.c      |  2 +-
 arch/arm/mach-dove/irq.c             |  2 +-
 arch/arm/mach-ebsa110/core.c         |  2 +-
 arch/arm/mach-footbridge/common.c    |  2 +-
 arch/arm/mach-footbridge/isa-irq.c   |  8 ++++----
 arch/arm/mach-gemini/gpio.c          |  2 +-
 arch/arm/mach-gemini/irq.c           |  2 +-
 arch/arm/mach-imx/3ds_debugboard.c   |  2 +-
 arch/arm/mach-imx/mach-mx31ads.c     |  2 +-
 arch/arm/mach-iop13xx/irq.c          |  2 +-
 arch/arm/mach-iop32x/irq.c           |  2 +-
 arch/arm/mach-iop33x/irq.c           |  2 +-
 arch/arm/mach-ixp4xx/common.c        |  2 +-
 arch/arm/mach-ks8695/irq.c           |  2 +-
 arch/arm/mach-lpc32xx/irq.c          |  2 +-
 arch/arm/mach-netx/generic.c         |  2 +-
 arch/arm/mach-omap1/fpga.c           |  2 +-
 arch/arm/mach-omap1/irq.c            |  2 +-
 arch/arm/mach-pxa/balloon3.c         |  2 +-
 arch/arm/mach-pxa/irq.c              |  1 -
 arch/arm/mach-pxa/lpd270.c           |  2 +-
 arch/arm/mach-pxa/pcm990-baseboard.c |  2 +-
 arch/arm/mach-pxa/pxa3xx.c           |  2 +-
 arch/arm/mach-pxa/viper.c            |  2 +-
 arch/arm/mach-pxa/zeus.c             |  2 +-
 arch/arm/mach-rpc/ecard.c            |  2 +-
 arch/arm/mach-rpc/irq.c              | 16 ++++++++--------
 arch/arm/mach-s3c24xx/bast-irq.c     |  2 +-
 arch/arm/mach-s3c64xx/common.c       |  2 +-
 arch/arm/mach-sa1100/irq.c           |  1 -
 arch/arm/mach-sa1100/neponset.c      |  4 ++--
 arch/arm/mach-w90x900/irq.c          |  2 +-
 35 files changed, 45 insertions(+), 47 deletions(-)

diff --git a/arch/arm/common/it8152.c b/arch/arm/common/it8152.c
index 5114b68..96dabcb 100644
--- a/arch/arm/common/it8152.c
+++ b/arch/arm/common/it8152.c
@@ -91,7 +91,7 @@ void it8152_init_irq(void)
 	for (irq = IT8152_IRQ(0); irq <= IT8152_LAST_IRQ; irq++) {
 		irq_set_chip_and_handler(irq, &it8152_irq_chip,
 					 handle_level_irq);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 }
 
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
index b55c362..339fc41 100644
--- a/arch/arm/common/locomo.c
+++ b/arch/arm/common/locomo.c
@@ -205,7 +205,7 @@ static void locomo_setup_irq(struct locomo *lchip)
 	for ( ; irq <= lchip->irq_base + 3; irq++) {
 		irq_set_chip_and_handler(irq, &locomo_chip, handle_level_irq);
 		irq_set_chip_data(irq, lchip);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 }
 
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index 5cc779c..139aa3c 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -486,7 +486,7 @@ static int sa1111_setup_irq(struct sa1111 *sachip, unsigned irq_base)
 		irq_set_chip_and_handler(irq, &sa1111_low_chip,
 					 handle_edge_irq);
 		irq_set_chip_data(irq, sachip);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	for (i = AUDXMTDMADONEA; i <= IRQ_S1_BVD1_STSCHG; i++) {
@@ -494,7 +494,7 @@ static int sa1111_setup_irq(struct sa1111 *sachip, unsigned irq_base)
 		irq_set_chip_and_handler(irq, &sa1111_high_chip,
 					 handle_edge_irq);
 		irq_set_chip_data(irq, sachip);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	/*
diff --git a/arch/arm/mach-davinci/cp_intc.c b/arch/arm/mach-davinci/cp_intc.c
index 006dae8df..3f683fd 100644
--- a/arch/arm/mach-davinci/cp_intc.c
+++ b/arch/arm/mach-davinci/cp_intc.c
@@ -112,7 +112,7 @@ static int cp_intc_host_map(struct irq_domain *h, unsigned int virq,
 	pr_debug("cp_intc_host_map(%d, 0x%lx)\n", virq, hw);
 
 	irq_set_chip(virq, &cp_intc_irq_chip);
-	set_irq_flags(virq, IRQF_VALID | IRQF_PROBE);
+	irq_set_noprobe(virq);
 	irq_set_handler(virq, handle_edge_irq);
 	return 0;
 }
diff --git a/arch/arm/mach-dove/irq.c b/arch/arm/mach-dove/irq.c
index 4a5a7ae..e2a940b 100644
--- a/arch/arm/mach-dove/irq.c
+++ b/arch/arm/mach-dove/irq.c
@@ -172,7 +172,7 @@ void __init dove_init_irq(void)
 	for (i = IRQ_DOVE_PMU_START; i < NR_IRQS; i++) {
 		irq_set_chip_and_handler(i, &pmu_irq_chip, handle_level_irq);
 		irq_set_status_flags(i, IRQ_LEVEL);
-		set_irq_flags(i, IRQF_VALID);
+		irq_clear_status_flags(i, IRQ_NOREQUEST);
 	}
 	irq_set_chained_handler(IRQ_DOVE_PMU, pmu_irq_handler);
 }
diff --git a/arch/arm/mach-ebsa110/core.c b/arch/arm/mach-ebsa110/core.c
index 8254e71..688e5fe 100644
--- a/arch/arm/mach-ebsa110/core.c
+++ b/arch/arm/mach-ebsa110/core.c
@@ -65,7 +65,7 @@ static void __init ebsa110_init_irq(void)
 	for (irq = 0; irq < NR_IRQS; irq++) {
 		irq_set_chip_and_handler(irq, &ebsa110_irq_chip,
 					 handle_level_irq);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 }
 
diff --git a/arch/arm/mach-footbridge/common.c b/arch/arm/mach-footbridge/common.c
index 9e8220e..0f0c9e0 100644
--- a/arch/arm/mach-footbridge/common.c
+++ b/arch/arm/mach-footbridge/common.c
@@ -106,7 +106,7 @@ static void __init __fb_init_irq(void)
 
 	for (irq = _DC21285_IRQ(0); irq < _DC21285_IRQ(20); irq++) {
 		irq_set_chip_and_handler(irq, &fb_chip, handle_level_irq);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 }
 
diff --git a/arch/arm/mach-footbridge/isa-irq.c b/arch/arm/mach-footbridge/isa-irq.c
index c3a0abb..fcd79bc 100644
--- a/arch/arm/mach-footbridge/isa-irq.c
+++ b/arch/arm/mach-footbridge/isa-irq.c
@@ -153,13 +153,13 @@ void __init isa_init_irq(unsigned int host_irq)
 		for (irq = _ISA_IRQ(0); irq < _ISA_IRQ(8); irq++) {
 			irq_set_chip_and_handler(irq, &isa_lo_chip,
 						 handle_level_irq);
-			set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+			irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 		}
 
 		for (irq = _ISA_IRQ(8); irq < _ISA_IRQ(16); irq++) {
 			irq_set_chip_and_handler(irq, &isa_hi_chip,
 						 handle_level_irq);
-			set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+			irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 		}
 
 		request_resource(&ioport_resource, &pic1_resource);
@@ -175,8 +175,8 @@ void __init isa_init_irq(unsigned int host_irq)
 		 * resistor on this line.
 		 */
 		if (machine_is_netwinder())
-			set_irq_flags(_ISA_IRQ(11), IRQF_VALID |
-				      IRQF_PROBE | IRQF_NOAUTOEN);
+			irq_modify_status(_ISA_IRQ(11),
+				IRQ_NOREQUEST | IRQ_NOPROBE, IRQ_NOAUTOEN);
 	}
 }
 
diff --git a/arch/arm/mach-gemini/gpio.c b/arch/arm/mach-gemini/gpio.c
index f8cb571..84e301f 100644
--- a/arch/arm/mach-gemini/gpio.c
+++ b/arch/arm/mach-gemini/gpio.c
@@ -220,7 +220,7 @@ void __init gemini_gpio_init(void)
 		     j < GPIO_IRQ_BASE + (i + 1) * 32; j++) {
 			irq_set_chip_and_handler(j, &gpio_irq_chip,
 						 handle_edge_irq);
-			set_irq_flags(j, IRQF_VALID);
+			irq_clear_status_flags(j, IRQ_NOREQUEST);
 		}
 
 		irq_set_chained_handler(IRQ_GPIO(i), gpio_irq_handler);
diff --git a/arch/arm/mach-gemini/irq.c b/arch/arm/mach-gemini/irq.c
index 44f50dc..d929b3f 100644
--- a/arch/arm/mach-gemini/irq.c
+++ b/arch/arm/mach-gemini/irq.c
@@ -92,7 +92,7 @@ void __init gemini_init_irq(void)
 		} else {			
 			irq_set_handler(i, handle_level_irq);
 		}
-		set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(i, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	/* Disable all interrupts */
diff --git a/arch/arm/mach-imx/3ds_debugboard.c b/arch/arm/mach-imx/3ds_debugboard.c
index 1343773..45903be 100644
--- a/arch/arm/mach-imx/3ds_debugboard.c
+++ b/arch/arm/mach-imx/3ds_debugboard.c
@@ -195,7 +195,7 @@ int __init mxc_expio_init(u32 base, u32 intr_gpio)
 
 	for (i = irq_base; i < irq_base + MXC_MAX_EXP_IO_LINES; i++) {
 		irq_set_chip_and_handler(i, &expio_irq_chip, handle_level_irq);
-		set_irq_flags(i, IRQF_VALID);
+		irq_clear_status_flags(i, IRQ_NOREQUEST);
 	}
 	irq_set_irq_type(p_irq, IRQF_TRIGGER_LOW);
 	irq_set_chained_handler(p_irq, mxc_expio_irq_handler);
diff --git a/arch/arm/mach-imx/mach-mx31ads.c b/arch/arm/mach-imx/mach-mx31ads.c
index d08c37c..2c08535 100644
--- a/arch/arm/mach-imx/mach-mx31ads.c
+++ b/arch/arm/mach-imx/mach-mx31ads.c
@@ -238,7 +238,7 @@ static void __init mx31ads_init_expio(void)
 
 	for (i = irq_base; i < irq_base + MXC_MAX_EXP_IO_LINES; i++) {
 		irq_set_chip_and_handler(i, &expio_irq_chip, handle_level_irq);
-		set_irq_flags(i, IRQF_VALID);
+		irq_clear_status_flags(i, IRQ_NOREQUEST);
 	}
 	irq = gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_4));
 	irq_set_irq_type(irq, IRQ_TYPE_LEVEL_HIGH);
diff --git a/arch/arm/mach-iop13xx/irq.c b/arch/arm/mach-iop13xx/irq.c
index bc73970..623d85a 100644
--- a/arch/arm/mach-iop13xx/irq.c
+++ b/arch/arm/mach-iop13xx/irq.c
@@ -233,7 +233,7 @@ void __init iop13xx_init_irq(void)
 			irq_set_chip(i, &iop13xx_irqchip4);
 
 		irq_set_handler(i, handle_level_irq);
-		set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(i, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	iop13xx_msi_init();
diff --git a/arch/arm/mach-iop32x/irq.c b/arch/arm/mach-iop32x/irq.c
index d7ee278..2d1f69a 100644
--- a/arch/arm/mach-iop32x/irq.c
+++ b/arch/arm/mach-iop32x/irq.c
@@ -69,6 +69,6 @@ void __init iop32x_init_irq(void)
 
 	for (i = 0; i < NR_IRQS; i++) {
 		irq_set_chip_and_handler(i, &ext_chip, handle_level_irq);
-		set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(i, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 }
diff --git a/arch/arm/mach-iop33x/irq.c b/arch/arm/mach-iop33x/irq.c
index f7f5d3e..c99ec8d 100644
--- a/arch/arm/mach-iop33x/irq.c
+++ b/arch/arm/mach-iop33x/irq.c
@@ -113,6 +113,6 @@ void __init iop33x_init_irq(void)
 		irq_set_chip_and_handler(i,
 					 (i < 32) ? &iop33x_irqchip1 : &iop33x_irqchip2,
 					 handle_level_irq);
-		set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(i, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 }
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index 8537d4c..0f3f01a 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -296,7 +296,7 @@ void __init ixp4xx_init_irq(void)
 	for(i = 0; i < NR_IRQS; i++) {
 		irq_set_chip_and_handler(i, &ixp4xx_irq_chip,
 					 handle_level_irq);
-		set_irq_flags(i, IRQF_VALID);
+		irq_clear_status_flags(i, IRQ_NOREQUEST);
 	}
 }
 
diff --git a/arch/arm/mach-ks8695/irq.c b/arch/arm/mach-ks8695/irq.c
index 76802aa..31439f2 100644
--- a/arch/arm/mach-ks8695/irq.c
+++ b/arch/arm/mach-ks8695/irq.c
@@ -172,6 +172,6 @@ void __init ks8695_init_irq(void)
 							 handle_edge_irq);
 		}
 
-		set_irq_flags(irq, IRQF_VALID);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST);
 	}
 }
diff --git a/arch/arm/mach-lpc32xx/irq.c b/arch/arm/mach-lpc32xx/irq.c
index 9ecb8f9..39f3d81 100644
--- a/arch/arm/mach-lpc32xx/irq.c
+++ b/arch/arm/mach-lpc32xx/irq.c
@@ -434,7 +434,7 @@ void __init lpc32xx_init_irq(void)
 	for (i = 0; i < NR_IRQS; i++) {
 		irq_set_chip_and_handler(i, &lpc32xx_irq_chip,
 					 handle_level_irq);
-		set_irq_flags(i, IRQF_VALID);
+		irq_clear_status_flags(i, IRQ_NOREQUEST);
 	}
 
 	/* Set default mappings */
diff --git a/arch/arm/mach-netx/generic.c b/arch/arm/mach-netx/generic.c
index db25b0c..6373e2b 100644
--- a/arch/arm/mach-netx/generic.c
+++ b/arch/arm/mach-netx/generic.c
@@ -174,7 +174,7 @@ void __init netx_init_irq(void)
 	for (irq = NETX_IRQ_HIF_CHAINED(0); irq <= NETX_IRQ_HIF_LAST; irq++) {
 		irq_set_chip_and_handler(irq, &netx_hif_chip,
 					 handle_level_irq);
-		set_irq_flags(irq, IRQF_VALID);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST);
 	}
 
 	writel(NETX_DPMAS_INT_EN_GLB_EN, NETX_DPMAS_INT_EN);
diff --git a/arch/arm/mach-omap1/fpga.c b/arch/arm/mach-omap1/fpga.c
index 3c0e422..dfec671 100644
--- a/arch/arm/mach-omap1/fpga.c
+++ b/arch/arm/mach-omap1/fpga.c
@@ -169,7 +169,7 @@ void omap1510_fpga_init_irq(void)
 		}
 
 		irq_set_handler(i, handle_edge_irq);
-		set_irq_flags(i, IRQF_VALID);
+		irq_clear_status_flags(i, IRQ_NOREQUEST);
 	}
 
 	/*
diff --git a/arch/arm/mach-omap1/irq.c b/arch/arm/mach-omap1/irq.c
index a8a533d..1af7dd9 100644
--- a/arch/arm/mach-omap1/irq.c
+++ b/arch/arm/mach-omap1/irq.c
@@ -230,7 +230,7 @@ void __init omap1_init_irq(void)
 
 			irq_set_chip_and_handler(j, &omap_irq_chip,
 						 handle_level_irq);
-			set_irq_flags(j, IRQF_VALID);
+			irq_clear_status_flags(j, IRQ_NOREQUEST);
 		}
 	}
 
diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c
index d897292..09b9a36 100644
--- a/arch/arm/mach-pxa/balloon3.c
+++ b/arch/arm/mach-pxa/balloon3.c
@@ -528,7 +528,7 @@ static void __init balloon3_init_irq(void)
 	for (irq = BALLOON3_IRQ(0); irq <= BALLOON3_IRQ(7); irq++) {
 		irq_set_chip_and_handler(irq, &balloon3_irq_chip,
 					 handle_level_irq);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	irq_set_chained_handler(BALLOON3_AUX_NIRQ, balloon3_irq_handler);
diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
index 89a7c06..3a4a116 100644
--- a/arch/arm/mach-pxa/irq.c
+++ b/arch/arm/mach-pxa/irq.c
@@ -133,7 +133,6 @@ static int pxa_irq_map(struct irq_domain *h, unsigned int virq,
 	irq_set_chip_and_handler(virq, &pxa_internal_irq_chip,
 				 handle_level_irq);
 	irq_set_chip_data(virq, base);
-	set_irq_flags(virq, IRQF_VALID);
 
 	return 0;
 }
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c
index eaee2c2..2670fb0 100644
--- a/arch/arm/mach-pxa/lpd270.c
+++ b/arch/arm/mach-pxa/lpd270.c
@@ -151,7 +151,7 @@ static void __init lpd270_init_irq(void)
 	for (irq = LPD270_IRQ(2); irq <= LPD270_IRQ(4); irq++) {
 		irq_set_chip_and_handler(irq, &lpd270_irq_chip,
 					 handle_level_irq);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 	irq_set_chained_handler(PXA_GPIO_TO_IRQ(0), lpd270_irq_handler);
 	irq_set_irq_type(PXA_GPIO_TO_IRQ(0), IRQ_TYPE_EDGE_FALLING);
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c
index 2897da2..86e01bf 100644
--- a/arch/arm/mach-pxa/pcm990-baseboard.c
+++ b/arch/arm/mach-pxa/pcm990-baseboard.c
@@ -311,7 +311,7 @@ static void __init pcm990_init_irq(void)
 	for (irq = PCM027_IRQ(0); irq <= PCM027_IRQ(3); irq++) {
 		irq_set_chip_and_handler(irq, &pcm990_irq_chip,
 					 handle_level_irq);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	/* disable all Interrupts */
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index edcbd9c..0397800 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -381,7 +381,7 @@ static void __init pxa_init_ext_wakeup_irq(int (*fn)(struct irq_data *,
 	for (irq = IRQ_WAKEUP0; irq <= IRQ_WAKEUP1; irq++) {
 		irq_set_chip_and_handler(irq, &pxa_ext_wakeup_chip,
 					 handle_edge_irq);
-		set_irq_flags(irq, IRQF_VALID);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST);
 	}
 
 	pxa_ext_wakeup_chip.irq_set_wake = fn;
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c
index de3b080..dae3de8 100644
--- a/arch/arm/mach-pxa/viper.c
+++ b/arch/arm/mach-pxa/viper.c
@@ -313,7 +313,7 @@ static void __init viper_init_irq(void)
 		isa_irq = viper_bit_to_irq(level);
 		irq_set_chip_and_handler(isa_irq, &viper_irq_chip,
 					 handle_edge_irq);
-		set_irq_flags(isa_irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(isa_irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	irq_set_chained_handler(gpio_to_irq(VIPER_CPLD_GPIO),
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c
index ac2ae5c..48dd5bd 100644
--- a/arch/arm/mach-pxa/zeus.c
+++ b/arch/arm/mach-pxa/zeus.c
@@ -151,7 +151,7 @@ static void __init zeus_init_irq(void)
 		isa_irq = zeus_bit_to_irq(level);
 		irq_set_chip_and_handler(isa_irq, &zeus_irq_chip,
 					 handle_edge_irq);
-		set_irq_flags(isa_irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(isa_irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	irq_set_irq_type(gpio_to_irq(ZEUS_ISA_GPIO), IRQ_TYPE_EDGE_RISING);
diff --git a/arch/arm/mach-rpc/ecard.c b/arch/arm/mach-rpc/ecard.c
index fcb1d59..f726d4c 100644
--- a/arch/arm/mach-rpc/ecard.c
+++ b/arch/arm/mach-rpc/ecard.c
@@ -946,7 +946,7 @@ static int __init ecard_probe(int slot, unsigned irq, card_type_t type)
 		irq_set_chip_and_handler(ec->irq, &ecard_chip,
 					 handle_level_irq);
 		irq_set_chip_data(ec->irq, ec);
-		set_irq_flags(ec->irq, IRQF_VALID);
+		irq_clear_status_flags(ec->irq, IRQ_NOREQUEST);
 	}
 
 #ifdef CONFIG_ARCH_RPC
diff --git a/arch/arm/mach-rpc/irq.c b/arch/arm/mach-rpc/irq.c
index 3e4fa84..66502e6 100644
--- a/arch/arm/mach-rpc/irq.c
+++ b/arch/arm/mach-rpc/irq.c
@@ -117,7 +117,7 @@ extern unsigned char rpc_default_fiq_start, rpc_default_fiq_end;
 
 void __init rpc_init_irq(void)
 {
-	unsigned int irq, flags;
+	unsigned int irq, clr, set = 0;
 
 	iomd_writeb(0, IOMD_IRQMASKA);
 	iomd_writeb(0, IOMD_IRQMASKB);
@@ -128,37 +128,37 @@ void __init rpc_init_irq(void)
 		&rpc_default_fiq_end - &rpc_default_fiq_start);
 
 	for (irq = 0; irq < NR_IRQS; irq++) {
-		flags = IRQF_VALID;
+		clr = IRQ_NOREQUEST;
 
 		if (irq <= 6 || (irq >= 9 && irq <= 15))
-			flags |= IRQF_PROBE;
+			clr |= IRQ_NOPROBE;
 
 		if (irq == 21 || (irq >= 16 && irq <= 19) ||
 		    irq == IRQ_KEYBOARDTX)
-			flags |= IRQF_NOAUTOEN;
+			set |= IRQ_NOAUTOEN;
 
 		switch (irq) {
 		case 0 ... 7:
 			irq_set_chip_and_handler(irq, &iomd_a_chip,
 						 handle_level_irq);
-			set_irq_flags(irq, flags);
+			irq_modify_status(irq, clr, set);
 			break;
 
 		case 8 ... 15:
 			irq_set_chip_and_handler(irq, &iomd_b_chip,
 						 handle_level_irq);
-			set_irq_flags(irq, flags);
+			irq_modify_status(irq, clr, set);
 			break;
 
 		case 16 ... 21:
 			irq_set_chip_and_handler(irq, &iomd_dma_chip,
 						 handle_level_irq);
-			set_irq_flags(irq, flags);
+			irq_modify_status(irq, clr, set);
 			break;
 
 		case 64 ... 71:
 			irq_set_chip(irq, &iomd_fiq_chip);
-			set_irq_flags(irq, IRQF_VALID);
+			irq_modify_status(irq, clr, set);
 			break;
 		}
 	}
diff --git a/arch/arm/mach-s3c24xx/bast-irq.c b/arch/arm/mach-s3c24xx/bast-irq.c
index cb1b791..ced1ab8 100644
--- a/arch/arm/mach-s3c24xx/bast-irq.c
+++ b/arch/arm/mach-s3c24xx/bast-irq.c
@@ -147,7 +147,7 @@ static __init int bast_irq_init(void)
 
 			irq_set_chip_and_handler(irqno, &bast_pc104_chip,
 						 handle_level_irq);
-			set_irq_flags(irqno, IRQF_VALID);
+			irq_clear_status_flags(irqno, IRQ_NOREQUEST);
 		}
 	}
 
diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c
index 16547f2..06ba943 100644
--- a/arch/arm/mach-s3c64xx/common.c
+++ b/arch/arm/mach-s3c64xx/common.c
@@ -420,7 +420,7 @@ static int __init s3c64xx_init_irq_eint(void)
 	for (irq = IRQ_EINT(0); irq <= IRQ_EINT(27); irq++) {
 		irq_set_chip_and_handler(irq, &s3c_irq_eint, handle_level_irq);
 		irq_set_chip_data(irq, (void *)eint_irq_to_bit(irq));
-		set_irq_flags(irq, IRQF_VALID);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST);
 	}
 
 	irq_set_chained_handler(IRQ_EINT0_3, s3c_irq_demux_eint0_3);
diff --git a/arch/arm/mach-sa1100/irq.c b/arch/arm/mach-sa1100/irq.c
index 65aebfa..4f1d1e9 100644
--- a/arch/arm/mach-sa1100/irq.c
+++ b/arch/arm/mach-sa1100/irq.c
@@ -68,7 +68,6 @@ static int sa1100_normal_irqdomain_map(struct irq_domain *d,
 {
 	irq_set_chip_and_handler(irq, &sa1100_normal_chip,
 				 handle_level_irq);
-	set_irq_flags(irq, IRQF_VALID);
 
 	return 0;
 }
diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c
index af868d25..4491d31 100644
--- a/arch/arm/mach-sa1100/neponset.c
+++ b/arch/arm/mach-sa1100/neponset.c
@@ -320,10 +320,10 @@ static int neponset_probe(struct platform_device *dev)
 
 	irq_set_chip_and_handler(d->irq_base + NEP_IRQ_SMC91X, &nochip,
 		handle_simple_irq);
-	set_irq_flags(d->irq_base + NEP_IRQ_SMC91X, IRQF_VALID | IRQF_PROBE);
+	irq_clear_status_flags(d->irq_base + NEP_IRQ_SMC91X, IRQ_NOREQUEST | IRQ_NOPROBE);
 	irq_set_chip_and_handler(d->irq_base + NEP_IRQ_USAR, &nochip,
 		handle_simple_irq);
-	set_irq_flags(d->irq_base + NEP_IRQ_USAR, IRQF_VALID | IRQF_PROBE);
+	irq_clear_status_flags(d->irq_base + NEP_IRQ_USAR, IRQ_NOREQUEST | IRQ_NOPROBE);
 	irq_set_chip(d->irq_base + NEP_IRQ_SA1111, &nochip);
 
 	irq_set_irq_type(irq, IRQ_TYPE_EDGE_RISING);
diff --git a/arch/arm/mach-w90x900/irq.c b/arch/arm/mach-w90x900/irq.c
index d66d43a..491b317 100644
--- a/arch/arm/mach-w90x900/irq.c
+++ b/arch/arm/mach-w90x900/irq.c
@@ -211,6 +211,6 @@ void __init nuc900_init_irq(void)
 	for (irqno = IRQ_WDT; irqno <= IRQ_ADC; irqno++) {
 		irq_set_chip_and_handler(irqno, &nuc900_irq_chip,
 					 handle_level_irq);
-		set_irq_flags(irqno, IRQF_VALID);
+		irq_clear_status_flags(irqno, IRQ_NOREQUEST);
 	}
 }
-- 
2.1.0


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

* [PATCH 01/15] ARM: kill off set_irq_flags usage
@ 2015-06-09 18:26   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: Russell King, linux-arm-kernel
  Cc: Andrew Lunn, Krzysztof Kozlowski, Kevin Hilman, Sekhar Nori,
	Greg Ungerer, Robert Jarzmik, Roland Stigge, Rob Herring,
	linux-samsung-soc, Tony Lindgren, arm, Sebastian Hesselbarth,
	Jason Cooper, Wan ZongShun, Hans Ulli Kroll, Haojian Zhuang,
	Krzysztof Halasa, Gregory Clement, linux-omap, Simtec Linux Team,
	Shawn Guo, linux-kernel, Kukjin Kim, Sascha Hauer

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: Krzysztof Halasa <khalasa@piap.pl>
Cc: Greg Ungerer <gerg@uclinux.org>
Cc: Roland Stigge <stigge@antcom.de>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Daniel Mack <daniel@zonque.org>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Simtec Linux Team <linux@simtec.co.uk>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Wan ZongShun <mcuos.com@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-omap@vger.kernel.org
Cc: linux-samsung-soc@vger.kernel.org
---
 arch/arm/common/it8152.c             |  2 +-
 arch/arm/common/locomo.c             |  2 +-
 arch/arm/common/sa1111.c             |  4 ++--
 arch/arm/mach-davinci/cp_intc.c      |  2 +-
 arch/arm/mach-dove/irq.c             |  2 +-
 arch/arm/mach-ebsa110/core.c         |  2 +-
 arch/arm/mach-footbridge/common.c    |  2 +-
 arch/arm/mach-footbridge/isa-irq.c   |  8 ++++----
 arch/arm/mach-gemini/gpio.c          |  2 +-
 arch/arm/mach-gemini/irq.c           |  2 +-
 arch/arm/mach-imx/3ds_debugboard.c   |  2 +-
 arch/arm/mach-imx/mach-mx31ads.c     |  2 +-
 arch/arm/mach-iop13xx/irq.c          |  2 +-
 arch/arm/mach-iop32x/irq.c           |  2 +-
 arch/arm/mach-iop33x/irq.c           |  2 +-
 arch/arm/mach-ixp4xx/common.c        |  2 +-
 arch/arm/mach-ks8695/irq.c           |  2 +-
 arch/arm/mach-lpc32xx/irq.c          |  2 +-
 arch/arm/mach-netx/generic.c         |  2 +-
 arch/arm/mach-omap1/fpga.c           |  2 +-
 arch/arm/mach-omap1/irq.c            |  2 +-
 arch/arm/mach-pxa/balloon3.c         |  2 +-
 arch/arm/mach-pxa/irq.c              |  1 -
 arch/arm/mach-pxa/lpd270.c           |  2 +-
 arch/arm/mach-pxa/pcm990-baseboard.c |  2 +-
 arch/arm/mach-pxa/pxa3xx.c           |  2 +-
 arch/arm/mach-pxa/viper.c            |  2 +-
 arch/arm/mach-pxa/zeus.c             |  2 +-
 arch/arm/mach-rpc/ecard.c            |  2 +-
 arch/arm/mach-rpc/irq.c              | 16 ++++++++--------
 arch/arm/mach-s3c24xx/bast-irq.c     |  2 +-
 arch/arm/mach-s3c64xx/common.c       |  2 +-
 arch/arm/mach-sa1100/irq.c           |  1 -
 arch/arm/mach-sa1100/neponset.c      |  4 ++--
 arch/arm/mach-w90x900/irq.c          |  2 +-
 35 files changed, 45 insertions(+), 47 deletions(-)

diff --git a/arch/arm/common/it8152.c b/arch/arm/common/it8152.c
index 5114b68..96dabcb 100644
--- a/arch/arm/common/it8152.c
+++ b/arch/arm/common/it8152.c
@@ -91,7 +91,7 @@ void it8152_init_irq(void)
 	for (irq = IT8152_IRQ(0); irq <= IT8152_LAST_IRQ; irq++) {
 		irq_set_chip_and_handler(irq, &it8152_irq_chip,
 					 handle_level_irq);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 }
 
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
index b55c362..339fc41 100644
--- a/arch/arm/common/locomo.c
+++ b/arch/arm/common/locomo.c
@@ -205,7 +205,7 @@ static void locomo_setup_irq(struct locomo *lchip)
 	for ( ; irq <= lchip->irq_base + 3; irq++) {
 		irq_set_chip_and_handler(irq, &locomo_chip, handle_level_irq);
 		irq_set_chip_data(irq, lchip);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 }
 
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index 5cc779c..139aa3c 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -486,7 +486,7 @@ static int sa1111_setup_irq(struct sa1111 *sachip, unsigned irq_base)
 		irq_set_chip_and_handler(irq, &sa1111_low_chip,
 					 handle_edge_irq);
 		irq_set_chip_data(irq, sachip);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	for (i = AUDXMTDMADONEA; i <= IRQ_S1_BVD1_STSCHG; i++) {
@@ -494,7 +494,7 @@ static int sa1111_setup_irq(struct sa1111 *sachip, unsigned irq_base)
 		irq_set_chip_and_handler(irq, &sa1111_high_chip,
 					 handle_edge_irq);
 		irq_set_chip_data(irq, sachip);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	/*
diff --git a/arch/arm/mach-davinci/cp_intc.c b/arch/arm/mach-davinci/cp_intc.c
index 006dae8df..3f683fd 100644
--- a/arch/arm/mach-davinci/cp_intc.c
+++ b/arch/arm/mach-davinci/cp_intc.c
@@ -112,7 +112,7 @@ static int cp_intc_host_map(struct irq_domain *h, unsigned int virq,
 	pr_debug("cp_intc_host_map(%d, 0x%lx)\n", virq, hw);
 
 	irq_set_chip(virq, &cp_intc_irq_chip);
-	set_irq_flags(virq, IRQF_VALID | IRQF_PROBE);
+	irq_set_noprobe(virq);
 	irq_set_handler(virq, handle_edge_irq);
 	return 0;
 }
diff --git a/arch/arm/mach-dove/irq.c b/arch/arm/mach-dove/irq.c
index 4a5a7ae..e2a940b 100644
--- a/arch/arm/mach-dove/irq.c
+++ b/arch/arm/mach-dove/irq.c
@@ -172,7 +172,7 @@ void __init dove_init_irq(void)
 	for (i = IRQ_DOVE_PMU_START; i < NR_IRQS; i++) {
 		irq_set_chip_and_handler(i, &pmu_irq_chip, handle_level_irq);
 		irq_set_status_flags(i, IRQ_LEVEL);
-		set_irq_flags(i, IRQF_VALID);
+		irq_clear_status_flags(i, IRQ_NOREQUEST);
 	}
 	irq_set_chained_handler(IRQ_DOVE_PMU, pmu_irq_handler);
 }
diff --git a/arch/arm/mach-ebsa110/core.c b/arch/arm/mach-ebsa110/core.c
index 8254e71..688e5fe 100644
--- a/arch/arm/mach-ebsa110/core.c
+++ b/arch/arm/mach-ebsa110/core.c
@@ -65,7 +65,7 @@ static void __init ebsa110_init_irq(void)
 	for (irq = 0; irq < NR_IRQS; irq++) {
 		irq_set_chip_and_handler(irq, &ebsa110_irq_chip,
 					 handle_level_irq);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 }
 
diff --git a/arch/arm/mach-footbridge/common.c b/arch/arm/mach-footbridge/common.c
index 9e8220e..0f0c9e0 100644
--- a/arch/arm/mach-footbridge/common.c
+++ b/arch/arm/mach-footbridge/common.c
@@ -106,7 +106,7 @@ static void __init __fb_init_irq(void)
 
 	for (irq = _DC21285_IRQ(0); irq < _DC21285_IRQ(20); irq++) {
 		irq_set_chip_and_handler(irq, &fb_chip, handle_level_irq);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 }
 
diff --git a/arch/arm/mach-footbridge/isa-irq.c b/arch/arm/mach-footbridge/isa-irq.c
index c3a0abb..fcd79bc 100644
--- a/arch/arm/mach-footbridge/isa-irq.c
+++ b/arch/arm/mach-footbridge/isa-irq.c
@@ -153,13 +153,13 @@ void __init isa_init_irq(unsigned int host_irq)
 		for (irq = _ISA_IRQ(0); irq < _ISA_IRQ(8); irq++) {
 			irq_set_chip_and_handler(irq, &isa_lo_chip,
 						 handle_level_irq);
-			set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+			irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 		}
 
 		for (irq = _ISA_IRQ(8); irq < _ISA_IRQ(16); irq++) {
 			irq_set_chip_and_handler(irq, &isa_hi_chip,
 						 handle_level_irq);
-			set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+			irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 		}
 
 		request_resource(&ioport_resource, &pic1_resource);
@@ -175,8 +175,8 @@ void __init isa_init_irq(unsigned int host_irq)
 		 * resistor on this line.
 		 */
 		if (machine_is_netwinder())
-			set_irq_flags(_ISA_IRQ(11), IRQF_VALID |
-				      IRQF_PROBE | IRQF_NOAUTOEN);
+			irq_modify_status(_ISA_IRQ(11),
+				IRQ_NOREQUEST | IRQ_NOPROBE, IRQ_NOAUTOEN);
 	}
 }
 
diff --git a/arch/arm/mach-gemini/gpio.c b/arch/arm/mach-gemini/gpio.c
index f8cb571..84e301f 100644
--- a/arch/arm/mach-gemini/gpio.c
+++ b/arch/arm/mach-gemini/gpio.c
@@ -220,7 +220,7 @@ void __init gemini_gpio_init(void)
 		     j < GPIO_IRQ_BASE + (i + 1) * 32; j++) {
 			irq_set_chip_and_handler(j, &gpio_irq_chip,
 						 handle_edge_irq);
-			set_irq_flags(j, IRQF_VALID);
+			irq_clear_status_flags(j, IRQ_NOREQUEST);
 		}
 
 		irq_set_chained_handler(IRQ_GPIO(i), gpio_irq_handler);
diff --git a/arch/arm/mach-gemini/irq.c b/arch/arm/mach-gemini/irq.c
index 44f50dc..d929b3f 100644
--- a/arch/arm/mach-gemini/irq.c
+++ b/arch/arm/mach-gemini/irq.c
@@ -92,7 +92,7 @@ void __init gemini_init_irq(void)
 		} else {			
 			irq_set_handler(i, handle_level_irq);
 		}
-		set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(i, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	/* Disable all interrupts */
diff --git a/arch/arm/mach-imx/3ds_debugboard.c b/arch/arm/mach-imx/3ds_debugboard.c
index 1343773..45903be 100644
--- a/arch/arm/mach-imx/3ds_debugboard.c
+++ b/arch/arm/mach-imx/3ds_debugboard.c
@@ -195,7 +195,7 @@ int __init mxc_expio_init(u32 base, u32 intr_gpio)
 
 	for (i = irq_base; i < irq_base + MXC_MAX_EXP_IO_LINES; i++) {
 		irq_set_chip_and_handler(i, &expio_irq_chip, handle_level_irq);
-		set_irq_flags(i, IRQF_VALID);
+		irq_clear_status_flags(i, IRQ_NOREQUEST);
 	}
 	irq_set_irq_type(p_irq, IRQF_TRIGGER_LOW);
 	irq_set_chained_handler(p_irq, mxc_expio_irq_handler);
diff --git a/arch/arm/mach-imx/mach-mx31ads.c b/arch/arm/mach-imx/mach-mx31ads.c
index d08c37c..2c08535 100644
--- a/arch/arm/mach-imx/mach-mx31ads.c
+++ b/arch/arm/mach-imx/mach-mx31ads.c
@@ -238,7 +238,7 @@ static void __init mx31ads_init_expio(void)
 
 	for (i = irq_base; i < irq_base + MXC_MAX_EXP_IO_LINES; i++) {
 		irq_set_chip_and_handler(i, &expio_irq_chip, handle_level_irq);
-		set_irq_flags(i, IRQF_VALID);
+		irq_clear_status_flags(i, IRQ_NOREQUEST);
 	}
 	irq = gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_4));
 	irq_set_irq_type(irq, IRQ_TYPE_LEVEL_HIGH);
diff --git a/arch/arm/mach-iop13xx/irq.c b/arch/arm/mach-iop13xx/irq.c
index bc73970..623d85a 100644
--- a/arch/arm/mach-iop13xx/irq.c
+++ b/arch/arm/mach-iop13xx/irq.c
@@ -233,7 +233,7 @@ void __init iop13xx_init_irq(void)
 			irq_set_chip(i, &iop13xx_irqchip4);
 
 		irq_set_handler(i, handle_level_irq);
-		set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(i, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	iop13xx_msi_init();
diff --git a/arch/arm/mach-iop32x/irq.c b/arch/arm/mach-iop32x/irq.c
index d7ee278..2d1f69a 100644
--- a/arch/arm/mach-iop32x/irq.c
+++ b/arch/arm/mach-iop32x/irq.c
@@ -69,6 +69,6 @@ void __init iop32x_init_irq(void)
 
 	for (i = 0; i < NR_IRQS; i++) {
 		irq_set_chip_and_handler(i, &ext_chip, handle_level_irq);
-		set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(i, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 }
diff --git a/arch/arm/mach-iop33x/irq.c b/arch/arm/mach-iop33x/irq.c
index f7f5d3e..c99ec8d 100644
--- a/arch/arm/mach-iop33x/irq.c
+++ b/arch/arm/mach-iop33x/irq.c
@@ -113,6 +113,6 @@ void __init iop33x_init_irq(void)
 		irq_set_chip_and_handler(i,
 					 (i < 32) ? &iop33x_irqchip1 : &iop33x_irqchip2,
 					 handle_level_irq);
-		set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(i, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 }
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index 8537d4c..0f3f01a 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -296,7 +296,7 @@ void __init ixp4xx_init_irq(void)
 	for(i = 0; i < NR_IRQS; i++) {
 		irq_set_chip_and_handler(i, &ixp4xx_irq_chip,
 					 handle_level_irq);
-		set_irq_flags(i, IRQF_VALID);
+		irq_clear_status_flags(i, IRQ_NOREQUEST);
 	}
 }
 
diff --git a/arch/arm/mach-ks8695/irq.c b/arch/arm/mach-ks8695/irq.c
index 76802aa..31439f2 100644
--- a/arch/arm/mach-ks8695/irq.c
+++ b/arch/arm/mach-ks8695/irq.c
@@ -172,6 +172,6 @@ void __init ks8695_init_irq(void)
 							 handle_edge_irq);
 		}
 
-		set_irq_flags(irq, IRQF_VALID);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST);
 	}
 }
diff --git a/arch/arm/mach-lpc32xx/irq.c b/arch/arm/mach-lpc32xx/irq.c
index 9ecb8f9..39f3d81 100644
--- a/arch/arm/mach-lpc32xx/irq.c
+++ b/arch/arm/mach-lpc32xx/irq.c
@@ -434,7 +434,7 @@ void __init lpc32xx_init_irq(void)
 	for (i = 0; i < NR_IRQS; i++) {
 		irq_set_chip_and_handler(i, &lpc32xx_irq_chip,
 					 handle_level_irq);
-		set_irq_flags(i, IRQF_VALID);
+		irq_clear_status_flags(i, IRQ_NOREQUEST);
 	}
 
 	/* Set default mappings */
diff --git a/arch/arm/mach-netx/generic.c b/arch/arm/mach-netx/generic.c
index db25b0c..6373e2b 100644
--- a/arch/arm/mach-netx/generic.c
+++ b/arch/arm/mach-netx/generic.c
@@ -174,7 +174,7 @@ void __init netx_init_irq(void)
 	for (irq = NETX_IRQ_HIF_CHAINED(0); irq <= NETX_IRQ_HIF_LAST; irq++) {
 		irq_set_chip_and_handler(irq, &netx_hif_chip,
 					 handle_level_irq);
-		set_irq_flags(irq, IRQF_VALID);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST);
 	}
 
 	writel(NETX_DPMAS_INT_EN_GLB_EN, NETX_DPMAS_INT_EN);
diff --git a/arch/arm/mach-omap1/fpga.c b/arch/arm/mach-omap1/fpga.c
index 3c0e422..dfec671 100644
--- a/arch/arm/mach-omap1/fpga.c
+++ b/arch/arm/mach-omap1/fpga.c
@@ -169,7 +169,7 @@ void omap1510_fpga_init_irq(void)
 		}
 
 		irq_set_handler(i, handle_edge_irq);
-		set_irq_flags(i, IRQF_VALID);
+		irq_clear_status_flags(i, IRQ_NOREQUEST);
 	}
 
 	/*
diff --git a/arch/arm/mach-omap1/irq.c b/arch/arm/mach-omap1/irq.c
index a8a533d..1af7dd9 100644
--- a/arch/arm/mach-omap1/irq.c
+++ b/arch/arm/mach-omap1/irq.c
@@ -230,7 +230,7 @@ void __init omap1_init_irq(void)
 
 			irq_set_chip_and_handler(j, &omap_irq_chip,
 						 handle_level_irq);
-			set_irq_flags(j, IRQF_VALID);
+			irq_clear_status_flags(j, IRQ_NOREQUEST);
 		}
 	}
 
diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c
index d897292..09b9a36 100644
--- a/arch/arm/mach-pxa/balloon3.c
+++ b/arch/arm/mach-pxa/balloon3.c
@@ -528,7 +528,7 @@ static void __init balloon3_init_irq(void)
 	for (irq = BALLOON3_IRQ(0); irq <= BALLOON3_IRQ(7); irq++) {
 		irq_set_chip_and_handler(irq, &balloon3_irq_chip,
 					 handle_level_irq);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	irq_set_chained_handler(BALLOON3_AUX_NIRQ, balloon3_irq_handler);
diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
index 89a7c06..3a4a116 100644
--- a/arch/arm/mach-pxa/irq.c
+++ b/arch/arm/mach-pxa/irq.c
@@ -133,7 +133,6 @@ static int pxa_irq_map(struct irq_domain *h, unsigned int virq,
 	irq_set_chip_and_handler(virq, &pxa_internal_irq_chip,
 				 handle_level_irq);
 	irq_set_chip_data(virq, base);
-	set_irq_flags(virq, IRQF_VALID);
 
 	return 0;
 }
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c
index eaee2c2..2670fb0 100644
--- a/arch/arm/mach-pxa/lpd270.c
+++ b/arch/arm/mach-pxa/lpd270.c
@@ -151,7 +151,7 @@ static void __init lpd270_init_irq(void)
 	for (irq = LPD270_IRQ(2); irq <= LPD270_IRQ(4); irq++) {
 		irq_set_chip_and_handler(irq, &lpd270_irq_chip,
 					 handle_level_irq);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 	irq_set_chained_handler(PXA_GPIO_TO_IRQ(0), lpd270_irq_handler);
 	irq_set_irq_type(PXA_GPIO_TO_IRQ(0), IRQ_TYPE_EDGE_FALLING);
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c
index 2897da2..86e01bf 100644
--- a/arch/arm/mach-pxa/pcm990-baseboard.c
+++ b/arch/arm/mach-pxa/pcm990-baseboard.c
@@ -311,7 +311,7 @@ static void __init pcm990_init_irq(void)
 	for (irq = PCM027_IRQ(0); irq <= PCM027_IRQ(3); irq++) {
 		irq_set_chip_and_handler(irq, &pcm990_irq_chip,
 					 handle_level_irq);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	/* disable all Interrupts */
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index edcbd9c..0397800 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -381,7 +381,7 @@ static void __init pxa_init_ext_wakeup_irq(int (*fn)(struct irq_data *,
 	for (irq = IRQ_WAKEUP0; irq <= IRQ_WAKEUP1; irq++) {
 		irq_set_chip_and_handler(irq, &pxa_ext_wakeup_chip,
 					 handle_edge_irq);
-		set_irq_flags(irq, IRQF_VALID);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST);
 	}
 
 	pxa_ext_wakeup_chip.irq_set_wake = fn;
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c
index de3b080..dae3de8 100644
--- a/arch/arm/mach-pxa/viper.c
+++ b/arch/arm/mach-pxa/viper.c
@@ -313,7 +313,7 @@ static void __init viper_init_irq(void)
 		isa_irq = viper_bit_to_irq(level);
 		irq_set_chip_and_handler(isa_irq, &viper_irq_chip,
 					 handle_edge_irq);
-		set_irq_flags(isa_irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(isa_irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	irq_set_chained_handler(gpio_to_irq(VIPER_CPLD_GPIO),
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c
index ac2ae5c..48dd5bd 100644
--- a/arch/arm/mach-pxa/zeus.c
+++ b/arch/arm/mach-pxa/zeus.c
@@ -151,7 +151,7 @@ static void __init zeus_init_irq(void)
 		isa_irq = zeus_bit_to_irq(level);
 		irq_set_chip_and_handler(isa_irq, &zeus_irq_chip,
 					 handle_edge_irq);
-		set_irq_flags(isa_irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(isa_irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	irq_set_irq_type(gpio_to_irq(ZEUS_ISA_GPIO), IRQ_TYPE_EDGE_RISING);
diff --git a/arch/arm/mach-rpc/ecard.c b/arch/arm/mach-rpc/ecard.c
index fcb1d59..f726d4c 100644
--- a/arch/arm/mach-rpc/ecard.c
+++ b/arch/arm/mach-rpc/ecard.c
@@ -946,7 +946,7 @@ static int __init ecard_probe(int slot, unsigned irq, card_type_t type)
 		irq_set_chip_and_handler(ec->irq, &ecard_chip,
 					 handle_level_irq);
 		irq_set_chip_data(ec->irq, ec);
-		set_irq_flags(ec->irq, IRQF_VALID);
+		irq_clear_status_flags(ec->irq, IRQ_NOREQUEST);
 	}
 
 #ifdef CONFIG_ARCH_RPC
diff --git a/arch/arm/mach-rpc/irq.c b/arch/arm/mach-rpc/irq.c
index 3e4fa84..66502e6 100644
--- a/arch/arm/mach-rpc/irq.c
+++ b/arch/arm/mach-rpc/irq.c
@@ -117,7 +117,7 @@ extern unsigned char rpc_default_fiq_start, rpc_default_fiq_end;
 
 void __init rpc_init_irq(void)
 {
-	unsigned int irq, flags;
+	unsigned int irq, clr, set = 0;
 
 	iomd_writeb(0, IOMD_IRQMASKA);
 	iomd_writeb(0, IOMD_IRQMASKB);
@@ -128,37 +128,37 @@ void __init rpc_init_irq(void)
 		&rpc_default_fiq_end - &rpc_default_fiq_start);
 
 	for (irq = 0; irq < NR_IRQS; irq++) {
-		flags = IRQF_VALID;
+		clr = IRQ_NOREQUEST;
 
 		if (irq <= 6 || (irq >= 9 && irq <= 15))
-			flags |= IRQF_PROBE;
+			clr |= IRQ_NOPROBE;
 
 		if (irq == 21 || (irq >= 16 && irq <= 19) ||
 		    irq == IRQ_KEYBOARDTX)
-			flags |= IRQF_NOAUTOEN;
+			set |= IRQ_NOAUTOEN;
 
 		switch (irq) {
 		case 0 ... 7:
 			irq_set_chip_and_handler(irq, &iomd_a_chip,
 						 handle_level_irq);
-			set_irq_flags(irq, flags);
+			irq_modify_status(irq, clr, set);
 			break;
 
 		case 8 ... 15:
 			irq_set_chip_and_handler(irq, &iomd_b_chip,
 						 handle_level_irq);
-			set_irq_flags(irq, flags);
+			irq_modify_status(irq, clr, set);
 			break;
 
 		case 16 ... 21:
 			irq_set_chip_and_handler(irq, &iomd_dma_chip,
 						 handle_level_irq);
-			set_irq_flags(irq, flags);
+			irq_modify_status(irq, clr, set);
 			break;
 
 		case 64 ... 71:
 			irq_set_chip(irq, &iomd_fiq_chip);
-			set_irq_flags(irq, IRQF_VALID);
+			irq_modify_status(irq, clr, set);
 			break;
 		}
 	}
diff --git a/arch/arm/mach-s3c24xx/bast-irq.c b/arch/arm/mach-s3c24xx/bast-irq.c
index cb1b791..ced1ab8 100644
--- a/arch/arm/mach-s3c24xx/bast-irq.c
+++ b/arch/arm/mach-s3c24xx/bast-irq.c
@@ -147,7 +147,7 @@ static __init int bast_irq_init(void)
 
 			irq_set_chip_and_handler(irqno, &bast_pc104_chip,
 						 handle_level_irq);
-			set_irq_flags(irqno, IRQF_VALID);
+			irq_clear_status_flags(irqno, IRQ_NOREQUEST);
 		}
 	}
 
diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c
index 16547f2..06ba943 100644
--- a/arch/arm/mach-s3c64xx/common.c
+++ b/arch/arm/mach-s3c64xx/common.c
@@ -420,7 +420,7 @@ static int __init s3c64xx_init_irq_eint(void)
 	for (irq = IRQ_EINT(0); irq <= IRQ_EINT(27); irq++) {
 		irq_set_chip_and_handler(irq, &s3c_irq_eint, handle_level_irq);
 		irq_set_chip_data(irq, (void *)eint_irq_to_bit(irq));
-		set_irq_flags(irq, IRQF_VALID);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST);
 	}
 
 	irq_set_chained_handler(IRQ_EINT0_3, s3c_irq_demux_eint0_3);
diff --git a/arch/arm/mach-sa1100/irq.c b/arch/arm/mach-sa1100/irq.c
index 65aebfa..4f1d1e9 100644
--- a/arch/arm/mach-sa1100/irq.c
+++ b/arch/arm/mach-sa1100/irq.c
@@ -68,7 +68,6 @@ static int sa1100_normal_irqdomain_map(struct irq_domain *d,
 {
 	irq_set_chip_and_handler(irq, &sa1100_normal_chip,
 				 handle_level_irq);
-	set_irq_flags(irq, IRQF_VALID);
 
 	return 0;
 }
diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c
index af868d25..4491d31 100644
--- a/arch/arm/mach-sa1100/neponset.c
+++ b/arch/arm/mach-sa1100/neponset.c
@@ -320,10 +320,10 @@ static int neponset_probe(struct platform_device *dev)
 
 	irq_set_chip_and_handler(d->irq_base + NEP_IRQ_SMC91X, &nochip,
 		handle_simple_irq);
-	set_irq_flags(d->irq_base + NEP_IRQ_SMC91X, IRQF_VALID | IRQF_PROBE);
+	irq_clear_status_flags(d->irq_base + NEP_IRQ_SMC91X, IRQ_NOREQUEST | IRQ_NOPROBE);
 	irq_set_chip_and_handler(d->irq_base + NEP_IRQ_USAR, &nochip,
 		handle_simple_irq);
-	set_irq_flags(d->irq_base + NEP_IRQ_USAR, IRQF_VALID | IRQF_PROBE);
+	irq_clear_status_flags(d->irq_base + NEP_IRQ_USAR, IRQ_NOREQUEST | IRQ_NOPROBE);
 	irq_set_chip(d->irq_base + NEP_IRQ_SA1111, &nochip);
 
 	irq_set_irq_type(irq, IRQ_TYPE_EDGE_RISING);
diff --git a/arch/arm/mach-w90x900/irq.c b/arch/arm/mach-w90x900/irq.c
index d66d43a..491b317 100644
--- a/arch/arm/mach-w90x900/irq.c
+++ b/arch/arm/mach-w90x900/irq.c
@@ -211,6 +211,6 @@ void __init nuc900_init_irq(void)
 	for (irqno = IRQ_WDT; irqno <= IRQ_ADC; irqno++) {
 		irq_set_chip_and_handler(irqno, &nuc900_irq_chip,
 					 handle_level_irq);
-		set_irq_flags(irqno, IRQF_VALID);
+		irq_clear_status_flags(irqno, IRQ_NOREQUEST);
 	}
 }
-- 
2.1.0

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

* [PATCH 01/15] ARM: kill off set_irq_flags usage
@ 2015-06-09 18:26   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: linux-arm-kernel

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: Krzysztof Halasa <khalasa@piap.pl>
Cc: Greg Ungerer <gerg@uclinux.org>
Cc: Roland Stigge <stigge@antcom.de>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Daniel Mack <daniel@zonque.org>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Simtec Linux Team <linux@simtec.co.uk>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Wan ZongShun <mcuos.com@gmail.com>
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-omap at vger.kernel.org
Cc: linux-samsung-soc at vger.kernel.org
---
 arch/arm/common/it8152.c             |  2 +-
 arch/arm/common/locomo.c             |  2 +-
 arch/arm/common/sa1111.c             |  4 ++--
 arch/arm/mach-davinci/cp_intc.c      |  2 +-
 arch/arm/mach-dove/irq.c             |  2 +-
 arch/arm/mach-ebsa110/core.c         |  2 +-
 arch/arm/mach-footbridge/common.c    |  2 +-
 arch/arm/mach-footbridge/isa-irq.c   |  8 ++++----
 arch/arm/mach-gemini/gpio.c          |  2 +-
 arch/arm/mach-gemini/irq.c           |  2 +-
 arch/arm/mach-imx/3ds_debugboard.c   |  2 +-
 arch/arm/mach-imx/mach-mx31ads.c     |  2 +-
 arch/arm/mach-iop13xx/irq.c          |  2 +-
 arch/arm/mach-iop32x/irq.c           |  2 +-
 arch/arm/mach-iop33x/irq.c           |  2 +-
 arch/arm/mach-ixp4xx/common.c        |  2 +-
 arch/arm/mach-ks8695/irq.c           |  2 +-
 arch/arm/mach-lpc32xx/irq.c          |  2 +-
 arch/arm/mach-netx/generic.c         |  2 +-
 arch/arm/mach-omap1/fpga.c           |  2 +-
 arch/arm/mach-omap1/irq.c            |  2 +-
 arch/arm/mach-pxa/balloon3.c         |  2 +-
 arch/arm/mach-pxa/irq.c              |  1 -
 arch/arm/mach-pxa/lpd270.c           |  2 +-
 arch/arm/mach-pxa/pcm990-baseboard.c |  2 +-
 arch/arm/mach-pxa/pxa3xx.c           |  2 +-
 arch/arm/mach-pxa/viper.c            |  2 +-
 arch/arm/mach-pxa/zeus.c             |  2 +-
 arch/arm/mach-rpc/ecard.c            |  2 +-
 arch/arm/mach-rpc/irq.c              | 16 ++++++++--------
 arch/arm/mach-s3c24xx/bast-irq.c     |  2 +-
 arch/arm/mach-s3c64xx/common.c       |  2 +-
 arch/arm/mach-sa1100/irq.c           |  1 -
 arch/arm/mach-sa1100/neponset.c      |  4 ++--
 arch/arm/mach-w90x900/irq.c          |  2 +-
 35 files changed, 45 insertions(+), 47 deletions(-)

diff --git a/arch/arm/common/it8152.c b/arch/arm/common/it8152.c
index 5114b68..96dabcb 100644
--- a/arch/arm/common/it8152.c
+++ b/arch/arm/common/it8152.c
@@ -91,7 +91,7 @@ void it8152_init_irq(void)
 	for (irq = IT8152_IRQ(0); irq <= IT8152_LAST_IRQ; irq++) {
 		irq_set_chip_and_handler(irq, &it8152_irq_chip,
 					 handle_level_irq);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 }
 
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
index b55c362..339fc41 100644
--- a/arch/arm/common/locomo.c
+++ b/arch/arm/common/locomo.c
@@ -205,7 +205,7 @@ static void locomo_setup_irq(struct locomo *lchip)
 	for ( ; irq <= lchip->irq_base + 3; irq++) {
 		irq_set_chip_and_handler(irq, &locomo_chip, handle_level_irq);
 		irq_set_chip_data(irq, lchip);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 }
 
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index 5cc779c..139aa3c 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -486,7 +486,7 @@ static int sa1111_setup_irq(struct sa1111 *sachip, unsigned irq_base)
 		irq_set_chip_and_handler(irq, &sa1111_low_chip,
 					 handle_edge_irq);
 		irq_set_chip_data(irq, sachip);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	for (i = AUDXMTDMADONEA; i <= IRQ_S1_BVD1_STSCHG; i++) {
@@ -494,7 +494,7 @@ static int sa1111_setup_irq(struct sa1111 *sachip, unsigned irq_base)
 		irq_set_chip_and_handler(irq, &sa1111_high_chip,
 					 handle_edge_irq);
 		irq_set_chip_data(irq, sachip);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	/*
diff --git a/arch/arm/mach-davinci/cp_intc.c b/arch/arm/mach-davinci/cp_intc.c
index 006dae8df..3f683fd 100644
--- a/arch/arm/mach-davinci/cp_intc.c
+++ b/arch/arm/mach-davinci/cp_intc.c
@@ -112,7 +112,7 @@ static int cp_intc_host_map(struct irq_domain *h, unsigned int virq,
 	pr_debug("cp_intc_host_map(%d, 0x%lx)\n", virq, hw);
 
 	irq_set_chip(virq, &cp_intc_irq_chip);
-	set_irq_flags(virq, IRQF_VALID | IRQF_PROBE);
+	irq_set_noprobe(virq);
 	irq_set_handler(virq, handle_edge_irq);
 	return 0;
 }
diff --git a/arch/arm/mach-dove/irq.c b/arch/arm/mach-dove/irq.c
index 4a5a7ae..e2a940b 100644
--- a/arch/arm/mach-dove/irq.c
+++ b/arch/arm/mach-dove/irq.c
@@ -172,7 +172,7 @@ void __init dove_init_irq(void)
 	for (i = IRQ_DOVE_PMU_START; i < NR_IRQS; i++) {
 		irq_set_chip_and_handler(i, &pmu_irq_chip, handle_level_irq);
 		irq_set_status_flags(i, IRQ_LEVEL);
-		set_irq_flags(i, IRQF_VALID);
+		irq_clear_status_flags(i, IRQ_NOREQUEST);
 	}
 	irq_set_chained_handler(IRQ_DOVE_PMU, pmu_irq_handler);
 }
diff --git a/arch/arm/mach-ebsa110/core.c b/arch/arm/mach-ebsa110/core.c
index 8254e71..688e5fe 100644
--- a/arch/arm/mach-ebsa110/core.c
+++ b/arch/arm/mach-ebsa110/core.c
@@ -65,7 +65,7 @@ static void __init ebsa110_init_irq(void)
 	for (irq = 0; irq < NR_IRQS; irq++) {
 		irq_set_chip_and_handler(irq, &ebsa110_irq_chip,
 					 handle_level_irq);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 }
 
diff --git a/arch/arm/mach-footbridge/common.c b/arch/arm/mach-footbridge/common.c
index 9e8220e..0f0c9e0 100644
--- a/arch/arm/mach-footbridge/common.c
+++ b/arch/arm/mach-footbridge/common.c
@@ -106,7 +106,7 @@ static void __init __fb_init_irq(void)
 
 	for (irq = _DC21285_IRQ(0); irq < _DC21285_IRQ(20); irq++) {
 		irq_set_chip_and_handler(irq, &fb_chip, handle_level_irq);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 }
 
diff --git a/arch/arm/mach-footbridge/isa-irq.c b/arch/arm/mach-footbridge/isa-irq.c
index c3a0abb..fcd79bc 100644
--- a/arch/arm/mach-footbridge/isa-irq.c
+++ b/arch/arm/mach-footbridge/isa-irq.c
@@ -153,13 +153,13 @@ void __init isa_init_irq(unsigned int host_irq)
 		for (irq = _ISA_IRQ(0); irq < _ISA_IRQ(8); irq++) {
 			irq_set_chip_and_handler(irq, &isa_lo_chip,
 						 handle_level_irq);
-			set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+			irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 		}
 
 		for (irq = _ISA_IRQ(8); irq < _ISA_IRQ(16); irq++) {
 			irq_set_chip_and_handler(irq, &isa_hi_chip,
 						 handle_level_irq);
-			set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+			irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 		}
 
 		request_resource(&ioport_resource, &pic1_resource);
@@ -175,8 +175,8 @@ void __init isa_init_irq(unsigned int host_irq)
 		 * resistor on this line.
 		 */
 		if (machine_is_netwinder())
-			set_irq_flags(_ISA_IRQ(11), IRQF_VALID |
-				      IRQF_PROBE | IRQF_NOAUTOEN);
+			irq_modify_status(_ISA_IRQ(11),
+				IRQ_NOREQUEST | IRQ_NOPROBE, IRQ_NOAUTOEN);
 	}
 }
 
diff --git a/arch/arm/mach-gemini/gpio.c b/arch/arm/mach-gemini/gpio.c
index f8cb571..84e301f 100644
--- a/arch/arm/mach-gemini/gpio.c
+++ b/arch/arm/mach-gemini/gpio.c
@@ -220,7 +220,7 @@ void __init gemini_gpio_init(void)
 		     j < GPIO_IRQ_BASE + (i + 1) * 32; j++) {
 			irq_set_chip_and_handler(j, &gpio_irq_chip,
 						 handle_edge_irq);
-			set_irq_flags(j, IRQF_VALID);
+			irq_clear_status_flags(j, IRQ_NOREQUEST);
 		}
 
 		irq_set_chained_handler(IRQ_GPIO(i), gpio_irq_handler);
diff --git a/arch/arm/mach-gemini/irq.c b/arch/arm/mach-gemini/irq.c
index 44f50dc..d929b3f 100644
--- a/arch/arm/mach-gemini/irq.c
+++ b/arch/arm/mach-gemini/irq.c
@@ -92,7 +92,7 @@ void __init gemini_init_irq(void)
 		} else {			
 			irq_set_handler(i, handle_level_irq);
 		}
-		set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(i, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	/* Disable all interrupts */
diff --git a/arch/arm/mach-imx/3ds_debugboard.c b/arch/arm/mach-imx/3ds_debugboard.c
index 1343773..45903be 100644
--- a/arch/arm/mach-imx/3ds_debugboard.c
+++ b/arch/arm/mach-imx/3ds_debugboard.c
@@ -195,7 +195,7 @@ int __init mxc_expio_init(u32 base, u32 intr_gpio)
 
 	for (i = irq_base; i < irq_base + MXC_MAX_EXP_IO_LINES; i++) {
 		irq_set_chip_and_handler(i, &expio_irq_chip, handle_level_irq);
-		set_irq_flags(i, IRQF_VALID);
+		irq_clear_status_flags(i, IRQ_NOREQUEST);
 	}
 	irq_set_irq_type(p_irq, IRQF_TRIGGER_LOW);
 	irq_set_chained_handler(p_irq, mxc_expio_irq_handler);
diff --git a/arch/arm/mach-imx/mach-mx31ads.c b/arch/arm/mach-imx/mach-mx31ads.c
index d08c37c..2c08535 100644
--- a/arch/arm/mach-imx/mach-mx31ads.c
+++ b/arch/arm/mach-imx/mach-mx31ads.c
@@ -238,7 +238,7 @@ static void __init mx31ads_init_expio(void)
 
 	for (i = irq_base; i < irq_base + MXC_MAX_EXP_IO_LINES; i++) {
 		irq_set_chip_and_handler(i, &expio_irq_chip, handle_level_irq);
-		set_irq_flags(i, IRQF_VALID);
+		irq_clear_status_flags(i, IRQ_NOREQUEST);
 	}
 	irq = gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_4));
 	irq_set_irq_type(irq, IRQ_TYPE_LEVEL_HIGH);
diff --git a/arch/arm/mach-iop13xx/irq.c b/arch/arm/mach-iop13xx/irq.c
index bc73970..623d85a 100644
--- a/arch/arm/mach-iop13xx/irq.c
+++ b/arch/arm/mach-iop13xx/irq.c
@@ -233,7 +233,7 @@ void __init iop13xx_init_irq(void)
 			irq_set_chip(i, &iop13xx_irqchip4);
 
 		irq_set_handler(i, handle_level_irq);
-		set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(i, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	iop13xx_msi_init();
diff --git a/arch/arm/mach-iop32x/irq.c b/arch/arm/mach-iop32x/irq.c
index d7ee278..2d1f69a 100644
--- a/arch/arm/mach-iop32x/irq.c
+++ b/arch/arm/mach-iop32x/irq.c
@@ -69,6 +69,6 @@ void __init iop32x_init_irq(void)
 
 	for (i = 0; i < NR_IRQS; i++) {
 		irq_set_chip_and_handler(i, &ext_chip, handle_level_irq);
-		set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(i, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 }
diff --git a/arch/arm/mach-iop33x/irq.c b/arch/arm/mach-iop33x/irq.c
index f7f5d3e..c99ec8d 100644
--- a/arch/arm/mach-iop33x/irq.c
+++ b/arch/arm/mach-iop33x/irq.c
@@ -113,6 +113,6 @@ void __init iop33x_init_irq(void)
 		irq_set_chip_and_handler(i,
 					 (i < 32) ? &iop33x_irqchip1 : &iop33x_irqchip2,
 					 handle_level_irq);
-		set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(i, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 }
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index 8537d4c..0f3f01a 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -296,7 +296,7 @@ void __init ixp4xx_init_irq(void)
 	for(i = 0; i < NR_IRQS; i++) {
 		irq_set_chip_and_handler(i, &ixp4xx_irq_chip,
 					 handle_level_irq);
-		set_irq_flags(i, IRQF_VALID);
+		irq_clear_status_flags(i, IRQ_NOREQUEST);
 	}
 }
 
diff --git a/arch/arm/mach-ks8695/irq.c b/arch/arm/mach-ks8695/irq.c
index 76802aa..31439f2 100644
--- a/arch/arm/mach-ks8695/irq.c
+++ b/arch/arm/mach-ks8695/irq.c
@@ -172,6 +172,6 @@ void __init ks8695_init_irq(void)
 							 handle_edge_irq);
 		}
 
-		set_irq_flags(irq, IRQF_VALID);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST);
 	}
 }
diff --git a/arch/arm/mach-lpc32xx/irq.c b/arch/arm/mach-lpc32xx/irq.c
index 9ecb8f9..39f3d81 100644
--- a/arch/arm/mach-lpc32xx/irq.c
+++ b/arch/arm/mach-lpc32xx/irq.c
@@ -434,7 +434,7 @@ void __init lpc32xx_init_irq(void)
 	for (i = 0; i < NR_IRQS; i++) {
 		irq_set_chip_and_handler(i, &lpc32xx_irq_chip,
 					 handle_level_irq);
-		set_irq_flags(i, IRQF_VALID);
+		irq_clear_status_flags(i, IRQ_NOREQUEST);
 	}
 
 	/* Set default mappings */
diff --git a/arch/arm/mach-netx/generic.c b/arch/arm/mach-netx/generic.c
index db25b0c..6373e2b 100644
--- a/arch/arm/mach-netx/generic.c
+++ b/arch/arm/mach-netx/generic.c
@@ -174,7 +174,7 @@ void __init netx_init_irq(void)
 	for (irq = NETX_IRQ_HIF_CHAINED(0); irq <= NETX_IRQ_HIF_LAST; irq++) {
 		irq_set_chip_and_handler(irq, &netx_hif_chip,
 					 handle_level_irq);
-		set_irq_flags(irq, IRQF_VALID);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST);
 	}
 
 	writel(NETX_DPMAS_INT_EN_GLB_EN, NETX_DPMAS_INT_EN);
diff --git a/arch/arm/mach-omap1/fpga.c b/arch/arm/mach-omap1/fpga.c
index 3c0e422..dfec671 100644
--- a/arch/arm/mach-omap1/fpga.c
+++ b/arch/arm/mach-omap1/fpga.c
@@ -169,7 +169,7 @@ void omap1510_fpga_init_irq(void)
 		}
 
 		irq_set_handler(i, handle_edge_irq);
-		set_irq_flags(i, IRQF_VALID);
+		irq_clear_status_flags(i, IRQ_NOREQUEST);
 	}
 
 	/*
diff --git a/arch/arm/mach-omap1/irq.c b/arch/arm/mach-omap1/irq.c
index a8a533d..1af7dd9 100644
--- a/arch/arm/mach-omap1/irq.c
+++ b/arch/arm/mach-omap1/irq.c
@@ -230,7 +230,7 @@ void __init omap1_init_irq(void)
 
 			irq_set_chip_and_handler(j, &omap_irq_chip,
 						 handle_level_irq);
-			set_irq_flags(j, IRQF_VALID);
+			irq_clear_status_flags(j, IRQ_NOREQUEST);
 		}
 	}
 
diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c
index d897292..09b9a36 100644
--- a/arch/arm/mach-pxa/balloon3.c
+++ b/arch/arm/mach-pxa/balloon3.c
@@ -528,7 +528,7 @@ static void __init balloon3_init_irq(void)
 	for (irq = BALLOON3_IRQ(0); irq <= BALLOON3_IRQ(7); irq++) {
 		irq_set_chip_and_handler(irq, &balloon3_irq_chip,
 					 handle_level_irq);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	irq_set_chained_handler(BALLOON3_AUX_NIRQ, balloon3_irq_handler);
diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
index 89a7c06..3a4a116 100644
--- a/arch/arm/mach-pxa/irq.c
+++ b/arch/arm/mach-pxa/irq.c
@@ -133,7 +133,6 @@ static int pxa_irq_map(struct irq_domain *h, unsigned int virq,
 	irq_set_chip_and_handler(virq, &pxa_internal_irq_chip,
 				 handle_level_irq);
 	irq_set_chip_data(virq, base);
-	set_irq_flags(virq, IRQF_VALID);
 
 	return 0;
 }
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c
index eaee2c2..2670fb0 100644
--- a/arch/arm/mach-pxa/lpd270.c
+++ b/arch/arm/mach-pxa/lpd270.c
@@ -151,7 +151,7 @@ static void __init lpd270_init_irq(void)
 	for (irq = LPD270_IRQ(2); irq <= LPD270_IRQ(4); irq++) {
 		irq_set_chip_and_handler(irq, &lpd270_irq_chip,
 					 handle_level_irq);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 	irq_set_chained_handler(PXA_GPIO_TO_IRQ(0), lpd270_irq_handler);
 	irq_set_irq_type(PXA_GPIO_TO_IRQ(0), IRQ_TYPE_EDGE_FALLING);
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c
index 2897da2..86e01bf 100644
--- a/arch/arm/mach-pxa/pcm990-baseboard.c
+++ b/arch/arm/mach-pxa/pcm990-baseboard.c
@@ -311,7 +311,7 @@ static void __init pcm990_init_irq(void)
 	for (irq = PCM027_IRQ(0); irq <= PCM027_IRQ(3); irq++) {
 		irq_set_chip_and_handler(irq, &pcm990_irq_chip,
 					 handle_level_irq);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	/* disable all Interrupts */
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index edcbd9c..0397800 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -381,7 +381,7 @@ static void __init pxa_init_ext_wakeup_irq(int (*fn)(struct irq_data *,
 	for (irq = IRQ_WAKEUP0; irq <= IRQ_WAKEUP1; irq++) {
 		irq_set_chip_and_handler(irq, &pxa_ext_wakeup_chip,
 					 handle_edge_irq);
-		set_irq_flags(irq, IRQF_VALID);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST);
 	}
 
 	pxa_ext_wakeup_chip.irq_set_wake = fn;
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c
index de3b080..dae3de8 100644
--- a/arch/arm/mach-pxa/viper.c
+++ b/arch/arm/mach-pxa/viper.c
@@ -313,7 +313,7 @@ static void __init viper_init_irq(void)
 		isa_irq = viper_bit_to_irq(level);
 		irq_set_chip_and_handler(isa_irq, &viper_irq_chip,
 					 handle_edge_irq);
-		set_irq_flags(isa_irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(isa_irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	irq_set_chained_handler(gpio_to_irq(VIPER_CPLD_GPIO),
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c
index ac2ae5c..48dd5bd 100644
--- a/arch/arm/mach-pxa/zeus.c
+++ b/arch/arm/mach-pxa/zeus.c
@@ -151,7 +151,7 @@ static void __init zeus_init_irq(void)
 		isa_irq = zeus_bit_to_irq(level);
 		irq_set_chip_and_handler(isa_irq, &zeus_irq_chip,
 					 handle_edge_irq);
-		set_irq_flags(isa_irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(isa_irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	irq_set_irq_type(gpio_to_irq(ZEUS_ISA_GPIO), IRQ_TYPE_EDGE_RISING);
diff --git a/arch/arm/mach-rpc/ecard.c b/arch/arm/mach-rpc/ecard.c
index fcb1d59..f726d4c 100644
--- a/arch/arm/mach-rpc/ecard.c
+++ b/arch/arm/mach-rpc/ecard.c
@@ -946,7 +946,7 @@ static int __init ecard_probe(int slot, unsigned irq, card_type_t type)
 		irq_set_chip_and_handler(ec->irq, &ecard_chip,
 					 handle_level_irq);
 		irq_set_chip_data(ec->irq, ec);
-		set_irq_flags(ec->irq, IRQF_VALID);
+		irq_clear_status_flags(ec->irq, IRQ_NOREQUEST);
 	}
 
 #ifdef CONFIG_ARCH_RPC
diff --git a/arch/arm/mach-rpc/irq.c b/arch/arm/mach-rpc/irq.c
index 3e4fa84..66502e6 100644
--- a/arch/arm/mach-rpc/irq.c
+++ b/arch/arm/mach-rpc/irq.c
@@ -117,7 +117,7 @@ extern unsigned char rpc_default_fiq_start, rpc_default_fiq_end;
 
 void __init rpc_init_irq(void)
 {
-	unsigned int irq, flags;
+	unsigned int irq, clr, set = 0;
 
 	iomd_writeb(0, IOMD_IRQMASKA);
 	iomd_writeb(0, IOMD_IRQMASKB);
@@ -128,37 +128,37 @@ void __init rpc_init_irq(void)
 		&rpc_default_fiq_end - &rpc_default_fiq_start);
 
 	for (irq = 0; irq < NR_IRQS; irq++) {
-		flags = IRQF_VALID;
+		clr = IRQ_NOREQUEST;
 
 		if (irq <= 6 || (irq >= 9 && irq <= 15))
-			flags |= IRQF_PROBE;
+			clr |= IRQ_NOPROBE;
 
 		if (irq == 21 || (irq >= 16 && irq <= 19) ||
 		    irq == IRQ_KEYBOARDTX)
-			flags |= IRQF_NOAUTOEN;
+			set |= IRQ_NOAUTOEN;
 
 		switch (irq) {
 		case 0 ... 7:
 			irq_set_chip_and_handler(irq, &iomd_a_chip,
 						 handle_level_irq);
-			set_irq_flags(irq, flags);
+			irq_modify_status(irq, clr, set);
 			break;
 
 		case 8 ... 15:
 			irq_set_chip_and_handler(irq, &iomd_b_chip,
 						 handle_level_irq);
-			set_irq_flags(irq, flags);
+			irq_modify_status(irq, clr, set);
 			break;
 
 		case 16 ... 21:
 			irq_set_chip_and_handler(irq, &iomd_dma_chip,
 						 handle_level_irq);
-			set_irq_flags(irq, flags);
+			irq_modify_status(irq, clr, set);
 			break;
 
 		case 64 ... 71:
 			irq_set_chip(irq, &iomd_fiq_chip);
-			set_irq_flags(irq, IRQF_VALID);
+			irq_modify_status(irq, clr, set);
 			break;
 		}
 	}
diff --git a/arch/arm/mach-s3c24xx/bast-irq.c b/arch/arm/mach-s3c24xx/bast-irq.c
index cb1b791..ced1ab8 100644
--- a/arch/arm/mach-s3c24xx/bast-irq.c
+++ b/arch/arm/mach-s3c24xx/bast-irq.c
@@ -147,7 +147,7 @@ static __init int bast_irq_init(void)
 
 			irq_set_chip_and_handler(irqno, &bast_pc104_chip,
 						 handle_level_irq);
-			set_irq_flags(irqno, IRQF_VALID);
+			irq_clear_status_flags(irqno, IRQ_NOREQUEST);
 		}
 	}
 
diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c
index 16547f2..06ba943 100644
--- a/arch/arm/mach-s3c64xx/common.c
+++ b/arch/arm/mach-s3c64xx/common.c
@@ -420,7 +420,7 @@ static int __init s3c64xx_init_irq_eint(void)
 	for (irq = IRQ_EINT(0); irq <= IRQ_EINT(27); irq++) {
 		irq_set_chip_and_handler(irq, &s3c_irq_eint, handle_level_irq);
 		irq_set_chip_data(irq, (void *)eint_irq_to_bit(irq));
-		set_irq_flags(irq, IRQF_VALID);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST);
 	}
 
 	irq_set_chained_handler(IRQ_EINT0_3, s3c_irq_demux_eint0_3);
diff --git a/arch/arm/mach-sa1100/irq.c b/arch/arm/mach-sa1100/irq.c
index 65aebfa..4f1d1e9 100644
--- a/arch/arm/mach-sa1100/irq.c
+++ b/arch/arm/mach-sa1100/irq.c
@@ -68,7 +68,6 @@ static int sa1100_normal_irqdomain_map(struct irq_domain *d,
 {
 	irq_set_chip_and_handler(irq, &sa1100_normal_chip,
 				 handle_level_irq);
-	set_irq_flags(irq, IRQF_VALID);
 
 	return 0;
 }
diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c
index af868d25..4491d31 100644
--- a/arch/arm/mach-sa1100/neponset.c
+++ b/arch/arm/mach-sa1100/neponset.c
@@ -320,10 +320,10 @@ static int neponset_probe(struct platform_device *dev)
 
 	irq_set_chip_and_handler(d->irq_base + NEP_IRQ_SMC91X, &nochip,
 		handle_simple_irq);
-	set_irq_flags(d->irq_base + NEP_IRQ_SMC91X, IRQF_VALID | IRQF_PROBE);
+	irq_clear_status_flags(d->irq_base + NEP_IRQ_SMC91X, IRQ_NOREQUEST | IRQ_NOPROBE);
 	irq_set_chip_and_handler(d->irq_base + NEP_IRQ_USAR, &nochip,
 		handle_simple_irq);
-	set_irq_flags(d->irq_base + NEP_IRQ_USAR, IRQF_VALID | IRQF_PROBE);
+	irq_clear_status_flags(d->irq_base + NEP_IRQ_USAR, IRQ_NOREQUEST | IRQ_NOPROBE);
 	irq_set_chip(d->irq_base + NEP_IRQ_SA1111, &nochip);
 
 	irq_set_irq_type(irq, IRQ_TYPE_EDGE_RISING);
diff --git a/arch/arm/mach-w90x900/irq.c b/arch/arm/mach-w90x900/irq.c
index d66d43a..491b317 100644
--- a/arch/arm/mach-w90x900/irq.c
+++ b/arch/arm/mach-w90x900/irq.c
@@ -211,6 +211,6 @@ void __init nuc900_init_irq(void)
 	for (irqno = IRQ_WDT; irqno <= IRQ_ADC; irqno++) {
 		irq_set_chip_and_handler(irqno, &nuc900_irq_chip,
 					 handle_level_irq);
-		set_irq_flags(irqno, IRQF_VALID);
+		irq_clear_status_flags(irqno, IRQ_NOREQUEST);
 	}
 }
-- 
2.1.0

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

* [PATCH 02/15] regmap: kill off set_irq_flags usage
  2015-06-09 18:26 ` Rob Herring
@ 2015-06-09 18:26   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: Russell King, linux-arm-kernel
  Cc: linux-kernel, arm, Rob Herring, Mark Brown, Greg Kroah-Hartman

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/base/regmap/regmap-irq.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index a6c3f75..a9cb98a 100644
--- a/drivers/base/regmap/regmap-irq.c
+++ b/drivers/base/regmap/regmap-irq.c
@@ -306,14 +306,7 @@ static int regmap_irq_map(struct irq_domain *h, unsigned int virq,
 	irq_set_chip_data(virq, data);
 	irq_set_chip(virq, &data->irq_chip);
 	irq_set_nested_thread(virq, 1);
-
-	/* ARM needs us to explicitly flag the IRQ as valid
-	 * and will set them noprobe when we do so. */
-#ifdef CONFIG_ARM
-	set_irq_flags(virq, IRQF_VALID);
-#else
 	irq_set_noprobe(virq);
-#endif
 
 	return 0;
 }
-- 
2.1.0


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

* [PATCH 02/15] regmap: kill off set_irq_flags usage
@ 2015-06-09 18:26   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: linux-arm-kernel

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/base/regmap/regmap-irq.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index a6c3f75..a9cb98a 100644
--- a/drivers/base/regmap/regmap-irq.c
+++ b/drivers/base/regmap/regmap-irq.c
@@ -306,14 +306,7 @@ static int regmap_irq_map(struct irq_domain *h, unsigned int virq,
 	irq_set_chip_data(virq, data);
 	irq_set_chip(virq, &data->irq_chip);
 	irq_set_nested_thread(virq, 1);
-
-	/* ARM needs us to explicitly flag the IRQ as valid
-	 * and will set them noprobe when we do so. */
-#ifdef CONFIG_ARM
-	set_irq_flags(virq, IRQF_VALID);
-#else
 	irq_set_noprobe(virq);
-#endif
 
 	return 0;
 }
-- 
2.1.0

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

* [PATCH 03/15] clk: kill off set_irq_flags usage
  2015-06-09 18:26 ` Rob Herring
@ 2015-06-09 18:26   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: Russell King, linux-arm-kernel
  Cc: linux-kernel, arm, Rob Herring, Boris Brezillon, Mike Turquette,
	Stephen Boyd, linux-clk

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: linux-clk@vger.kernel.org
---
 drivers/clk/at91/pmc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/clk/at91/pmc.c b/drivers/clk/at91/pmc.c
index 3f27d21..828b196 100644
--- a/drivers/clk/at91/pmc.c
+++ b/drivers/clk/at91/pmc.c
@@ -125,7 +125,6 @@ static int pmc_irq_map(struct irq_domain *h, unsigned int virq,
 
 	irq_set_chip_and_handler(virq, &pmc_irq,
 				 handle_level_irq);
-	set_irq_flags(virq, IRQF_VALID);
 	irq_set_chip_data(virq, pmc);
 
 	return 0;
-- 
2.1.0


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

* [PATCH 03/15] clk: kill off set_irq_flags usage
@ 2015-06-09 18:26   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: linux-arm-kernel

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: linux-clk at vger.kernel.org
---
 drivers/clk/at91/pmc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/clk/at91/pmc.c b/drivers/clk/at91/pmc.c
index 3f27d21..828b196 100644
--- a/drivers/clk/at91/pmc.c
+++ b/drivers/clk/at91/pmc.c
@@ -125,7 +125,6 @@ static int pmc_irq_map(struct irq_domain *h, unsigned int virq,
 
 	irq_set_chip_and_handler(virq, &pmc_irq,
 				 handle_level_irq);
-	set_irq_flags(virq, IRQF_VALID);
 	irq_set_chip_data(virq, pmc);
 
 	return 0;
-- 
2.1.0

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

* [PATCH 04/15] dma: kill off set_irq_flags usage
  2015-06-09 18:26 ` Rob Herring
@ 2015-06-09 18:26   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: Russell King, linux-arm-kernel
  Cc: linux-kernel, arm, Rob Herring, Dan Williams, Vinod Koul, dmaengine

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: dmaengine@vger.kernel.org
---
 drivers/dma/ipu/ipu_irq.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/dma/ipu/ipu_irq.c b/drivers/dma/ipu/ipu_irq.c
index 2e284a4..667ebba 100644
--- a/drivers/dma/ipu/ipu_irq.c
+++ b/drivers/dma/ipu/ipu_irq.c
@@ -377,9 +377,7 @@ int __init ipu_irq_attach_irq(struct ipu *ipu, struct platform_device *dev)
 		irq_map[i].irq = irq;
 		irq_map[i].source = -EINVAL;
 		irq_set_handler(irq, handle_level_irq);
-#ifdef CONFIG_ARM
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
-#endif
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	irq_set_handler_data(ipu->irq_fn, ipu);
@@ -406,9 +404,7 @@ void ipu_irq_detach_irq(struct ipu *ipu, struct platform_device *dev)
 	irq_set_handler_data(ipu->irq_err, NULL);
 
 	for (irq = irq_base; irq < irq_base + CONFIG_MX3_IPU_IRQS; irq++) {
-#ifdef CONFIG_ARM
-		set_irq_flags(irq, 0);
-#endif
+		irq_set_status_flags(irq, IRQ_NOREQUEST);
 		irq_set_chip(irq, NULL);
 		irq_set_chip_data(irq, NULL);
 	}
-- 
2.1.0


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

* [PATCH 04/15] dma: kill off set_irq_flags usage
@ 2015-06-09 18:26   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: linux-arm-kernel

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: dmaengine at vger.kernel.org
---
 drivers/dma/ipu/ipu_irq.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/dma/ipu/ipu_irq.c b/drivers/dma/ipu/ipu_irq.c
index 2e284a4..667ebba 100644
--- a/drivers/dma/ipu/ipu_irq.c
+++ b/drivers/dma/ipu/ipu_irq.c
@@ -377,9 +377,7 @@ int __init ipu_irq_attach_irq(struct ipu *ipu, struct platform_device *dev)
 		irq_map[i].irq = irq;
 		irq_map[i].source = -EINVAL;
 		irq_set_handler(irq, handle_level_irq);
-#ifdef CONFIG_ARM
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
-#endif
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	irq_set_handler_data(ipu->irq_fn, ipu);
@@ -406,9 +404,7 @@ void ipu_irq_detach_irq(struct ipu *ipu, struct platform_device *dev)
 	irq_set_handler_data(ipu->irq_err, NULL);
 
 	for (irq = irq_base; irq < irq_base + CONFIG_MX3_IPU_IRQS; irq++) {
-#ifdef CONFIG_ARM
-		set_irq_flags(irq, 0);
-#endif
+		irq_set_status_flags(irq, IRQ_NOREQUEST);
 		irq_set_chip(irq, NULL);
 		irq_set_chip_data(irq, NULL);
 	}
-- 
2.1.0

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

* [PATCH 05/15] gpio: kill off set_irq_flags usage
  2015-06-09 18:26 ` Rob Herring
@ 2015-06-09 18:26   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: Russell King, linux-arm-kernel
  Cc: linux-kernel, arm, Rob Herring, Michael Hennerich, Linus Walleij,
	Alexandre Courbot, Ray Jui, Stephen Warren, Thierry Reding,
	linux-gpio, bcm-kernel-feedback-list, linux-tegra

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Michael Hennerich <michael.hennerich@analog.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: Ray Jui <rjui@broadcom.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: linux-gpio@vger.kernel.org
Cc: bcm-kernel-feedback-list@broadcom.com
Cc: linux-tegra@vger.kernel.org
---
 drivers/gpio/gpio-adp5588.c    | 10 +---------
 drivers/gpio/gpio-bcm-kona.c   | 15 ---------------
 drivers/gpio/gpio-davinci.c    |  1 -
 drivers/gpio/gpio-em.c         |  1 -
 drivers/gpio/gpio-ep93xx.c     |  2 +-
 drivers/gpio/gpio-grgpio.c     |  8 --------
 drivers/gpio/gpio-mcp23s08.c   |  4 ----
 drivers/gpio/gpio-msm-v2.c     |  1 -
 drivers/gpio/gpio-pxa.c        |  8 ++++----
 drivers/gpio/gpio-sa1100.c     |  2 +-
 drivers/gpio/gpio-sta2x11.c    |  2 +-
 drivers/gpio/gpio-tegra.c      |  1 -
 drivers/gpio/gpio-timberdale.c |  4 +---
 drivers/gpio/gpiolib.c         |  8 +-------
 14 files changed, 10 insertions(+), 57 deletions(-)

diff --git a/drivers/gpio/gpio-adp5588.c b/drivers/gpio/gpio-adp5588.c
index d3fe6a6..df7bb75 100644
--- a/drivers/gpio/gpio-adp5588.c
+++ b/drivers/gpio/gpio-adp5588.c
@@ -305,15 +305,7 @@ static int adp5588_irq_setup(struct adp5588_gpio *dev)
 		irq_set_chip_and_handler(irq, &adp5588_irq_chip,
 					 handle_level_irq);
 		irq_set_nested_thread(irq, 1);
-#ifdef CONFIG_ARM
-		/*
-		 * ARM needs us to explicitly flag the IRQ as VALID,
-		 * once we do so, it will also set the noprobe.
-		 */
-		set_irq_flags(irq, IRQF_VALID);
-#else
-		irq_set_noprobe(irq);
-#endif
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	ret = request_threaded_irq(client->irq,
diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c
index b164ce8..8247d27 100644
--- a/drivers/gpio/gpio-bcm-kona.c
+++ b/drivers/gpio/gpio-bcm-kona.c
@@ -519,11 +519,7 @@ static int bcm_kona_gpio_irq_map(struct irq_domain *d, unsigned int irq,
 		return ret;
 	irq_set_lockdep_class(irq, &gpio_lock_class);
 	irq_set_chip_and_handler(irq, &bcm_gpio_irq_chip, handle_simple_irq);
-#ifdef CONFIG_ARM
-	set_irq_flags(irq, IRQF_VALID);
-#else
 	irq_set_noprobe(irq);
-#endif
 
 	return 0;
 }
@@ -638,17 +634,6 @@ static int bcm_kona_gpio_probe(struct platform_device *pdev)
 		dev_err(dev, "Couldn't add GPIO chip -- %d\n", ret);
 		goto err_irq_domain;
 	}
-	for (i = 0; i < chip->ngpio; i++) {
-		int irq = bcm_kona_gpio_to_irq(chip, i);
-		irq_set_lockdep_class(irq, &gpio_lock_class);
-		irq_set_chip_and_handler(irq, &bcm_gpio_irq_chip,
-					 handle_simple_irq);
-#ifdef CONFIG_ARM
-		set_irq_flags(irq, IRQF_VALID);
-#else
-		irq_set_noprobe(irq);
-#endif
-	}
 	for (i = 0; i < kona_gpio->num_bank; i++) {
 		bank = &kona_gpio->banks[i];
 		irq_set_chained_handler(bank->irq, bcm_kona_gpio_irq_handler);
diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
index c5e05c8..59020a6 100644
--- a/drivers/gpio/gpio-davinci.c
+++ b/drivers/gpio/gpio-davinci.c
@@ -422,7 +422,6 @@ davinci_gpio_irq_map(struct irq_domain *d, unsigned int irq,
 	irq_set_irq_type(irq, IRQ_TYPE_NONE);
 	irq_set_chip_data(irq, (__force void *)g);
 	irq_set_handler_data(irq, (void *)__gpio_mask(hw));
-	set_irq_flags(irq, IRQF_VALID);
 
 	return 0;
 }
diff --git a/drivers/gpio/gpio-em.c b/drivers/gpio/gpio-em.c
index 3cfcfc6..3a912a6 100644
--- a/drivers/gpio/gpio-em.c
+++ b/drivers/gpio/gpio-em.c
@@ -262,7 +262,6 @@ static int em_gio_irq_domain_map(struct irq_domain *h, unsigned int irq,
 
 	irq_set_chip_data(irq, h->host_data);
 	irq_set_chip_and_handler(irq, &p->irq_chip, handle_level_irq);
-	set_irq_flags(irq, IRQF_VALID); /* kill me now */
 	return 0;
 }
 
diff --git a/drivers/gpio/gpio-ep93xx.c b/drivers/gpio/gpio-ep93xx.c
index 45684f3..4d35fdc 100644
--- a/drivers/gpio/gpio-ep93xx.c
+++ b/drivers/gpio/gpio-ep93xx.c
@@ -234,7 +234,7 @@ static void ep93xx_gpio_init_irq(void)
 	     gpio_irq <= gpio_to_irq(EP93XX_GPIO_LINE_MAX_IRQ); ++gpio_irq) {
 		irq_set_chip_and_handler(gpio_irq, &ep93xx_gpio_irq_chip,
 					 handle_level_irq);
-		set_irq_flags(gpio_irq, IRQF_VALID);
+		irq_clear_status_flags(gpio_irq, IRQ_NOREQUEST);
 	}
 
 	irq_set_chained_handler(IRQ_EP93XX_GPIO_AB,
diff --git a/drivers/gpio/gpio-grgpio.c b/drivers/gpio/gpio-grgpio.c
index 35a0277..6bdb8de 100644
--- a/drivers/gpio/gpio-grgpio.c
+++ b/drivers/gpio/gpio-grgpio.c
@@ -281,12 +281,7 @@ static int grgpio_irq_map(struct irq_domain *d, unsigned int irq,
 	irq_set_chip_data(irq, priv);
 	irq_set_chip_and_handler(irq, &grgpio_irq_chip,
 				 handle_simple_irq);
-	irq_clear_status_flags(irq, IRQ_NOREQUEST);
-#ifdef CONFIG_ARM
-	set_irq_flags(irq, IRQF_VALID);
-#else
 	irq_set_noprobe(irq);
-#endif
 
 	return ret;
 }
@@ -301,9 +296,6 @@ static void grgpio_irq_unmap(struct irq_domain *d, unsigned int irq)
 	int ngpio = priv->bgc.gc.ngpio;
 	int i;
 
-#ifdef CONFIG_ARM
-	set_irq_flags(irq, 0);
-#endif
 	irq_set_chip_and_handler(irq, NULL, NULL);
 	irq_set_chip_data(irq, NULL);
 
diff --git a/drivers/gpio/gpio-mcp23s08.c b/drivers/gpio/gpio-mcp23s08.c
index 2fc7ff8..73db7ec 100644
--- a/drivers/gpio/gpio-mcp23s08.c
+++ b/drivers/gpio/gpio-mcp23s08.c
@@ -507,11 +507,7 @@ static int mcp23s08_irq_setup(struct mcp23s08 *mcp)
 		irq_set_chip_data(irq, mcp);
 		irq_set_chip(irq, &mcp23s08_irq_chip);
 		irq_set_nested_thread(irq, true);
-#ifdef CONFIG_ARM
-		set_irq_flags(irq, IRQF_VALID);
-#else
 		irq_set_noprobe(irq);
-#endif
 	}
 	return 0;
 }
diff --git a/drivers/gpio/gpio-msm-v2.c b/drivers/gpio/gpio-msm-v2.c
index 52ff182..4bbaeb36 100644
--- a/drivers/gpio/gpio-msm-v2.c
+++ b/drivers/gpio/gpio-msm-v2.c
@@ -363,7 +363,6 @@ static int msm_gpio_irq_domain_map(struct irq_domain *d, unsigned int irq,
 	irq_set_lockdep_class(irq, &msm_gpio_lock_class);
 	irq_set_chip_and_handler(irq, &msm_gpio_irq_chip,
 			handle_level_irq);
-	set_irq_flags(irq, IRQF_VALID);
 
 	return 0;
 }
diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c
index cdbbcf0..55a11de 100644
--- a/drivers/gpio/gpio-pxa.c
+++ b/drivers/gpio/gpio-pxa.c
@@ -524,7 +524,7 @@ static int pxa_irq_domain_map(struct irq_domain *d, unsigned int irq,
 {
 	irq_set_chip_and_handler(irq, &pxa_muxed_gpio_chip,
 				 handle_edge_irq);
-	set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+	irq_set_noprobe(irq);
 	return 0;
 }
 
@@ -643,20 +643,20 @@ static int pxa_gpio_probe(struct platform_device *pdev)
 			irq = gpio_to_irq(0);
 			irq_set_chip_and_handler(irq, &pxa_muxed_gpio_chip,
 						 handle_edge_irq);
-			set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+			irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 		}
 		if (irq1 > 0) {
 			irq = gpio_to_irq(1);
 			irq_set_chip_and_handler(irq, &pxa_muxed_gpio_chip,
 						 handle_edge_irq);
-			set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+			irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 		}
 
 		for (irq  = gpio_to_irq(gpio_offset);
 			irq <= gpio_to_irq(pxa_last_gpio); irq++) {
 			irq_set_chip_and_handler(irq, &pxa_muxed_gpio_chip,
 						 handle_edge_irq);
-			set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+			irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 		}
 	}
 
diff --git a/drivers/gpio/gpio-sa1100.c b/drivers/gpio/gpio-sa1100.c
index bec397a..dbc67d1 100644
--- a/drivers/gpio/gpio-sa1100.c
+++ b/drivers/gpio/gpio-sa1100.c
@@ -155,7 +155,7 @@ static int sa1100_gpio_irqdomain_map(struct irq_domain *d,
 {
 	irq_set_chip_and_handler(irq, &sa1100_gpio_irq_chip,
 				 handle_edge_irq);
-	set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+	irq_set_noprobe(irq);
 
 	return 0;
 }
diff --git a/drivers/gpio/gpio-sta2x11.c b/drivers/gpio/gpio-sta2x11.c
index 18579ac..55e47828 100644
--- a/drivers/gpio/gpio-sta2x11.c
+++ b/drivers/gpio/gpio-sta2x11.c
@@ -346,7 +346,7 @@ static void gsta_alloc_irq_chip(struct gsta_gpio *chip)
 			i = chip->irq_base + j;
 			irq_set_chip_and_handler(i, &ct->chip, ct->handler);
 			irq_set_chip_data(i, gc);
-			irq_modify_status(i, IRQ_NOREQUEST | IRQ_NOPROBE, 0);
+			irq_clear_status_flags(i, IRQ_NOREQUEST | IRQ_NOPROBE);
 		}
 		gc->irq_cnt = i - gc->irq_base;
 	}
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index 1741981..62fdd5d 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -509,7 +509,6 @@ static int tegra_gpio_probe(struct platform_device *pdev)
 		irq_set_chip_data(irq, bank);
 		irq_set_chip_and_handler(irq, &tegra_gpio_irq_chip,
 					 handle_simple_irq);
-		set_irq_flags(irq, IRQF_VALID);
 	}
 
 	for (i = 0; i < tegra_gpio_bank_count; i++) {
diff --git a/drivers/gpio/gpio-timberdale.c b/drivers/gpio/gpio-timberdale.c
index e8f97e0..166fe1c 100644
--- a/drivers/gpio/gpio-timberdale.c
+++ b/drivers/gpio/gpio-timberdale.c
@@ -294,9 +294,7 @@ static int timbgpio_probe(struct platform_device *pdev)
 		irq_set_chip_and_handler(tgpio->irq_base + i,
 			&timbgpio_irqchip, handle_simple_irq);
 		irq_set_chip_data(tgpio->irq_base + i, tgpio);
-#ifdef CONFIG_ARM
-		set_irq_flags(tgpio->irq_base + i, IRQF_VALID | IRQF_PROBE);
-#endif
+		irq_clear_status_flags(tgpio->irq_base + i, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	irq_set_handler_data(irq, tgpio);
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 6bc612b..efd35c0 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -477,11 +477,8 @@ static int gpiochip_irq_map(struct irq_domain *d, unsigned int irq,
 	/* Chips that can sleep need nested thread handlers */
 	if (chip->can_sleep && !chip->irq_not_threaded)
 		irq_set_nested_thread(irq, 1);
-#ifdef CONFIG_ARM
-	set_irq_flags(irq, IRQF_VALID);
-#else
 	irq_set_noprobe(irq);
-#endif
+
 	/*
 	 * No set-up of the hardware will happen if IRQ_TYPE_NONE
 	 * is passed as default type.
@@ -496,9 +493,6 @@ static void gpiochip_irq_unmap(struct irq_domain *d, unsigned int irq)
 {
 	struct gpio_chip *chip = d->host_data;
 
-#ifdef CONFIG_ARM
-	set_irq_flags(irq, 0);
-#endif
 	if (chip->can_sleep)
 		irq_set_nested_thread(irq, 0);
 	irq_set_chip_and_handler(irq, NULL, NULL);
-- 
2.1.0


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

* [PATCH 05/15] gpio: kill off set_irq_flags usage
@ 2015-06-09 18:26   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: linux-arm-kernel

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Michael Hennerich <michael.hennerich@analog.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: Ray Jui <rjui@broadcom.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: linux-gpio at vger.kernel.org
Cc: bcm-kernel-feedback-list at broadcom.com
Cc: linux-tegra at vger.kernel.org
---
 drivers/gpio/gpio-adp5588.c    | 10 +---------
 drivers/gpio/gpio-bcm-kona.c   | 15 ---------------
 drivers/gpio/gpio-davinci.c    |  1 -
 drivers/gpio/gpio-em.c         |  1 -
 drivers/gpio/gpio-ep93xx.c     |  2 +-
 drivers/gpio/gpio-grgpio.c     |  8 --------
 drivers/gpio/gpio-mcp23s08.c   |  4 ----
 drivers/gpio/gpio-msm-v2.c     |  1 -
 drivers/gpio/gpio-pxa.c        |  8 ++++----
 drivers/gpio/gpio-sa1100.c     |  2 +-
 drivers/gpio/gpio-sta2x11.c    |  2 +-
 drivers/gpio/gpio-tegra.c      |  1 -
 drivers/gpio/gpio-timberdale.c |  4 +---
 drivers/gpio/gpiolib.c         |  8 +-------
 14 files changed, 10 insertions(+), 57 deletions(-)

diff --git a/drivers/gpio/gpio-adp5588.c b/drivers/gpio/gpio-adp5588.c
index d3fe6a6..df7bb75 100644
--- a/drivers/gpio/gpio-adp5588.c
+++ b/drivers/gpio/gpio-adp5588.c
@@ -305,15 +305,7 @@ static int adp5588_irq_setup(struct adp5588_gpio *dev)
 		irq_set_chip_and_handler(irq, &adp5588_irq_chip,
 					 handle_level_irq);
 		irq_set_nested_thread(irq, 1);
-#ifdef CONFIG_ARM
-		/*
-		 * ARM needs us to explicitly flag the IRQ as VALID,
-		 * once we do so, it will also set the noprobe.
-		 */
-		set_irq_flags(irq, IRQF_VALID);
-#else
-		irq_set_noprobe(irq);
-#endif
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	ret = request_threaded_irq(client->irq,
diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c
index b164ce8..8247d27 100644
--- a/drivers/gpio/gpio-bcm-kona.c
+++ b/drivers/gpio/gpio-bcm-kona.c
@@ -519,11 +519,7 @@ static int bcm_kona_gpio_irq_map(struct irq_domain *d, unsigned int irq,
 		return ret;
 	irq_set_lockdep_class(irq, &gpio_lock_class);
 	irq_set_chip_and_handler(irq, &bcm_gpio_irq_chip, handle_simple_irq);
-#ifdef CONFIG_ARM
-	set_irq_flags(irq, IRQF_VALID);
-#else
 	irq_set_noprobe(irq);
-#endif
 
 	return 0;
 }
@@ -638,17 +634,6 @@ static int bcm_kona_gpio_probe(struct platform_device *pdev)
 		dev_err(dev, "Couldn't add GPIO chip -- %d\n", ret);
 		goto err_irq_domain;
 	}
-	for (i = 0; i < chip->ngpio; i++) {
-		int irq = bcm_kona_gpio_to_irq(chip, i);
-		irq_set_lockdep_class(irq, &gpio_lock_class);
-		irq_set_chip_and_handler(irq, &bcm_gpio_irq_chip,
-					 handle_simple_irq);
-#ifdef CONFIG_ARM
-		set_irq_flags(irq, IRQF_VALID);
-#else
-		irq_set_noprobe(irq);
-#endif
-	}
 	for (i = 0; i < kona_gpio->num_bank; i++) {
 		bank = &kona_gpio->banks[i];
 		irq_set_chained_handler(bank->irq, bcm_kona_gpio_irq_handler);
diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
index c5e05c8..59020a6 100644
--- a/drivers/gpio/gpio-davinci.c
+++ b/drivers/gpio/gpio-davinci.c
@@ -422,7 +422,6 @@ davinci_gpio_irq_map(struct irq_domain *d, unsigned int irq,
 	irq_set_irq_type(irq, IRQ_TYPE_NONE);
 	irq_set_chip_data(irq, (__force void *)g);
 	irq_set_handler_data(irq, (void *)__gpio_mask(hw));
-	set_irq_flags(irq, IRQF_VALID);
 
 	return 0;
 }
diff --git a/drivers/gpio/gpio-em.c b/drivers/gpio/gpio-em.c
index 3cfcfc6..3a912a6 100644
--- a/drivers/gpio/gpio-em.c
+++ b/drivers/gpio/gpio-em.c
@@ -262,7 +262,6 @@ static int em_gio_irq_domain_map(struct irq_domain *h, unsigned int irq,
 
 	irq_set_chip_data(irq, h->host_data);
 	irq_set_chip_and_handler(irq, &p->irq_chip, handle_level_irq);
-	set_irq_flags(irq, IRQF_VALID); /* kill me now */
 	return 0;
 }
 
diff --git a/drivers/gpio/gpio-ep93xx.c b/drivers/gpio/gpio-ep93xx.c
index 45684f3..4d35fdc 100644
--- a/drivers/gpio/gpio-ep93xx.c
+++ b/drivers/gpio/gpio-ep93xx.c
@@ -234,7 +234,7 @@ static void ep93xx_gpio_init_irq(void)
 	     gpio_irq <= gpio_to_irq(EP93XX_GPIO_LINE_MAX_IRQ); ++gpio_irq) {
 		irq_set_chip_and_handler(gpio_irq, &ep93xx_gpio_irq_chip,
 					 handle_level_irq);
-		set_irq_flags(gpio_irq, IRQF_VALID);
+		irq_clear_status_flags(gpio_irq, IRQ_NOREQUEST);
 	}
 
 	irq_set_chained_handler(IRQ_EP93XX_GPIO_AB,
diff --git a/drivers/gpio/gpio-grgpio.c b/drivers/gpio/gpio-grgpio.c
index 35a0277..6bdb8de 100644
--- a/drivers/gpio/gpio-grgpio.c
+++ b/drivers/gpio/gpio-grgpio.c
@@ -281,12 +281,7 @@ static int grgpio_irq_map(struct irq_domain *d, unsigned int irq,
 	irq_set_chip_data(irq, priv);
 	irq_set_chip_and_handler(irq, &grgpio_irq_chip,
 				 handle_simple_irq);
-	irq_clear_status_flags(irq, IRQ_NOREQUEST);
-#ifdef CONFIG_ARM
-	set_irq_flags(irq, IRQF_VALID);
-#else
 	irq_set_noprobe(irq);
-#endif
 
 	return ret;
 }
@@ -301,9 +296,6 @@ static void grgpio_irq_unmap(struct irq_domain *d, unsigned int irq)
 	int ngpio = priv->bgc.gc.ngpio;
 	int i;
 
-#ifdef CONFIG_ARM
-	set_irq_flags(irq, 0);
-#endif
 	irq_set_chip_and_handler(irq, NULL, NULL);
 	irq_set_chip_data(irq, NULL);
 
diff --git a/drivers/gpio/gpio-mcp23s08.c b/drivers/gpio/gpio-mcp23s08.c
index 2fc7ff8..73db7ec 100644
--- a/drivers/gpio/gpio-mcp23s08.c
+++ b/drivers/gpio/gpio-mcp23s08.c
@@ -507,11 +507,7 @@ static int mcp23s08_irq_setup(struct mcp23s08 *mcp)
 		irq_set_chip_data(irq, mcp);
 		irq_set_chip(irq, &mcp23s08_irq_chip);
 		irq_set_nested_thread(irq, true);
-#ifdef CONFIG_ARM
-		set_irq_flags(irq, IRQF_VALID);
-#else
 		irq_set_noprobe(irq);
-#endif
 	}
 	return 0;
 }
diff --git a/drivers/gpio/gpio-msm-v2.c b/drivers/gpio/gpio-msm-v2.c
index 52ff182..4bbaeb36 100644
--- a/drivers/gpio/gpio-msm-v2.c
+++ b/drivers/gpio/gpio-msm-v2.c
@@ -363,7 +363,6 @@ static int msm_gpio_irq_domain_map(struct irq_domain *d, unsigned int irq,
 	irq_set_lockdep_class(irq, &msm_gpio_lock_class);
 	irq_set_chip_and_handler(irq, &msm_gpio_irq_chip,
 			handle_level_irq);
-	set_irq_flags(irq, IRQF_VALID);
 
 	return 0;
 }
diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c
index cdbbcf0..55a11de 100644
--- a/drivers/gpio/gpio-pxa.c
+++ b/drivers/gpio/gpio-pxa.c
@@ -524,7 +524,7 @@ static int pxa_irq_domain_map(struct irq_domain *d, unsigned int irq,
 {
 	irq_set_chip_and_handler(irq, &pxa_muxed_gpio_chip,
 				 handle_edge_irq);
-	set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+	irq_set_noprobe(irq);
 	return 0;
 }
 
@@ -643,20 +643,20 @@ static int pxa_gpio_probe(struct platform_device *pdev)
 			irq = gpio_to_irq(0);
 			irq_set_chip_and_handler(irq, &pxa_muxed_gpio_chip,
 						 handle_edge_irq);
-			set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+			irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 		}
 		if (irq1 > 0) {
 			irq = gpio_to_irq(1);
 			irq_set_chip_and_handler(irq, &pxa_muxed_gpio_chip,
 						 handle_edge_irq);
-			set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+			irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 		}
 
 		for (irq  = gpio_to_irq(gpio_offset);
 			irq <= gpio_to_irq(pxa_last_gpio); irq++) {
 			irq_set_chip_and_handler(irq, &pxa_muxed_gpio_chip,
 						 handle_edge_irq);
-			set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+			irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 		}
 	}
 
diff --git a/drivers/gpio/gpio-sa1100.c b/drivers/gpio/gpio-sa1100.c
index bec397a..dbc67d1 100644
--- a/drivers/gpio/gpio-sa1100.c
+++ b/drivers/gpio/gpio-sa1100.c
@@ -155,7 +155,7 @@ static int sa1100_gpio_irqdomain_map(struct irq_domain *d,
 {
 	irq_set_chip_and_handler(irq, &sa1100_gpio_irq_chip,
 				 handle_edge_irq);
-	set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+	irq_set_noprobe(irq);
 
 	return 0;
 }
diff --git a/drivers/gpio/gpio-sta2x11.c b/drivers/gpio/gpio-sta2x11.c
index 18579ac..55e47828 100644
--- a/drivers/gpio/gpio-sta2x11.c
+++ b/drivers/gpio/gpio-sta2x11.c
@@ -346,7 +346,7 @@ static void gsta_alloc_irq_chip(struct gsta_gpio *chip)
 			i = chip->irq_base + j;
 			irq_set_chip_and_handler(i, &ct->chip, ct->handler);
 			irq_set_chip_data(i, gc);
-			irq_modify_status(i, IRQ_NOREQUEST | IRQ_NOPROBE, 0);
+			irq_clear_status_flags(i, IRQ_NOREQUEST | IRQ_NOPROBE);
 		}
 		gc->irq_cnt = i - gc->irq_base;
 	}
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index 1741981..62fdd5d 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -509,7 +509,6 @@ static int tegra_gpio_probe(struct platform_device *pdev)
 		irq_set_chip_data(irq, bank);
 		irq_set_chip_and_handler(irq, &tegra_gpio_irq_chip,
 					 handle_simple_irq);
-		set_irq_flags(irq, IRQF_VALID);
 	}
 
 	for (i = 0; i < tegra_gpio_bank_count; i++) {
diff --git a/drivers/gpio/gpio-timberdale.c b/drivers/gpio/gpio-timberdale.c
index e8f97e0..166fe1c 100644
--- a/drivers/gpio/gpio-timberdale.c
+++ b/drivers/gpio/gpio-timberdale.c
@@ -294,9 +294,7 @@ static int timbgpio_probe(struct platform_device *pdev)
 		irq_set_chip_and_handler(tgpio->irq_base + i,
 			&timbgpio_irqchip, handle_simple_irq);
 		irq_set_chip_data(tgpio->irq_base + i, tgpio);
-#ifdef CONFIG_ARM
-		set_irq_flags(tgpio->irq_base + i, IRQF_VALID | IRQF_PROBE);
-#endif
+		irq_clear_status_flags(tgpio->irq_base + i, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	irq_set_handler_data(irq, tgpio);
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 6bc612b..efd35c0 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -477,11 +477,8 @@ static int gpiochip_irq_map(struct irq_domain *d, unsigned int irq,
 	/* Chips that can sleep need nested thread handlers */
 	if (chip->can_sleep && !chip->irq_not_threaded)
 		irq_set_nested_thread(irq, 1);
-#ifdef CONFIG_ARM
-	set_irq_flags(irq, IRQF_VALID);
-#else
 	irq_set_noprobe(irq);
-#endif
+
 	/*
 	 * No set-up of the hardware will happen if IRQ_TYPE_NONE
 	 * is passed as default type.
@@ -496,9 +493,6 @@ static void gpiochip_irq_unmap(struct irq_domain *d, unsigned int irq)
 {
 	struct gpio_chip *chip = d->host_data;
 
-#ifdef CONFIG_ARM
-	set_irq_flags(irq, 0);
-#endif
 	if (chip->can_sleep)
 		irq_set_nested_thread(irq, 0);
 	irq_set_chip_and_handler(irq, NULL, NULL);
-- 
2.1.0

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

* [PATCH 06/15] gpu/drm: kill off set_irq_flags usage
  2015-06-09 18:26 ` Rob Herring
@ 2015-06-09 18:26   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: Russell King, linux-arm-kernel
  Cc: linux-kernel, arm, Rob Herring, David Airlie, dri-devel

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org
---
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c | 1 -
 drivers/gpu/ipu-v3/ipu-common.c         | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c
index 33bd4c6..9a6a747 100644
--- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c
+++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c
@@ -165,7 +165,6 @@ static int mdp5_hw_irqdomain_map(struct irq_domain *d,
 
 	irq_set_chip_and_handler(irq, &mdp5_hw_irq_chip, handle_level_irq);
 	irq_set_chip_data(irq, mdp5_kms);
-	set_irq_flags(irq, IRQF_VALID);
 
 	return 0;
 }
diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c
index 67bab5c..eb95c94 100644
--- a/drivers/gpu/ipu-v3/ipu-common.c
+++ b/drivers/gpu/ipu-v3/ipu-common.c
@@ -1099,8 +1099,7 @@ static int ipu_irq_init(struct ipu_soc *ipu)
 	}
 
 	ret = irq_alloc_domain_generic_chips(ipu->domain, 32, 1, "IPU",
-					     handle_level_irq, 0,
-					     IRQF_VALID, 0);
+					     handle_level_irq, 0, 0, 0);
 	if (ret < 0) {
 		dev_err(ipu->dev, "failed to alloc generic irq chips\n");
 		irq_domain_remove(ipu->domain);
-- 
2.1.0


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

* [PATCH 06/15] gpu/drm: kill off set_irq_flags usage
@ 2015-06-09 18:26   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: linux-arm-kernel

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: David Airlie <airlied@linux.ie>
Cc: dri-devel at lists.freedesktop.org
---
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c | 1 -
 drivers/gpu/ipu-v3/ipu-common.c         | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c
index 33bd4c6..9a6a747 100644
--- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c
+++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c
@@ -165,7 +165,6 @@ static int mdp5_hw_irqdomain_map(struct irq_domain *d,
 
 	irq_set_chip_and_handler(irq, &mdp5_hw_irq_chip, handle_level_irq);
 	irq_set_chip_data(irq, mdp5_kms);
-	set_irq_flags(irq, IRQF_VALID);
 
 	return 0;
 }
diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c
index 67bab5c..eb95c94 100644
--- a/drivers/gpu/ipu-v3/ipu-common.c
+++ b/drivers/gpu/ipu-v3/ipu-common.c
@@ -1099,8 +1099,7 @@ static int ipu_irq_init(struct ipu_soc *ipu)
 	}
 
 	ret = irq_alloc_domain_generic_chips(ipu->domain, 32, 1, "IPU",
-					     handle_level_irq, 0,
-					     IRQF_VALID, 0);
+					     handle_level_irq, 0, 0, 0);
 	if (ret < 0) {
 		dev_err(ipu->dev, "failed to alloc generic irq chips\n");
 		irq_domain_remove(ipu->domain);
-- 
2.1.0

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

* [PATCH 07/15] irqchip: kill off set_irq_flags usage
  2015-06-09 18:26 ` Rob Herring
@ 2015-06-09 18:26   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: Russell King, linux-arm-kernel
  Cc: linux-kernel, arm, Rob Herring, Thomas Gleixner, Jason Cooper,
	Kukjin Kim, Krzysztof Kozlowski, Stephen Warren, Lee Jones,
	Alexander Shiyan, Maxime Ripard, linux-samsung-soc,
	linux-rpi-kernel

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Lee Jones <lee@kernel.org>
Cc: Alexander Shiyan <shc_work@mail.ru>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-rpi-kernel@lists.infradead.org
---
 drivers/irqchip/exynos-combiner.c         |  2 +-
 drivers/irqchip/irq-armada-370-xp.c       |  3 +--
 drivers/irqchip/irq-bcm2835.c             |  2 +-
 drivers/irqchip/irq-clps711x.c            |  6 +++---
 drivers/irqchip/irq-gic-v3.c              |  5 ++---
 drivers/irqchip/irq-gic.c                 |  4 ++--
 drivers/irqchip/irq-hip04.c               |  4 ++--
 drivers/irqchip/irq-keystone.c            |  2 +-
 drivers/irqchip/irq-mmp.c                 |  3 ---
 drivers/irqchip/irq-mxs.c                 |  1 -
 drivers/irqchip/irq-renesas-intc-irqpin.c |  1 -
 drivers/irqchip/irq-renesas-irqc.c        |  1 -
 drivers/irqchip/irq-s3c24xx.c             | 14 ++------------
 drivers/irqchip/irq-sun4i.c               |  2 +-
 drivers/irqchip/irq-versatile-fpga.c      |  2 +-
 drivers/irqchip/irq-vic.c                 |  2 +-
 drivers/irqchip/irq-vt8500.c              |  1 -
 drivers/irqchip/spear-shirq.c             |  1 -
 18 files changed, 18 insertions(+), 38 deletions(-)

diff --git a/drivers/irqchip/exynos-combiner.c b/drivers/irqchip/exynos-combiner.c
index 5945223..46ecb4d 100644
--- a/drivers/irqchip/exynos-combiner.c
+++ b/drivers/irqchip/exynos-combiner.c
@@ -159,7 +159,7 @@ static int combiner_irq_domain_map(struct irq_domain *d, unsigned int irq,
 
 	irq_set_chip_and_handler(irq, &combiner_chip, handle_level_irq);
 	irq_set_chip_data(irq, &combiner_data[hw >> 3]);
-	set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+	irq_set_noprobe(irq);
 
 	return 0;
 }
diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c
index daccc8b..af1d600 100644
--- a/drivers/irqchip/irq-armada-370-xp.c
+++ b/drivers/irqchip/irq-armada-370-xp.c
@@ -201,7 +201,6 @@ static int armada_370_xp_msi_map(struct irq_domain *domain, unsigned int virq,
 {
 	irq_set_chip_and_handler(virq, &armada_370_xp_msi_irq_chip,
 				 handle_simple_irq);
-	set_irq_flags(virq, IRQF_VALID);
 
 	return 0;
 }
@@ -318,7 +317,7 @@ static int armada_370_xp_mpic_irq_map(struct irq_domain *h,
 		irq_set_chip_and_handler(virq, &armada_370_xp_irq_chip,
 					handle_level_irq);
 	}
-	set_irq_flags(virq, IRQF_VALID | IRQF_PROBE);
+	irq_set_noprobe(virq);
 
 	return 0;
 }
diff --git a/drivers/irqchip/irq-bcm2835.c b/drivers/irqchip/irq-bcm2835.c
index 5916d6c..66c30c6 100644
--- a/drivers/irqchip/irq-bcm2835.c
+++ b/drivers/irqchip/irq-bcm2835.c
@@ -165,7 +165,7 @@ static int __init armctrl_of_init(struct device_node *node,
 			BUG_ON(irq <= 0);
 			irq_set_chip_and_handler(irq, &armctrl_chip,
 				handle_level_irq);
-			set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+			irq_set_noprobe(irq);
 		}
 	}
 
diff --git a/drivers/irqchip/irq-clps711x.c b/drivers/irqchip/irq-clps711x.c
index 33127f1..e3609ae 100644
--- a/drivers/irqchip/irq-clps711x.c
+++ b/drivers/irqchip/irq-clps711x.c
@@ -133,14 +133,14 @@ static int __init clps711x_intc_irq_map(struct irq_domain *h, unsigned int virq,
 					irq_hw_number_t hw)
 {
 	irq_flow_handler_t handler = handle_level_irq;
-	unsigned int flags = IRQF_VALID | IRQF_PROBE;
+	unsigned int flags = 0;
 
 	if (!clps711x_irqs[hw].flags)
 		return 0;
 
 	if (clps711x_irqs[hw].flags & CLPS711X_FLAG_FIQ) {
 		handler = handle_bad_irq;
-		flags |= IRQF_NOAUTOEN;
+		flags |= IRQ_NOAUTOEN;
 	} else if (clps711x_irqs[hw].eoi) {
 		handler = handle_fasteoi_irq;
 	}
@@ -150,7 +150,7 @@ static int __init clps711x_intc_irq_map(struct irq_domain *h, unsigned int virq,
 		writel_relaxed(0, clps711x_intc->base + clps711x_irqs[hw].eoi);
 
 	irq_set_chip_and_handler(virq, &clps711x_intc_chip, handler);
-	set_irq_flags(virq, flags);
+	irq_modify_status_flags(irq, IRQ_NOPROBE, flags);
 
 	return 0;
 }
diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index 49875ad..a53e080 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -680,13 +680,13 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq,
 		irq_set_percpu_devid(irq);
 		irq_domain_set_info(d, irq, hw, &gic_chip, d->host_data,
 				    handle_percpu_devid_irq, NULL, NULL);
-		set_irq_flags(irq, IRQF_VALID | IRQF_NOAUTOEN);
+		irq_set_status_flags(irq, IRQ_NOAUTOEN);
 	}
 	/* SPIs */
 	if (hw >= 32 && hw < gic_data.irq_nr) {
 		irq_domain_set_info(d, irq, hw, &gic_chip, d->host_data,
 				    handle_fasteoi_irq, NULL, NULL);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_set_probe(irq);
 	}
 	/* LPIs */
 	if (hw >= 8192 && hw < GIC_ID_NR) {
@@ -694,7 +694,6 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq,
 			return -EPERM;
 		irq_domain_set_info(d, irq, hw, &gic_chip, d->host_data,
 				    handle_fasteoi_irq, NULL, NULL);
-		set_irq_flags(irq, IRQF_VALID);
 	}
 
 	return 0;
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index 01999d7..6730419 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -792,11 +792,11 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq,
 		irq_set_percpu_devid(irq);
 		irq_domain_set_info(d, irq, hw, &gic_chip, d->host_data,
 				    handle_percpu_devid_irq, NULL, NULL);
-		set_irq_flags(irq, IRQF_VALID | IRQF_NOAUTOEN);
+		irq_set_status_flags(irq, IRQ_NOAUTOEN);
 	} else {
 		irq_domain_set_info(d, irq, hw, &gic_chip, d->host_data,
 				    handle_fasteoi_irq, NULL, NULL);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_set_noprobe(irq);
 	}
 	return 0;
 }
diff --git a/drivers/irqchip/irq-hip04.c b/drivers/irqchip/irq-hip04.c
index 7d6ffb5..c8778a5 100644
--- a/drivers/irqchip/irq-hip04.c
+++ b/drivers/irqchip/irq-hip04.c
@@ -304,11 +304,11 @@ static int hip04_irq_domain_map(struct irq_domain *d, unsigned int irq,
 		irq_set_percpu_devid(irq);
 		irq_set_chip_and_handler(irq, &hip04_irq_chip,
 					 handle_percpu_devid_irq);
-		set_irq_flags(irq, IRQF_VALID | IRQF_NOAUTOEN);
+		irq_set_status_flags(irq, IRQ_NOAUTOEN);
 	} else {
 		irq_set_chip_and_handler(irq, &hip04_irq_chip,
 					 handle_fasteoi_irq);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_set_noprobe(irq);
 	}
 	irq_set_chip_data(irq, d->host_data);
 	return 0;
diff --git a/drivers/irqchip/irq-keystone.c b/drivers/irqchip/irq-keystone.c
index 78e8b3c..870c416 100644
--- a/drivers/irqchip/irq-keystone.c
+++ b/drivers/irqchip/irq-keystone.c
@@ -127,7 +127,7 @@ static int keystone_irq_map(struct irq_domain *h, unsigned int virq,
 
 	irq_set_chip_data(virq, kirq);
 	irq_set_chip_and_handler(virq, &kirq->chip, handle_level_irq);
-	set_irq_flags(virq, IRQF_VALID | IRQF_PROBE);
+	irq_set_noprobe(virq);
 	return 0;
 }
 
diff --git a/drivers/irqchip/irq-mmp.c b/drivers/irqchip/irq-mmp.c
index c0da57b..3dfef63 100644
--- a/drivers/irqchip/irq-mmp.c
+++ b/drivers/irqchip/irq-mmp.c
@@ -164,7 +164,6 @@ static int mmp_irq_domain_map(struct irq_domain *d, unsigned int irq,
 			      irq_hw_number_t hw)
 {
 	irq_set_chip_and_handler(irq, &icu_irq_chip, handle_level_irq);
-	set_irq_flags(irq, IRQF_VALID);
 	return 0;
 }
 
@@ -234,7 +233,6 @@ void __init icu_init_irq(void)
 	for (irq = 0; irq < 64; irq++) {
 		icu_mask_irq(irq_get_irq_data(irq));
 		irq_set_chip_and_handler(irq, &icu_irq_chip, handle_level_irq);
-		set_irq_flags(irq, IRQF_VALID);
 	}
 	irq_set_default_host(icu_data[0].domain);
 	set_handle_irq(mmp_handle_irq);
@@ -337,7 +335,6 @@ void __init mmp2_init_icu(void)
 			irq_set_chip_and_handler(irq, &icu_irq_chip,
 						 handle_level_irq);
 		}
-		set_irq_flags(irq, IRQF_VALID);
 	}
 	irq_set_default_host(icu_data[0].domain);
 	set_handle_irq(mmp2_handle_irq);
diff --git a/drivers/irqchip/irq-mxs.c b/drivers/irqchip/irq-mxs.c
index e4acf1e..0b8f981 100644
--- a/drivers/irqchip/irq-mxs.c
+++ b/drivers/irqchip/irq-mxs.c
@@ -85,7 +85,6 @@ static int icoll_irq_domain_map(struct irq_domain *d, unsigned int virq,
 				irq_hw_number_t hw)
 {
 	irq_set_chip_and_handler(virq, &mxs_icoll_chip, handle_level_irq);
-	set_irq_flags(virq, IRQF_VALID);
 
 	return 0;
 }
diff --git a/drivers/irqchip/irq-renesas-intc-irqpin.c b/drivers/irqchip/irq-renesas-intc-irqpin.c
index 9a0767b..d7bcb7a 100644
--- a/drivers/irqchip/irq-renesas-intc-irqpin.c
+++ b/drivers/irqchip/irq-renesas-intc-irqpin.c
@@ -343,7 +343,6 @@ static int intc_irqpin_irq_domain_map(struct irq_domain *h, unsigned int virq,
 	intc_irqpin_dbg(&p->irq[hw], "map");
 	irq_set_chip_data(virq, h->host_data);
 	irq_set_chip_and_handler(virq, &p->irq_chip, handle_level_irq);
-	set_irq_flags(virq, IRQF_VALID); /* kill me now */
 	return 0;
 }
 
diff --git a/drivers/irqchip/irq-renesas-irqc.c b/drivers/irqchip/irq-renesas-irqc.c
index cdf80b7..648053c 100644
--- a/drivers/irqchip/irq-renesas-irqc.c
+++ b/drivers/irqchip/irq-renesas-irqc.c
@@ -164,7 +164,6 @@ static int irqc_irq_domain_map(struct irq_domain *h, unsigned int virq,
 	irqc_dbg(&p->irq[hw], "map");
 	irq_set_chip_data(virq, h->host_data);
 	irq_set_chip_and_handler(virq, &p->irq_chip, handle_level_irq);
-	set_irq_flags(virq, IRQF_VALID); /* kill me now */
 	return 0;
 }
 
diff --git a/drivers/irqchip/irq-s3c24xx.c b/drivers/irqchip/irq-s3c24xx.c
index c8d373f..0df7452 100644
--- a/drivers/irqchip/irq-s3c24xx.c
+++ b/drivers/irqchip/irq-s3c24xx.c
@@ -469,13 +469,11 @@ static int s3c24xx_irq_map(struct irq_domain *h, unsigned int virq,
 
 	irq_set_chip_data(virq, irq_data);
 
-	set_irq_flags(virq, IRQF_VALID);
-
 	if (parent_intc && irq_data->type != S3C_IRQTYPE_NONE) {
 		if (irq_data->parent_irq > 31) {
 			pr_err("irq-s3c24xx: parent irq %lu is out of range\n",
 			       irq_data->parent_irq);
-			goto err;
+			return -EINVAL;
 		}
 
 		parent_irq_data = &parent_intc->irqs[irq_data->parent_irq];
@@ -488,18 +486,12 @@ static int s3c24xx_irq_map(struct irq_domain *h, unsigned int virq,
 		if (!irqno) {
 			pr_err("irq-s3c24xx: could not find mapping for parent irq %lu\n",
 			       irq_data->parent_irq);
-			goto err;
+			return -EINVAL;
 		}
 		irq_set_chained_handler(irqno, s3c_irq_demux);
 	}
 
 	return 0;
-
-err:
-	set_irq_flags(virq, 0);
-
-	/* the only error can result from bad mapping data*/
-	return -EINVAL;
 }
 
 static struct irq_domain_ops s3c24xx_irq_ops = {
@@ -1177,8 +1169,6 @@ static int s3c24xx_irq_map_of(struct irq_domain *h, unsigned int virq,
 
 	irq_set_chip_data(virq, irq_data);
 
-	set_irq_flags(virq, IRQF_VALID);
-
 	return 0;
 }
 
diff --git a/drivers/irqchip/irq-sun4i.c b/drivers/irqchip/irq-sun4i.c
index 64155b6..71f2b54 100644
--- a/drivers/irqchip/irq-sun4i.c
+++ b/drivers/irqchip/irq-sun4i.c
@@ -84,7 +84,7 @@ static int sun4i_irq_map(struct irq_domain *d, unsigned int virq,
 			 irq_hw_number_t hw)
 {
 	irq_set_chip_and_handler(virq, &sun4i_irq_chip, handle_fasteoi_irq);
-	set_irq_flags(virq, IRQF_VALID | IRQF_PROBE);
+	irq_set_noprobe(virq);
 
 	return 0;
 }
diff --git a/drivers/irqchip/irq-versatile-fpga.c b/drivers/irqchip/irq-versatile-fpga.c
index 1ab4517..e81a946 100644
--- a/drivers/irqchip/irq-versatile-fpga.c
+++ b/drivers/irqchip/irq-versatile-fpga.c
@@ -128,7 +128,7 @@ static int fpga_irqdomain_map(struct irq_domain *d, unsigned int irq,
 	irq_set_chip_data(irq, f);
 	irq_set_chip_and_handler(irq, &f->chip,
 				handle_level_irq);
-	set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+	irq_set_noprobe(irq);
 	return 0;
 }
 
diff --git a/drivers/irqchip/irq-vic.c b/drivers/irqchip/irq-vic.c
index 54089de..0bb5225 100644
--- a/drivers/irqchip/irq-vic.c
+++ b/drivers/irqchip/irq-vic.c
@@ -202,7 +202,7 @@ static int vic_irqdomain_map(struct irq_domain *d, unsigned int irq,
 		return -EPERM;
 	irq_set_chip_and_handler(irq, &vic_chip, handle_level_irq);
 	irq_set_chip_data(irq, v->base);
-	set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+	irq_set_noprobe(irq);
 	return 0;
 }
 
diff --git a/drivers/irqchip/irq-vt8500.c b/drivers/irqchip/irq-vt8500.c
index b7af816..4a66101 100644
--- a/drivers/irqchip/irq-vt8500.c
+++ b/drivers/irqchip/irq-vt8500.c
@@ -168,7 +168,6 @@ static int vt8500_irq_map(struct irq_domain *h, unsigned int virq,
 							irq_hw_number_t hw)
 {
 	irq_set_chip_and_handler(virq, &vt8500_irq_chip, handle_level_irq);
-	set_irq_flags(virq, IRQF_VALID);
 
 	return 0;
 }
diff --git a/drivers/irqchip/spear-shirq.c b/drivers/irqchip/spear-shirq.c
index 9c145a7..6db93a8 100644
--- a/drivers/irqchip/spear-shirq.c
+++ b/drivers/irqchip/spear-shirq.c
@@ -213,7 +213,6 @@ static void __init spear_shirq_register(struct spear_shirq *shirq,
 	for (i = 0; i < shirq->nr_irqs; i++) {
 		irq_set_chip_and_handler(shirq->virq_base + i,
 					 shirq->irq_chip, handle_simple_irq);
-		set_irq_flags(shirq->virq_base + i, IRQF_VALID);
 		irq_set_chip_data(shirq->virq_base + i, shirq);
 	}
 }
-- 
2.1.0


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

* [PATCH 07/15] irqchip: kill off set_irq_flags usage
@ 2015-06-09 18:26   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: linux-arm-kernel

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Lee Jones <lee@kernel.org>
Cc: Alexander Shiyan <shc_work@mail.ru>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-samsung-soc at vger.kernel.org
Cc: linux-rpi-kernel at lists.infradead.org
---
 drivers/irqchip/exynos-combiner.c         |  2 +-
 drivers/irqchip/irq-armada-370-xp.c       |  3 +--
 drivers/irqchip/irq-bcm2835.c             |  2 +-
 drivers/irqchip/irq-clps711x.c            |  6 +++---
 drivers/irqchip/irq-gic-v3.c              |  5 ++---
 drivers/irqchip/irq-gic.c                 |  4 ++--
 drivers/irqchip/irq-hip04.c               |  4 ++--
 drivers/irqchip/irq-keystone.c            |  2 +-
 drivers/irqchip/irq-mmp.c                 |  3 ---
 drivers/irqchip/irq-mxs.c                 |  1 -
 drivers/irqchip/irq-renesas-intc-irqpin.c |  1 -
 drivers/irqchip/irq-renesas-irqc.c        |  1 -
 drivers/irqchip/irq-s3c24xx.c             | 14 ++------------
 drivers/irqchip/irq-sun4i.c               |  2 +-
 drivers/irqchip/irq-versatile-fpga.c      |  2 +-
 drivers/irqchip/irq-vic.c                 |  2 +-
 drivers/irqchip/irq-vt8500.c              |  1 -
 drivers/irqchip/spear-shirq.c             |  1 -
 18 files changed, 18 insertions(+), 38 deletions(-)

diff --git a/drivers/irqchip/exynos-combiner.c b/drivers/irqchip/exynos-combiner.c
index 5945223..46ecb4d 100644
--- a/drivers/irqchip/exynos-combiner.c
+++ b/drivers/irqchip/exynos-combiner.c
@@ -159,7 +159,7 @@ static int combiner_irq_domain_map(struct irq_domain *d, unsigned int irq,
 
 	irq_set_chip_and_handler(irq, &combiner_chip, handle_level_irq);
 	irq_set_chip_data(irq, &combiner_data[hw >> 3]);
-	set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+	irq_set_noprobe(irq);
 
 	return 0;
 }
diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c
index daccc8b..af1d600 100644
--- a/drivers/irqchip/irq-armada-370-xp.c
+++ b/drivers/irqchip/irq-armada-370-xp.c
@@ -201,7 +201,6 @@ static int armada_370_xp_msi_map(struct irq_domain *domain, unsigned int virq,
 {
 	irq_set_chip_and_handler(virq, &armada_370_xp_msi_irq_chip,
 				 handle_simple_irq);
-	set_irq_flags(virq, IRQF_VALID);
 
 	return 0;
 }
@@ -318,7 +317,7 @@ static int armada_370_xp_mpic_irq_map(struct irq_domain *h,
 		irq_set_chip_and_handler(virq, &armada_370_xp_irq_chip,
 					handle_level_irq);
 	}
-	set_irq_flags(virq, IRQF_VALID | IRQF_PROBE);
+	irq_set_noprobe(virq);
 
 	return 0;
 }
diff --git a/drivers/irqchip/irq-bcm2835.c b/drivers/irqchip/irq-bcm2835.c
index 5916d6c..66c30c6 100644
--- a/drivers/irqchip/irq-bcm2835.c
+++ b/drivers/irqchip/irq-bcm2835.c
@@ -165,7 +165,7 @@ static int __init armctrl_of_init(struct device_node *node,
 			BUG_ON(irq <= 0);
 			irq_set_chip_and_handler(irq, &armctrl_chip,
 				handle_level_irq);
-			set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+			irq_set_noprobe(irq);
 		}
 	}
 
diff --git a/drivers/irqchip/irq-clps711x.c b/drivers/irqchip/irq-clps711x.c
index 33127f1..e3609ae 100644
--- a/drivers/irqchip/irq-clps711x.c
+++ b/drivers/irqchip/irq-clps711x.c
@@ -133,14 +133,14 @@ static int __init clps711x_intc_irq_map(struct irq_domain *h, unsigned int virq,
 					irq_hw_number_t hw)
 {
 	irq_flow_handler_t handler = handle_level_irq;
-	unsigned int flags = IRQF_VALID | IRQF_PROBE;
+	unsigned int flags = 0;
 
 	if (!clps711x_irqs[hw].flags)
 		return 0;
 
 	if (clps711x_irqs[hw].flags & CLPS711X_FLAG_FIQ) {
 		handler = handle_bad_irq;
-		flags |= IRQF_NOAUTOEN;
+		flags |= IRQ_NOAUTOEN;
 	} else if (clps711x_irqs[hw].eoi) {
 		handler = handle_fasteoi_irq;
 	}
@@ -150,7 +150,7 @@ static int __init clps711x_intc_irq_map(struct irq_domain *h, unsigned int virq,
 		writel_relaxed(0, clps711x_intc->base + clps711x_irqs[hw].eoi);
 
 	irq_set_chip_and_handler(virq, &clps711x_intc_chip, handler);
-	set_irq_flags(virq, flags);
+	irq_modify_status_flags(irq, IRQ_NOPROBE, flags);
 
 	return 0;
 }
diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index 49875ad..a53e080 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -680,13 +680,13 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq,
 		irq_set_percpu_devid(irq);
 		irq_domain_set_info(d, irq, hw, &gic_chip, d->host_data,
 				    handle_percpu_devid_irq, NULL, NULL);
-		set_irq_flags(irq, IRQF_VALID | IRQF_NOAUTOEN);
+		irq_set_status_flags(irq, IRQ_NOAUTOEN);
 	}
 	/* SPIs */
 	if (hw >= 32 && hw < gic_data.irq_nr) {
 		irq_domain_set_info(d, irq, hw, &gic_chip, d->host_data,
 				    handle_fasteoi_irq, NULL, NULL);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_set_probe(irq);
 	}
 	/* LPIs */
 	if (hw >= 8192 && hw < GIC_ID_NR) {
@@ -694,7 +694,6 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq,
 			return -EPERM;
 		irq_domain_set_info(d, irq, hw, &gic_chip, d->host_data,
 				    handle_fasteoi_irq, NULL, NULL);
-		set_irq_flags(irq, IRQF_VALID);
 	}
 
 	return 0;
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index 01999d7..6730419 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -792,11 +792,11 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq,
 		irq_set_percpu_devid(irq);
 		irq_domain_set_info(d, irq, hw, &gic_chip, d->host_data,
 				    handle_percpu_devid_irq, NULL, NULL);
-		set_irq_flags(irq, IRQF_VALID | IRQF_NOAUTOEN);
+		irq_set_status_flags(irq, IRQ_NOAUTOEN);
 	} else {
 		irq_domain_set_info(d, irq, hw, &gic_chip, d->host_data,
 				    handle_fasteoi_irq, NULL, NULL);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_set_noprobe(irq);
 	}
 	return 0;
 }
diff --git a/drivers/irqchip/irq-hip04.c b/drivers/irqchip/irq-hip04.c
index 7d6ffb5..c8778a5 100644
--- a/drivers/irqchip/irq-hip04.c
+++ b/drivers/irqchip/irq-hip04.c
@@ -304,11 +304,11 @@ static int hip04_irq_domain_map(struct irq_domain *d, unsigned int irq,
 		irq_set_percpu_devid(irq);
 		irq_set_chip_and_handler(irq, &hip04_irq_chip,
 					 handle_percpu_devid_irq);
-		set_irq_flags(irq, IRQF_VALID | IRQF_NOAUTOEN);
+		irq_set_status_flags(irq, IRQ_NOAUTOEN);
 	} else {
 		irq_set_chip_and_handler(irq, &hip04_irq_chip,
 					 handle_fasteoi_irq);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_set_noprobe(irq);
 	}
 	irq_set_chip_data(irq, d->host_data);
 	return 0;
diff --git a/drivers/irqchip/irq-keystone.c b/drivers/irqchip/irq-keystone.c
index 78e8b3c..870c416 100644
--- a/drivers/irqchip/irq-keystone.c
+++ b/drivers/irqchip/irq-keystone.c
@@ -127,7 +127,7 @@ static int keystone_irq_map(struct irq_domain *h, unsigned int virq,
 
 	irq_set_chip_data(virq, kirq);
 	irq_set_chip_and_handler(virq, &kirq->chip, handle_level_irq);
-	set_irq_flags(virq, IRQF_VALID | IRQF_PROBE);
+	irq_set_noprobe(virq);
 	return 0;
 }
 
diff --git a/drivers/irqchip/irq-mmp.c b/drivers/irqchip/irq-mmp.c
index c0da57b..3dfef63 100644
--- a/drivers/irqchip/irq-mmp.c
+++ b/drivers/irqchip/irq-mmp.c
@@ -164,7 +164,6 @@ static int mmp_irq_domain_map(struct irq_domain *d, unsigned int irq,
 			      irq_hw_number_t hw)
 {
 	irq_set_chip_and_handler(irq, &icu_irq_chip, handle_level_irq);
-	set_irq_flags(irq, IRQF_VALID);
 	return 0;
 }
 
@@ -234,7 +233,6 @@ void __init icu_init_irq(void)
 	for (irq = 0; irq < 64; irq++) {
 		icu_mask_irq(irq_get_irq_data(irq));
 		irq_set_chip_and_handler(irq, &icu_irq_chip, handle_level_irq);
-		set_irq_flags(irq, IRQF_VALID);
 	}
 	irq_set_default_host(icu_data[0].domain);
 	set_handle_irq(mmp_handle_irq);
@@ -337,7 +335,6 @@ void __init mmp2_init_icu(void)
 			irq_set_chip_and_handler(irq, &icu_irq_chip,
 						 handle_level_irq);
 		}
-		set_irq_flags(irq, IRQF_VALID);
 	}
 	irq_set_default_host(icu_data[0].domain);
 	set_handle_irq(mmp2_handle_irq);
diff --git a/drivers/irqchip/irq-mxs.c b/drivers/irqchip/irq-mxs.c
index e4acf1e..0b8f981 100644
--- a/drivers/irqchip/irq-mxs.c
+++ b/drivers/irqchip/irq-mxs.c
@@ -85,7 +85,6 @@ static int icoll_irq_domain_map(struct irq_domain *d, unsigned int virq,
 				irq_hw_number_t hw)
 {
 	irq_set_chip_and_handler(virq, &mxs_icoll_chip, handle_level_irq);
-	set_irq_flags(virq, IRQF_VALID);
 
 	return 0;
 }
diff --git a/drivers/irqchip/irq-renesas-intc-irqpin.c b/drivers/irqchip/irq-renesas-intc-irqpin.c
index 9a0767b..d7bcb7a 100644
--- a/drivers/irqchip/irq-renesas-intc-irqpin.c
+++ b/drivers/irqchip/irq-renesas-intc-irqpin.c
@@ -343,7 +343,6 @@ static int intc_irqpin_irq_domain_map(struct irq_domain *h, unsigned int virq,
 	intc_irqpin_dbg(&p->irq[hw], "map");
 	irq_set_chip_data(virq, h->host_data);
 	irq_set_chip_and_handler(virq, &p->irq_chip, handle_level_irq);
-	set_irq_flags(virq, IRQF_VALID); /* kill me now */
 	return 0;
 }
 
diff --git a/drivers/irqchip/irq-renesas-irqc.c b/drivers/irqchip/irq-renesas-irqc.c
index cdf80b7..648053c 100644
--- a/drivers/irqchip/irq-renesas-irqc.c
+++ b/drivers/irqchip/irq-renesas-irqc.c
@@ -164,7 +164,6 @@ static int irqc_irq_domain_map(struct irq_domain *h, unsigned int virq,
 	irqc_dbg(&p->irq[hw], "map");
 	irq_set_chip_data(virq, h->host_data);
 	irq_set_chip_and_handler(virq, &p->irq_chip, handle_level_irq);
-	set_irq_flags(virq, IRQF_VALID); /* kill me now */
 	return 0;
 }
 
diff --git a/drivers/irqchip/irq-s3c24xx.c b/drivers/irqchip/irq-s3c24xx.c
index c8d373f..0df7452 100644
--- a/drivers/irqchip/irq-s3c24xx.c
+++ b/drivers/irqchip/irq-s3c24xx.c
@@ -469,13 +469,11 @@ static int s3c24xx_irq_map(struct irq_domain *h, unsigned int virq,
 
 	irq_set_chip_data(virq, irq_data);
 
-	set_irq_flags(virq, IRQF_VALID);
-
 	if (parent_intc && irq_data->type != S3C_IRQTYPE_NONE) {
 		if (irq_data->parent_irq > 31) {
 			pr_err("irq-s3c24xx: parent irq %lu is out of range\n",
 			       irq_data->parent_irq);
-			goto err;
+			return -EINVAL;
 		}
 
 		parent_irq_data = &parent_intc->irqs[irq_data->parent_irq];
@@ -488,18 +486,12 @@ static int s3c24xx_irq_map(struct irq_domain *h, unsigned int virq,
 		if (!irqno) {
 			pr_err("irq-s3c24xx: could not find mapping for parent irq %lu\n",
 			       irq_data->parent_irq);
-			goto err;
+			return -EINVAL;
 		}
 		irq_set_chained_handler(irqno, s3c_irq_demux);
 	}
 
 	return 0;
-
-err:
-	set_irq_flags(virq, 0);
-
-	/* the only error can result from bad mapping data*/
-	return -EINVAL;
 }
 
 static struct irq_domain_ops s3c24xx_irq_ops = {
@@ -1177,8 +1169,6 @@ static int s3c24xx_irq_map_of(struct irq_domain *h, unsigned int virq,
 
 	irq_set_chip_data(virq, irq_data);
 
-	set_irq_flags(virq, IRQF_VALID);
-
 	return 0;
 }
 
diff --git a/drivers/irqchip/irq-sun4i.c b/drivers/irqchip/irq-sun4i.c
index 64155b6..71f2b54 100644
--- a/drivers/irqchip/irq-sun4i.c
+++ b/drivers/irqchip/irq-sun4i.c
@@ -84,7 +84,7 @@ static int sun4i_irq_map(struct irq_domain *d, unsigned int virq,
 			 irq_hw_number_t hw)
 {
 	irq_set_chip_and_handler(virq, &sun4i_irq_chip, handle_fasteoi_irq);
-	set_irq_flags(virq, IRQF_VALID | IRQF_PROBE);
+	irq_set_noprobe(virq);
 
 	return 0;
 }
diff --git a/drivers/irqchip/irq-versatile-fpga.c b/drivers/irqchip/irq-versatile-fpga.c
index 1ab4517..e81a946 100644
--- a/drivers/irqchip/irq-versatile-fpga.c
+++ b/drivers/irqchip/irq-versatile-fpga.c
@@ -128,7 +128,7 @@ static int fpga_irqdomain_map(struct irq_domain *d, unsigned int irq,
 	irq_set_chip_data(irq, f);
 	irq_set_chip_and_handler(irq, &f->chip,
 				handle_level_irq);
-	set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+	irq_set_noprobe(irq);
 	return 0;
 }
 
diff --git a/drivers/irqchip/irq-vic.c b/drivers/irqchip/irq-vic.c
index 54089de..0bb5225 100644
--- a/drivers/irqchip/irq-vic.c
+++ b/drivers/irqchip/irq-vic.c
@@ -202,7 +202,7 @@ static int vic_irqdomain_map(struct irq_domain *d, unsigned int irq,
 		return -EPERM;
 	irq_set_chip_and_handler(irq, &vic_chip, handle_level_irq);
 	irq_set_chip_data(irq, v->base);
-	set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+	irq_set_noprobe(irq);
 	return 0;
 }
 
diff --git a/drivers/irqchip/irq-vt8500.c b/drivers/irqchip/irq-vt8500.c
index b7af816..4a66101 100644
--- a/drivers/irqchip/irq-vt8500.c
+++ b/drivers/irqchip/irq-vt8500.c
@@ -168,7 +168,6 @@ static int vt8500_irq_map(struct irq_domain *h, unsigned int virq,
 							irq_hw_number_t hw)
 {
 	irq_set_chip_and_handler(virq, &vt8500_irq_chip, handle_level_irq);
-	set_irq_flags(virq, IRQF_VALID);
 
 	return 0;
 }
diff --git a/drivers/irqchip/spear-shirq.c b/drivers/irqchip/spear-shirq.c
index 9c145a7..6db93a8 100644
--- a/drivers/irqchip/spear-shirq.c
+++ b/drivers/irqchip/spear-shirq.c
@@ -213,7 +213,6 @@ static void __init spear_shirq_register(struct spear_shirq *shirq,
 	for (i = 0; i < shirq->nr_irqs; i++) {
 		irq_set_chip_and_handler(shirq->virq_base + i,
 					 shirq->irq_chip, handle_simple_irq);
-		set_irq_flags(shirq->virq_base + i, IRQF_VALID);
 		irq_set_chip_data(shirq->virq_base + i, shirq);
 	}
 }
-- 
2.1.0

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

* [PATCH 08/15] memory: kill off set_irq_flags usage
  2015-06-09 18:26 ` Rob Herring
  (?)
@ 2015-06-09 18:26   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: Russell King, linux-arm-kernel
  Cc: linux-kernel, arm, Rob Herring, Roger Quadros, Tony Lindgren, linux-omap

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Roger Quadros <rogerq@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: linux-omap@vger.kernel.org
---
 drivers/memory/omap-gpmc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index c94ea0d..0c833e2 100644
--- a/drivers/memory/omap-gpmc.c
+++ b/drivers/memory/omap-gpmc.c
@@ -1176,8 +1176,8 @@ static int gpmc_setup_irq(void)
 		gpmc_client_irq[i].irq = gpmc_irq_start + i;
 		irq_set_chip_and_handler(gpmc_client_irq[i].irq,
 					&gpmc_irq_chip, handle_simple_irq);
-		set_irq_flags(gpmc_client_irq[i].irq,
-				IRQF_VALID | IRQF_NOAUTOEN);
+		irq_modify_status(gpmc_client_irq[i].irq, IRQ_NOREQUEST,
+				  IRQ_NOAUTOEN);
 	}
 
 	/* Disable interrupts */
@@ -1200,7 +1200,6 @@ static int gpmc_free_irq(void)
 	for (i = 0; i < GPMC_NR_IRQ; i++) {
 		irq_set_handler(gpmc_client_irq[i].irq, NULL);
 		irq_set_chip(gpmc_client_irq[i].irq, &no_irq_chip);
-		irq_modify_status(gpmc_client_irq[i].irq, 0, 0);
 	}
 
 	irq_free_descs(gpmc_irq_start, GPMC_NR_IRQ);
-- 
2.1.0


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

* [PATCH 08/15] memory: kill off set_irq_flags usage
@ 2015-06-09 18:26   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: Russell King, linux-arm-kernel
  Cc: Rob Herring, Tony Lindgren, linux-kernel, arm, linux-omap, Roger Quadros

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Roger Quadros <rogerq@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: linux-omap@vger.kernel.org
---
 drivers/memory/omap-gpmc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index c94ea0d..0c833e2 100644
--- a/drivers/memory/omap-gpmc.c
+++ b/drivers/memory/omap-gpmc.c
@@ -1176,8 +1176,8 @@ static int gpmc_setup_irq(void)
 		gpmc_client_irq[i].irq = gpmc_irq_start + i;
 		irq_set_chip_and_handler(gpmc_client_irq[i].irq,
 					&gpmc_irq_chip, handle_simple_irq);
-		set_irq_flags(gpmc_client_irq[i].irq,
-				IRQF_VALID | IRQF_NOAUTOEN);
+		irq_modify_status(gpmc_client_irq[i].irq, IRQ_NOREQUEST,
+				  IRQ_NOAUTOEN);
 	}
 
 	/* Disable interrupts */
@@ -1200,7 +1200,6 @@ static int gpmc_free_irq(void)
 	for (i = 0; i < GPMC_NR_IRQ; i++) {
 		irq_set_handler(gpmc_client_irq[i].irq, NULL);
 		irq_set_chip(gpmc_client_irq[i].irq, &no_irq_chip);
-		irq_modify_status(gpmc_client_irq[i].irq, 0, 0);
 	}
 
 	irq_free_descs(gpmc_irq_start, GPMC_NR_IRQ);
-- 
2.1.0

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

* [PATCH 08/15] memory: kill off set_irq_flags usage
@ 2015-06-09 18:26   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: linux-arm-kernel

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Roger Quadros <rogerq@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: linux-omap at vger.kernel.org
---
 drivers/memory/omap-gpmc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index c94ea0d..0c833e2 100644
--- a/drivers/memory/omap-gpmc.c
+++ b/drivers/memory/omap-gpmc.c
@@ -1176,8 +1176,8 @@ static int gpmc_setup_irq(void)
 		gpmc_client_irq[i].irq = gpmc_irq_start + i;
 		irq_set_chip_and_handler(gpmc_client_irq[i].irq,
 					&gpmc_irq_chip, handle_simple_irq);
-		set_irq_flags(gpmc_client_irq[i].irq,
-				IRQF_VALID | IRQF_NOAUTOEN);
+		irq_modify_status(gpmc_client_irq[i].irq, IRQ_NOREQUEST,
+				  IRQ_NOAUTOEN);
 	}
 
 	/* Disable interrupts */
@@ -1200,7 +1200,6 @@ static int gpmc_free_irq(void)
 	for (i = 0; i < GPMC_NR_IRQ; i++) {
 		irq_set_handler(gpmc_client_irq[i].irq, NULL);
 		irq_set_chip(gpmc_client_irq[i].irq, &no_irq_chip);
-		irq_modify_status(gpmc_client_irq[i].irq, 0, 0);
 	}
 
 	irq_free_descs(gpmc_irq_start, GPMC_NR_IRQ);
-- 
2.1.0

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

* [PATCH 09/15] mfd: kill off set_irq_flags usage
  2015-06-09 18:26 ` Rob Herring
@ 2015-06-09 18:26   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: Russell King, linux-arm-kernel
  Cc: linux-kernel, arm, Rob Herring, Samuel Ortiz, Lee Jones,
	Linus Walleij, Milo Kim, Kumar Gala, Andy Gross, David Brown,
	Tony Lindgren, patches, linux-arm-msm, linux-soc, linux-omap

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Milo Kim <milo.kim@ti.com>
Cc: Kumar Gala <galak@codeaurora.org>
Cc: Andy Gross <agross@codeaurora.org>
Cc: David Brown <davidb@codeaurora.org>
Cc: Tony Lindgren <tony@atomide.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: patches@opensource.wolfsonmicro.com
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-soc@vger.kernel.org
Cc: linux-omap@vger.kernel.org
---
 drivers/mfd/88pm860x-core.c |  4 ----
 drivers/mfd/ab8500-core.c   |  4 ----
 drivers/mfd/arizona-irq.c   |  7 -------
 drivers/mfd/asic3.c         |  4 ++--
 drivers/mfd/db8500-prcmu.c  |  1 -
 drivers/mfd/ezx-pcap.c      |  6 +-----
 drivers/mfd/htc-egpio.c     |  4 ++--
 drivers/mfd/htc-i2cpld.c    |  6 +-----
 drivers/mfd/lp8788-irq.c    |  5 -----
 drivers/mfd/max8925-core.c  |  5 +----
 drivers/mfd/max8997-irq.c   |  5 +----
 drivers/mfd/max8998-irq.c   |  5 +----
 drivers/mfd/mt6397-core.c   |  4 ----
 drivers/mfd/pm8921-core.c   |  5 +----
 drivers/mfd/rc5t583-irq.c   |  4 +---
 drivers/mfd/stmpe.c         |  7 -------
 drivers/mfd/t7l66xb.c       |  6 ------
 drivers/mfd/tc3589x.c       |  7 -------
 drivers/mfd/tc6393xb.c      |  4 ++--
 drivers/mfd/tps6586x.c      |  7 -------
 drivers/mfd/tps65912-irq.c  |  8 +-------
 drivers/mfd/twl4030-irq.c   | 11 +----------
 drivers/mfd/twl6030-irq.c   | 13 -------------
 drivers/mfd/ucb1x00-core.c  |  2 +-
 drivers/mfd/wm831x-irq.c    |  7 -------
 drivers/mfd/wm8350-irq.c    |  8 +-------
 drivers/mfd/wm8994-irq.c    |  7 -------
 27 files changed, 17 insertions(+), 139 deletions(-)

diff --git a/drivers/mfd/88pm860x-core.c b/drivers/mfd/88pm860x-core.c
index d2a85cd..17984d65 100644
--- a/drivers/mfd/88pm860x-core.c
+++ b/drivers/mfd/88pm860x-core.c
@@ -558,11 +558,7 @@ static int pm860x_irq_domain_map(struct irq_domain *d, unsigned int virq,
 	irq_set_chip_data(virq, d->host_data);
 	irq_set_chip_and_handler(virq, &pm860x_irq_chip, handle_edge_irq);
 	irq_set_nested_thread(virq, 1);
-#ifdef CONFIG_ARM
-	set_irq_flags(virq, IRQF_VALID);
-#else
 	irq_set_noprobe(virq);
-#endif
 	return 0;
 }
 
diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
index c80a292..24a159b 100644
--- a/drivers/mfd/ab8500-core.c
+++ b/drivers/mfd/ab8500-core.c
@@ -565,11 +565,7 @@ static int ab8500_irq_map(struct irq_domain *d, unsigned int virq,
 	irq_set_chip_and_handler(virq, &ab8500_irq_chip,
 				handle_simple_irq);
 	irq_set_nested_thread(virq, 1);
-#ifdef CONFIG_ARM
-	set_irq_flags(virq, IRQF_VALID);
-#else
 	irq_set_noprobe(virq);
-#endif
 
 	return 0;
 }
diff --git a/drivers/mfd/arizona-irq.c b/drivers/mfd/arizona-irq.c
index d063b94..d32673d 100644
--- a/drivers/mfd/arizona-irq.c
+++ b/drivers/mfd/arizona-irq.c
@@ -174,14 +174,7 @@ static int arizona_irq_map(struct irq_domain *h, unsigned int virq,
 	irq_set_chip_data(virq, data);
 	irq_set_chip_and_handler(virq, &arizona_irq_chip, handle_simple_irq);
 	irq_set_nested_thread(virq, 1);
-
-	/* ARM needs us to explicitly flag the IRQ as valid
-	 * and will set them noprobe when we do so. */
-#ifdef CONFIG_ARM
-	set_irq_flags(virq, IRQF_VALID);
-#else
 	irq_set_noprobe(virq);
-#endif
 
 	return 0;
 }
diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c
index 977bd3a..54a133c 100644
--- a/drivers/mfd/asic3.c
+++ b/drivers/mfd/asic3.c
@@ -411,7 +411,7 @@ static int __init asic3_irq_probe(struct platform_device *pdev)
 
 		irq_set_chip_data(irq, asic);
 		irq_set_handler(irq, handle_level_irq);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	asic3_write_register(asic, ASIC3_OFFSET(INTR, INT_MASK),
@@ -432,7 +432,7 @@ static void asic3_irq_remove(struct platform_device *pdev)
 	irq_base = asic->irq_base;
 
 	for (irq = irq_base; irq < irq_base + ASIC3_NR_IRQS; irq++) {
-		set_irq_flags(irq, 0);
+		irq_set_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 		irq_set_chip_and_handler(irq, NULL, NULL);
 		irq_set_chip_data(irq, NULL);
 	}
diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
index cc1a404..f533717 100644
--- a/drivers/mfd/db8500-prcmu.c
+++ b/drivers/mfd/db8500-prcmu.c
@@ -2654,7 +2654,6 @@ static int db8500_irq_map(struct irq_domain *d, unsigned int virq,
 {
 	irq_set_chip_and_handler(virq, &prcmu_irq_chip,
 				handle_simple_irq);
-	set_irq_flags(virq, IRQF_VALID);
 
 	return 0;
 }
diff --git a/drivers/mfd/ezx-pcap.c b/drivers/mfd/ezx-pcap.c
index 5991fad..19e55dd 100644
--- a/drivers/mfd/ezx-pcap.c
+++ b/drivers/mfd/ezx-pcap.c
@@ -463,11 +463,7 @@ static int ezx_pcap_probe(struct spi_device *spi)
 	for (i = pcap->irq_base; i < (pcap->irq_base + PCAP_NIRQS); i++) {
 		irq_set_chip_and_handler(i, &pcap_irq_chip, handle_simple_irq);
 		irq_set_chip_data(i, pcap);
-#ifdef CONFIG_ARM
-		set_irq_flags(i, IRQF_VALID);
-#else
-		irq_set_noprobe(i);
-#endif
+		irq_clear_status_flags(i, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	/* mask/ack all PCAP interrupts */
diff --git a/drivers/mfd/htc-egpio.c b/drivers/mfd/htc-egpio.c
index 49f39fe..c9d5e3f 100644
--- a/drivers/mfd/htc-egpio.c
+++ b/drivers/mfd/htc-egpio.c
@@ -350,7 +350,7 @@ static int __init egpio_probe(struct platform_device *pdev)
 			irq_set_chip_and_handler(irq, &egpio_muxed_chip,
 						 handle_simple_irq);
 			irq_set_chip_data(irq, ei);
-			set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+			irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 		}
 		irq_set_irq_type(ei->chained_irq, IRQ_TYPE_EDGE_RISING);
 		irq_set_handler_data(ei->chained_irq, ei);
@@ -376,7 +376,7 @@ static int __exit egpio_remove(struct platform_device *pdev)
 		irq_end = ei->irq_start + ei->nirqs;
 		for (irq = ei->irq_start; irq < irq_end; irq++) {
 			irq_set_chip_and_handler(irq, NULL, NULL);
-			set_irq_flags(irq, 0);
+			irq_set_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 		}
 		irq_set_chained_handler(ei->chained_irq, NULL);
 		device_init_wakeup(&pdev->dev, 0);
diff --git a/drivers/mfd/htc-i2cpld.c b/drivers/mfd/htc-i2cpld.c
index ebb9cf1..0467c08 100644
--- a/drivers/mfd/htc-i2cpld.c
+++ b/drivers/mfd/htc-i2cpld.c
@@ -330,11 +330,7 @@ static int htcpld_setup_chip_irq(
 		irq_set_chip_and_handler(irq, &htcpld_muxed_chip,
 					 handle_simple_irq);
 		irq_set_chip_data(irq, chip);
-#ifdef CONFIG_ARM
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
-#else
-		irq_set_probe(irq);
-#endif
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	return ret;
diff --git a/drivers/mfd/lp8788-irq.c b/drivers/mfd/lp8788-irq.c
index 23982db..6476b4f 100644
--- a/drivers/mfd/lp8788-irq.c
+++ b/drivers/mfd/lp8788-irq.c
@@ -141,12 +141,7 @@ static int lp8788_irq_map(struct irq_domain *d, unsigned int virq,
 	irq_set_chip_data(virq, irqd);
 	irq_set_chip_and_handler(virq, chip, handle_edge_irq);
 	irq_set_nested_thread(virq, 1);
-
-#ifdef CONFIG_ARM
-	set_irq_flags(virq, IRQF_VALID);
-#else
 	irq_set_noprobe(virq);
-#endif
 
 	return 0;
 }
diff --git a/drivers/mfd/max8925-core.c b/drivers/mfd/max8925-core.c
index 97a787a..d755ef8 100644
--- a/drivers/mfd/max8925-core.c
+++ b/drivers/mfd/max8925-core.c
@@ -650,11 +650,8 @@ static int max8925_irq_domain_map(struct irq_domain *d, unsigned int virq,
 	irq_set_chip_data(virq, d->host_data);
 	irq_set_chip_and_handler(virq, &max8925_irq_chip, handle_edge_irq);
 	irq_set_nested_thread(virq, 1);
-#ifdef CONFIG_ARM
-	set_irq_flags(virq, IRQF_VALID);
-#else
 	irq_set_noprobe(virq);
-#endif
+
 	return 0;
 }
 
diff --git a/drivers/mfd/max8997-irq.c b/drivers/mfd/max8997-irq.c
index 43fa614..ce025b2f 100644
--- a/drivers/mfd/max8997-irq.c
+++ b/drivers/mfd/max8997-irq.c
@@ -295,11 +295,8 @@ static int max8997_irq_domain_map(struct irq_domain *d, unsigned int irq,
 	irq_set_chip_data(irq, max8997);
 	irq_set_chip_and_handler(irq, &max8997_irq_chip, handle_edge_irq);
 	irq_set_nested_thread(irq, 1);
-#ifdef CONFIG_ARM
-	set_irq_flags(irq, IRQF_VALID);
-#else
 	irq_set_noprobe(irq);
-#endif
+
 	return 0;
 }
 
diff --git a/drivers/mfd/max8998-irq.c b/drivers/mfd/max8998-irq.c
index c469477..8a37cf1 100644
--- a/drivers/mfd/max8998-irq.c
+++ b/drivers/mfd/max8998-irq.c
@@ -206,11 +206,8 @@ static int max8998_irq_domain_map(struct irq_domain *d, unsigned int irq,
 	irq_set_chip_data(irq, max8998);
 	irq_set_chip_and_handler(irq, &max8998_irq_chip, handle_edge_irq);
 	irq_set_nested_thread(irq, 1);
-#ifdef CONFIG_ARM
-	set_irq_flags(irq, IRQF_VALID);
-#else
 	irq_set_noprobe(irq);
-#endif
+
 	return 0;
 }
 
diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
index 09bc780..c076e48 100644
--- a/drivers/mfd/mt6397-core.c
+++ b/drivers/mfd/mt6397-core.c
@@ -121,11 +121,7 @@ static int mt6397_irq_domain_map(struct irq_domain *d, unsigned int irq,
 	irq_set_chip_data(irq, mt6397);
 	irq_set_chip_and_handler(irq, &mt6397_irq_chip, handle_level_irq);
 	irq_set_nested_thread(irq, 1);
-#ifdef CONFIG_ARM
-	set_irq_flags(irq, IRQF_VALID);
-#else
 	irq_set_noprobe(irq);
-#endif
 
 	return 0;
 }
diff --git a/drivers/mfd/pm8921-core.c b/drivers/mfd/pm8921-core.c
index 5a92646..8ef8d71 100644
--- a/drivers/mfd/pm8921-core.c
+++ b/drivers/mfd/pm8921-core.c
@@ -251,11 +251,8 @@ static int pm8xxx_irq_domain_map(struct irq_domain *d, unsigned int irq,
 
 	irq_set_chip_and_handler(irq, &pm8xxx_irq_chip, handle_level_irq);
 	irq_set_chip_data(irq, chip);
-#ifdef CONFIG_ARM
-	set_irq_flags(irq, IRQF_VALID);
-#else
 	irq_set_noprobe(irq);
-#endif
+
 	return 0;
 }
 
diff --git a/drivers/mfd/rc5t583-irq.c b/drivers/mfd/rc5t583-irq.c
index bb85020..3f8812d 100644
--- a/drivers/mfd/rc5t583-irq.c
+++ b/drivers/mfd/rc5t583-irq.c
@@ -386,9 +386,7 @@ int rc5t583_irq_init(struct rc5t583 *rc5t583, int irq, int irq_base)
 		irq_set_chip_and_handler(__irq, &rc5t583_irq_chip,
 					 handle_simple_irq);
 		irq_set_nested_thread(__irq, 1);
-#ifdef CONFIG_ARM
-		set_irq_flags(__irq, IRQF_VALID);
-#endif
+		irq_clear_status_flags(__irq, IRQ_NOREQUEST);
 	}
 
 	ret = request_threaded_irq(irq, NULL, rc5t583_irq, IRQF_ONESHOT,
diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
index 2d7fae9..ef3edd7 100644
--- a/drivers/mfd/stmpe.c
+++ b/drivers/mfd/stmpe.c
@@ -971,20 +971,13 @@ static int stmpe_irq_map(struct irq_domain *d, unsigned int virq,
 	irq_set_chip_data(virq, stmpe);
 	irq_set_chip_and_handler(virq, chip, handle_edge_irq);
 	irq_set_nested_thread(virq, 1);
-#ifdef CONFIG_ARM
-	set_irq_flags(virq, IRQF_VALID);
-#else
 	irq_set_noprobe(virq);
-#endif
 
 	return 0;
 }
 
 static void stmpe_irq_unmap(struct irq_domain *d, unsigned int virq)
 {
-#ifdef CONFIG_ARM
-		set_irq_flags(virq, 0);
-#endif
 		irq_set_chip_and_handler(virq, NULL, NULL);
 		irq_set_chip_data(virq, NULL);
 }
diff --git a/drivers/mfd/t7l66xb.c b/drivers/mfd/t7l66xb.c
index c09fb5d..01af111 100644
--- a/drivers/mfd/t7l66xb.c
+++ b/drivers/mfd/t7l66xb.c
@@ -246,9 +246,6 @@ static void t7l66xb_attach_irq(struct platform_device *dev)
 	for (irq = irq_base; irq < irq_base + T7L66XB_NR_IRQS; irq++) {
 		irq_set_chip_and_handler(irq, &t7l66xb_chip, handle_level_irq);
 		irq_set_chip_data(irq, t7l66xb);
-#ifdef CONFIG_ARM
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
-#endif
 	}
 
 	irq_set_irq_type(t7l66xb->irq, IRQ_TYPE_EDGE_FALLING);
@@ -267,9 +264,6 @@ static void t7l66xb_detach_irq(struct platform_device *dev)
 	irq_set_handler_data(t7l66xb->irq, NULL);
 
 	for (irq = irq_base; irq < irq_base + T7L66XB_NR_IRQS; irq++) {
-#ifdef CONFIG_ARM
-		set_irq_flags(irq, 0);
-#endif
 		irq_set_chip(irq, NULL);
 		irq_set_chip_data(irq, NULL);
 	}
diff --git a/drivers/mfd/tc3589x.c b/drivers/mfd/tc3589x.c
index cf35639..e7d14e5 100644
--- a/drivers/mfd/tc3589x.c
+++ b/drivers/mfd/tc3589x.c
@@ -215,20 +215,13 @@ static int tc3589x_irq_map(struct irq_domain *d, unsigned int virq,
 	irq_set_chip_and_handler(virq, &dummy_irq_chip,
 				handle_edge_irq);
 	irq_set_nested_thread(virq, 1);
-#ifdef CONFIG_ARM
-	set_irq_flags(virq, IRQF_VALID);
-#else
 	irq_set_noprobe(virq);
-#endif
 
 	return 0;
 }
 
 static void tc3589x_irq_unmap(struct irq_domain *d, unsigned int virq)
 {
-#ifdef CONFIG_ARM
-	set_irq_flags(virq, 0);
-#endif
 	irq_set_chip_and_handler(virq, NULL, NULL);
 	irq_set_chip_data(virq, NULL);
 }
diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
index 63458b3..c108472 100644
--- a/drivers/mfd/tc6393xb.c
+++ b/drivers/mfd/tc6393xb.c
@@ -586,7 +586,7 @@ static void tc6393xb_attach_irq(struct platform_device *dev)
 	for (irq = irq_base; irq < irq_base + TC6393XB_NR_IRQS; irq++) {
 		irq_set_chip_and_handler(irq, &tc6393xb_chip, handle_edge_irq);
 		irq_set_chip_data(irq, tc6393xb);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	irq_set_irq_type(tc6393xb->irq, IRQ_TYPE_EDGE_FALLING);
@@ -605,7 +605,7 @@ static void tc6393xb_detach_irq(struct platform_device *dev)
 	irq_base = tc6393xb->irq_base;
 
 	for (irq = irq_base; irq < irq_base + TC6393XB_NR_IRQS; irq++) {
-		set_irq_flags(irq, 0);
+		irq_set_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 		irq_set_chip(irq, NULL);
 		irq_set_chip_data(irq, NULL);
 	}
diff --git a/drivers/mfd/tps6586x.c b/drivers/mfd/tps6586x.c
index 8e1dbc4..a4f0251 100644
--- a/drivers/mfd/tps6586x.c
+++ b/drivers/mfd/tps6586x.c
@@ -299,14 +299,7 @@ static int tps6586x_irq_map(struct irq_domain *h, unsigned int virq,
 	irq_set_chip_data(virq, tps6586x);
 	irq_set_chip_and_handler(virq, &tps6586x_irq_chip, handle_simple_irq);
 	irq_set_nested_thread(virq, 1);
-
-	/* ARM needs us to explicitly flag the IRQ as valid
-	 * and will set them noprobe when we do so. */
-#ifdef CONFIG_ARM
-	set_irq_flags(virq, IRQF_VALID);
-#else
 	irq_set_noprobe(virq);
-#endif
 
 	return 0;
 }
diff --git a/drivers/mfd/tps65912-irq.c b/drivers/mfd/tps65912-irq.c
index fbecec7..db2c29cb 100644
--- a/drivers/mfd/tps65912-irq.c
+++ b/drivers/mfd/tps65912-irq.c
@@ -197,13 +197,7 @@ int tps65912_irq_init(struct tps65912 *tps65912, int irq,
 		irq_set_chip_and_handler(cur_irq, &tps65912_irq_chip,
 					 handle_edge_irq);
 		irq_set_nested_thread(cur_irq, 1);
-		/* ARM needs us to explicitly flag the IRQ as valid
-		 * and will set them noprobe when we do so. */
-#ifdef CONFIG_ARM
-		set_irq_flags(cur_irq, IRQF_VALID);
-#else
-		irq_set_noprobe(cur_irq);
-#endif
+		irq_clear_status_flags(cur_irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	ret = request_threaded_irq(irq, NULL, tps65912_irq, flags,
diff --git a/drivers/mfd/twl4030-irq.c b/drivers/mfd/twl4030-irq.c
index 1b772ef..7c36fc0 100644
--- a/drivers/mfd/twl4030-irq.c
+++ b/drivers/mfd/twl4030-irq.c
@@ -419,16 +419,7 @@ static int twl4030_init_sih_modules(unsigned line)
 
 static inline void activate_irq(int irq)
 {
-#ifdef CONFIG_ARM
-	/*
-	 * ARM requires an extra step to clear IRQ_NOREQUEST, which it
-	 * sets on behalf of every irq_chip.  Also sets IRQ_NOPROBE.
-	 */
-	set_irq_flags(irq, IRQF_VALID);
-#else
-	/* same effect on other architectures */
-	irq_set_noprobe(irq);
-#endif
+	irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 }
 
 /*----------------------------------------------------------------------*/
diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c
index 2807e1a..f7ea098 100644
--- a/drivers/mfd/twl6030-irq.c
+++ b/drivers/mfd/twl6030-irq.c
@@ -352,26 +352,13 @@ static int twl6030_irq_map(struct irq_domain *d, unsigned int virq,
 	irq_set_chip_and_handler(virq,  &pdata->irq_chip, handle_simple_irq);
 	irq_set_nested_thread(virq, true);
 	irq_set_parent(virq, pdata->twl_irq);
-
-#ifdef CONFIG_ARM
-	/*
-	 * ARM requires an extra step to clear IRQ_NOREQUEST, which it
-	 * sets on behalf of every irq_chip.  Also sets IRQ_NOPROBE.
-	 */
-	set_irq_flags(virq, IRQF_VALID);
-#else
-	/* same effect on other architectures */
 	irq_set_noprobe(virq);
-#endif
 
 	return 0;
 }
 
 static void twl6030_irq_unmap(struct irq_domain *d, unsigned int virq)
 {
-#ifdef CONFIG_ARM
-	set_irq_flags(virq, 0);
-#endif
 	irq_set_chip_and_handler(virq, NULL, NULL);
 	irq_set_chip_data(virq, NULL);
 }
diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c
index 58ea9fd..c706ead 100644
--- a/drivers/mfd/ucb1x00-core.c
+++ b/drivers/mfd/ucb1x00-core.c
@@ -562,7 +562,7 @@ static int ucb1x00_probe(struct mcp *mcp)
 
 		irq_set_chip_and_handler(irq, &ucb1x00_irqchip, handle_edge_irq);
 		irq_set_chip_data(irq, ucb);
-		set_irq_flags(irq, IRQF_VALID | IRQ_NOREQUEST);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST);
 	}
 
 	irq_set_irq_type(ucb->irq, IRQ_TYPE_EDGE_RISING);
diff --git a/drivers/mfd/wm831x-irq.c b/drivers/mfd/wm831x-irq.c
index 64e512e..0edf213 100644
--- a/drivers/mfd/wm831x-irq.c
+++ b/drivers/mfd/wm831x-irq.c
@@ -552,14 +552,7 @@ static int wm831x_irq_map(struct irq_domain *h, unsigned int virq,
 	irq_set_chip_data(virq, h->host_data);
 	irq_set_chip_and_handler(virq, &wm831x_irq_chip, handle_edge_irq);
 	irq_set_nested_thread(virq, 1);
-
-	/* ARM needs us to explicitly flag the IRQ as valid
-	 * and will set them noprobe when we do so. */
-#ifdef CONFIG_ARM
-	set_irq_flags(virq, IRQF_VALID);
-#else
 	irq_set_noprobe(virq);
-#endif
 
 	return 0;
 }
diff --git a/drivers/mfd/wm8350-irq.c b/drivers/mfd/wm8350-irq.c
index 813ff50..27054f3 100644
--- a/drivers/mfd/wm8350-irq.c
+++ b/drivers/mfd/wm8350-irq.c
@@ -526,13 +526,7 @@ int wm8350_irq_init(struct wm8350 *wm8350, int irq,
 					 handle_edge_irq);
 		irq_set_nested_thread(cur_irq, 1);
 
-		/* ARM needs us to explicitly flag the IRQ as valid
-		 * and will set them noprobe when we do so. */
-#ifdef CONFIG_ARM
-		set_irq_flags(cur_irq, IRQF_VALID);
-#else
-		irq_set_noprobe(cur_irq);
-#endif
+		irq_clear_status_flags(cur_irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	ret = request_threaded_irq(irq, NULL, wm8350_irq, flags,
diff --git a/drivers/mfd/wm8994-irq.c b/drivers/mfd/wm8994-irq.c
index a14407e..6dbf108 100644
--- a/drivers/mfd/wm8994-irq.c
+++ b/drivers/mfd/wm8994-irq.c
@@ -172,14 +172,7 @@ static int wm8994_edge_irq_map(struct irq_domain *h, unsigned int virq,
 	irq_set_chip_data(virq, wm8994);
 	irq_set_chip_and_handler(virq, &wm8994_edge_irq_chip, handle_edge_irq);
 	irq_set_nested_thread(virq, 1);
-
-	/* ARM needs us to explicitly flag the IRQ as valid
-	 * and will set them noprobe when we do so. */
-#ifdef CONFIG_ARM
-	set_irq_flags(virq, IRQF_VALID);
-#else
 	irq_set_noprobe(virq);
-#endif
 
 	return 0;
 }
-- 
2.1.0


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

* [PATCH 09/15] mfd: kill off set_irq_flags usage
@ 2015-06-09 18:26   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: linux-arm-kernel

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Milo Kim <milo.kim@ti.com>
Cc: Kumar Gala <galak@codeaurora.org>
Cc: Andy Gross <agross@codeaurora.org>
Cc: David Brown <davidb@codeaurora.org>
Cc: Tony Lindgren <tony@atomide.com>
Cc: linux-arm-kernel at lists.infradead.org
Cc: patches at opensource.wolfsonmicro.com
Cc: linux-arm-msm at vger.kernel.org
Cc: linux-soc at vger.kernel.org
Cc: linux-omap at vger.kernel.org
---
 drivers/mfd/88pm860x-core.c |  4 ----
 drivers/mfd/ab8500-core.c   |  4 ----
 drivers/mfd/arizona-irq.c   |  7 -------
 drivers/mfd/asic3.c         |  4 ++--
 drivers/mfd/db8500-prcmu.c  |  1 -
 drivers/mfd/ezx-pcap.c      |  6 +-----
 drivers/mfd/htc-egpio.c     |  4 ++--
 drivers/mfd/htc-i2cpld.c    |  6 +-----
 drivers/mfd/lp8788-irq.c    |  5 -----
 drivers/mfd/max8925-core.c  |  5 +----
 drivers/mfd/max8997-irq.c   |  5 +----
 drivers/mfd/max8998-irq.c   |  5 +----
 drivers/mfd/mt6397-core.c   |  4 ----
 drivers/mfd/pm8921-core.c   |  5 +----
 drivers/mfd/rc5t583-irq.c   |  4 +---
 drivers/mfd/stmpe.c         |  7 -------
 drivers/mfd/t7l66xb.c       |  6 ------
 drivers/mfd/tc3589x.c       |  7 -------
 drivers/mfd/tc6393xb.c      |  4 ++--
 drivers/mfd/tps6586x.c      |  7 -------
 drivers/mfd/tps65912-irq.c  |  8 +-------
 drivers/mfd/twl4030-irq.c   | 11 +----------
 drivers/mfd/twl6030-irq.c   | 13 -------------
 drivers/mfd/ucb1x00-core.c  |  2 +-
 drivers/mfd/wm831x-irq.c    |  7 -------
 drivers/mfd/wm8350-irq.c    |  8 +-------
 drivers/mfd/wm8994-irq.c    |  7 -------
 27 files changed, 17 insertions(+), 139 deletions(-)

diff --git a/drivers/mfd/88pm860x-core.c b/drivers/mfd/88pm860x-core.c
index d2a85cd..17984d65 100644
--- a/drivers/mfd/88pm860x-core.c
+++ b/drivers/mfd/88pm860x-core.c
@@ -558,11 +558,7 @@ static int pm860x_irq_domain_map(struct irq_domain *d, unsigned int virq,
 	irq_set_chip_data(virq, d->host_data);
 	irq_set_chip_and_handler(virq, &pm860x_irq_chip, handle_edge_irq);
 	irq_set_nested_thread(virq, 1);
-#ifdef CONFIG_ARM
-	set_irq_flags(virq, IRQF_VALID);
-#else
 	irq_set_noprobe(virq);
-#endif
 	return 0;
 }
 
diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
index c80a292..24a159b 100644
--- a/drivers/mfd/ab8500-core.c
+++ b/drivers/mfd/ab8500-core.c
@@ -565,11 +565,7 @@ static int ab8500_irq_map(struct irq_domain *d, unsigned int virq,
 	irq_set_chip_and_handler(virq, &ab8500_irq_chip,
 				handle_simple_irq);
 	irq_set_nested_thread(virq, 1);
-#ifdef CONFIG_ARM
-	set_irq_flags(virq, IRQF_VALID);
-#else
 	irq_set_noprobe(virq);
-#endif
 
 	return 0;
 }
diff --git a/drivers/mfd/arizona-irq.c b/drivers/mfd/arizona-irq.c
index d063b94..d32673d 100644
--- a/drivers/mfd/arizona-irq.c
+++ b/drivers/mfd/arizona-irq.c
@@ -174,14 +174,7 @@ static int arizona_irq_map(struct irq_domain *h, unsigned int virq,
 	irq_set_chip_data(virq, data);
 	irq_set_chip_and_handler(virq, &arizona_irq_chip, handle_simple_irq);
 	irq_set_nested_thread(virq, 1);
-
-	/* ARM needs us to explicitly flag the IRQ as valid
-	 * and will set them noprobe when we do so. */
-#ifdef CONFIG_ARM
-	set_irq_flags(virq, IRQF_VALID);
-#else
 	irq_set_noprobe(virq);
-#endif
 
 	return 0;
 }
diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c
index 977bd3a..54a133c 100644
--- a/drivers/mfd/asic3.c
+++ b/drivers/mfd/asic3.c
@@ -411,7 +411,7 @@ static int __init asic3_irq_probe(struct platform_device *pdev)
 
 		irq_set_chip_data(irq, asic);
 		irq_set_handler(irq, handle_level_irq);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	asic3_write_register(asic, ASIC3_OFFSET(INTR, INT_MASK),
@@ -432,7 +432,7 @@ static void asic3_irq_remove(struct platform_device *pdev)
 	irq_base = asic->irq_base;
 
 	for (irq = irq_base; irq < irq_base + ASIC3_NR_IRQS; irq++) {
-		set_irq_flags(irq, 0);
+		irq_set_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 		irq_set_chip_and_handler(irq, NULL, NULL);
 		irq_set_chip_data(irq, NULL);
 	}
diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
index cc1a404..f533717 100644
--- a/drivers/mfd/db8500-prcmu.c
+++ b/drivers/mfd/db8500-prcmu.c
@@ -2654,7 +2654,6 @@ static int db8500_irq_map(struct irq_domain *d, unsigned int virq,
 {
 	irq_set_chip_and_handler(virq, &prcmu_irq_chip,
 				handle_simple_irq);
-	set_irq_flags(virq, IRQF_VALID);
 
 	return 0;
 }
diff --git a/drivers/mfd/ezx-pcap.c b/drivers/mfd/ezx-pcap.c
index 5991fad..19e55dd 100644
--- a/drivers/mfd/ezx-pcap.c
+++ b/drivers/mfd/ezx-pcap.c
@@ -463,11 +463,7 @@ static int ezx_pcap_probe(struct spi_device *spi)
 	for (i = pcap->irq_base; i < (pcap->irq_base + PCAP_NIRQS); i++) {
 		irq_set_chip_and_handler(i, &pcap_irq_chip, handle_simple_irq);
 		irq_set_chip_data(i, pcap);
-#ifdef CONFIG_ARM
-		set_irq_flags(i, IRQF_VALID);
-#else
-		irq_set_noprobe(i);
-#endif
+		irq_clear_status_flags(i, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	/* mask/ack all PCAP interrupts */
diff --git a/drivers/mfd/htc-egpio.c b/drivers/mfd/htc-egpio.c
index 49f39fe..c9d5e3f 100644
--- a/drivers/mfd/htc-egpio.c
+++ b/drivers/mfd/htc-egpio.c
@@ -350,7 +350,7 @@ static int __init egpio_probe(struct platform_device *pdev)
 			irq_set_chip_and_handler(irq, &egpio_muxed_chip,
 						 handle_simple_irq);
 			irq_set_chip_data(irq, ei);
-			set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+			irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 		}
 		irq_set_irq_type(ei->chained_irq, IRQ_TYPE_EDGE_RISING);
 		irq_set_handler_data(ei->chained_irq, ei);
@@ -376,7 +376,7 @@ static int __exit egpio_remove(struct platform_device *pdev)
 		irq_end = ei->irq_start + ei->nirqs;
 		for (irq = ei->irq_start; irq < irq_end; irq++) {
 			irq_set_chip_and_handler(irq, NULL, NULL);
-			set_irq_flags(irq, 0);
+			irq_set_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 		}
 		irq_set_chained_handler(ei->chained_irq, NULL);
 		device_init_wakeup(&pdev->dev, 0);
diff --git a/drivers/mfd/htc-i2cpld.c b/drivers/mfd/htc-i2cpld.c
index ebb9cf1..0467c08 100644
--- a/drivers/mfd/htc-i2cpld.c
+++ b/drivers/mfd/htc-i2cpld.c
@@ -330,11 +330,7 @@ static int htcpld_setup_chip_irq(
 		irq_set_chip_and_handler(irq, &htcpld_muxed_chip,
 					 handle_simple_irq);
 		irq_set_chip_data(irq, chip);
-#ifdef CONFIG_ARM
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
-#else
-		irq_set_probe(irq);
-#endif
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	return ret;
diff --git a/drivers/mfd/lp8788-irq.c b/drivers/mfd/lp8788-irq.c
index 23982db..6476b4f 100644
--- a/drivers/mfd/lp8788-irq.c
+++ b/drivers/mfd/lp8788-irq.c
@@ -141,12 +141,7 @@ static int lp8788_irq_map(struct irq_domain *d, unsigned int virq,
 	irq_set_chip_data(virq, irqd);
 	irq_set_chip_and_handler(virq, chip, handle_edge_irq);
 	irq_set_nested_thread(virq, 1);
-
-#ifdef CONFIG_ARM
-	set_irq_flags(virq, IRQF_VALID);
-#else
 	irq_set_noprobe(virq);
-#endif
 
 	return 0;
 }
diff --git a/drivers/mfd/max8925-core.c b/drivers/mfd/max8925-core.c
index 97a787a..d755ef8 100644
--- a/drivers/mfd/max8925-core.c
+++ b/drivers/mfd/max8925-core.c
@@ -650,11 +650,8 @@ static int max8925_irq_domain_map(struct irq_domain *d, unsigned int virq,
 	irq_set_chip_data(virq, d->host_data);
 	irq_set_chip_and_handler(virq, &max8925_irq_chip, handle_edge_irq);
 	irq_set_nested_thread(virq, 1);
-#ifdef CONFIG_ARM
-	set_irq_flags(virq, IRQF_VALID);
-#else
 	irq_set_noprobe(virq);
-#endif
+
 	return 0;
 }
 
diff --git a/drivers/mfd/max8997-irq.c b/drivers/mfd/max8997-irq.c
index 43fa614..ce025b2f 100644
--- a/drivers/mfd/max8997-irq.c
+++ b/drivers/mfd/max8997-irq.c
@@ -295,11 +295,8 @@ static int max8997_irq_domain_map(struct irq_domain *d, unsigned int irq,
 	irq_set_chip_data(irq, max8997);
 	irq_set_chip_and_handler(irq, &max8997_irq_chip, handle_edge_irq);
 	irq_set_nested_thread(irq, 1);
-#ifdef CONFIG_ARM
-	set_irq_flags(irq, IRQF_VALID);
-#else
 	irq_set_noprobe(irq);
-#endif
+
 	return 0;
 }
 
diff --git a/drivers/mfd/max8998-irq.c b/drivers/mfd/max8998-irq.c
index c469477..8a37cf1 100644
--- a/drivers/mfd/max8998-irq.c
+++ b/drivers/mfd/max8998-irq.c
@@ -206,11 +206,8 @@ static int max8998_irq_domain_map(struct irq_domain *d, unsigned int irq,
 	irq_set_chip_data(irq, max8998);
 	irq_set_chip_and_handler(irq, &max8998_irq_chip, handle_edge_irq);
 	irq_set_nested_thread(irq, 1);
-#ifdef CONFIG_ARM
-	set_irq_flags(irq, IRQF_VALID);
-#else
 	irq_set_noprobe(irq);
-#endif
+
 	return 0;
 }
 
diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
index 09bc780..c076e48 100644
--- a/drivers/mfd/mt6397-core.c
+++ b/drivers/mfd/mt6397-core.c
@@ -121,11 +121,7 @@ static int mt6397_irq_domain_map(struct irq_domain *d, unsigned int irq,
 	irq_set_chip_data(irq, mt6397);
 	irq_set_chip_and_handler(irq, &mt6397_irq_chip, handle_level_irq);
 	irq_set_nested_thread(irq, 1);
-#ifdef CONFIG_ARM
-	set_irq_flags(irq, IRQF_VALID);
-#else
 	irq_set_noprobe(irq);
-#endif
 
 	return 0;
 }
diff --git a/drivers/mfd/pm8921-core.c b/drivers/mfd/pm8921-core.c
index 5a92646..8ef8d71 100644
--- a/drivers/mfd/pm8921-core.c
+++ b/drivers/mfd/pm8921-core.c
@@ -251,11 +251,8 @@ static int pm8xxx_irq_domain_map(struct irq_domain *d, unsigned int irq,
 
 	irq_set_chip_and_handler(irq, &pm8xxx_irq_chip, handle_level_irq);
 	irq_set_chip_data(irq, chip);
-#ifdef CONFIG_ARM
-	set_irq_flags(irq, IRQF_VALID);
-#else
 	irq_set_noprobe(irq);
-#endif
+
 	return 0;
 }
 
diff --git a/drivers/mfd/rc5t583-irq.c b/drivers/mfd/rc5t583-irq.c
index bb85020..3f8812d 100644
--- a/drivers/mfd/rc5t583-irq.c
+++ b/drivers/mfd/rc5t583-irq.c
@@ -386,9 +386,7 @@ int rc5t583_irq_init(struct rc5t583 *rc5t583, int irq, int irq_base)
 		irq_set_chip_and_handler(__irq, &rc5t583_irq_chip,
 					 handle_simple_irq);
 		irq_set_nested_thread(__irq, 1);
-#ifdef CONFIG_ARM
-		set_irq_flags(__irq, IRQF_VALID);
-#endif
+		irq_clear_status_flags(__irq, IRQ_NOREQUEST);
 	}
 
 	ret = request_threaded_irq(irq, NULL, rc5t583_irq, IRQF_ONESHOT,
diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
index 2d7fae9..ef3edd7 100644
--- a/drivers/mfd/stmpe.c
+++ b/drivers/mfd/stmpe.c
@@ -971,20 +971,13 @@ static int stmpe_irq_map(struct irq_domain *d, unsigned int virq,
 	irq_set_chip_data(virq, stmpe);
 	irq_set_chip_and_handler(virq, chip, handle_edge_irq);
 	irq_set_nested_thread(virq, 1);
-#ifdef CONFIG_ARM
-	set_irq_flags(virq, IRQF_VALID);
-#else
 	irq_set_noprobe(virq);
-#endif
 
 	return 0;
 }
 
 static void stmpe_irq_unmap(struct irq_domain *d, unsigned int virq)
 {
-#ifdef CONFIG_ARM
-		set_irq_flags(virq, 0);
-#endif
 		irq_set_chip_and_handler(virq, NULL, NULL);
 		irq_set_chip_data(virq, NULL);
 }
diff --git a/drivers/mfd/t7l66xb.c b/drivers/mfd/t7l66xb.c
index c09fb5d..01af111 100644
--- a/drivers/mfd/t7l66xb.c
+++ b/drivers/mfd/t7l66xb.c
@@ -246,9 +246,6 @@ static void t7l66xb_attach_irq(struct platform_device *dev)
 	for (irq = irq_base; irq < irq_base + T7L66XB_NR_IRQS; irq++) {
 		irq_set_chip_and_handler(irq, &t7l66xb_chip, handle_level_irq);
 		irq_set_chip_data(irq, t7l66xb);
-#ifdef CONFIG_ARM
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
-#endif
 	}
 
 	irq_set_irq_type(t7l66xb->irq, IRQ_TYPE_EDGE_FALLING);
@@ -267,9 +264,6 @@ static void t7l66xb_detach_irq(struct platform_device *dev)
 	irq_set_handler_data(t7l66xb->irq, NULL);
 
 	for (irq = irq_base; irq < irq_base + T7L66XB_NR_IRQS; irq++) {
-#ifdef CONFIG_ARM
-		set_irq_flags(irq, 0);
-#endif
 		irq_set_chip(irq, NULL);
 		irq_set_chip_data(irq, NULL);
 	}
diff --git a/drivers/mfd/tc3589x.c b/drivers/mfd/tc3589x.c
index cf35639..e7d14e5 100644
--- a/drivers/mfd/tc3589x.c
+++ b/drivers/mfd/tc3589x.c
@@ -215,20 +215,13 @@ static int tc3589x_irq_map(struct irq_domain *d, unsigned int virq,
 	irq_set_chip_and_handler(virq, &dummy_irq_chip,
 				handle_edge_irq);
 	irq_set_nested_thread(virq, 1);
-#ifdef CONFIG_ARM
-	set_irq_flags(virq, IRQF_VALID);
-#else
 	irq_set_noprobe(virq);
-#endif
 
 	return 0;
 }
 
 static void tc3589x_irq_unmap(struct irq_domain *d, unsigned int virq)
 {
-#ifdef CONFIG_ARM
-	set_irq_flags(virq, 0);
-#endif
 	irq_set_chip_and_handler(virq, NULL, NULL);
 	irq_set_chip_data(virq, NULL);
 }
diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
index 63458b3..c108472 100644
--- a/drivers/mfd/tc6393xb.c
+++ b/drivers/mfd/tc6393xb.c
@@ -586,7 +586,7 @@ static void tc6393xb_attach_irq(struct platform_device *dev)
 	for (irq = irq_base; irq < irq_base + TC6393XB_NR_IRQS; irq++) {
 		irq_set_chip_and_handler(irq, &tc6393xb_chip, handle_edge_irq);
 		irq_set_chip_data(irq, tc6393xb);
-		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	irq_set_irq_type(tc6393xb->irq, IRQ_TYPE_EDGE_FALLING);
@@ -605,7 +605,7 @@ static void tc6393xb_detach_irq(struct platform_device *dev)
 	irq_base = tc6393xb->irq_base;
 
 	for (irq = irq_base; irq < irq_base + TC6393XB_NR_IRQS; irq++) {
-		set_irq_flags(irq, 0);
+		irq_set_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 		irq_set_chip(irq, NULL);
 		irq_set_chip_data(irq, NULL);
 	}
diff --git a/drivers/mfd/tps6586x.c b/drivers/mfd/tps6586x.c
index 8e1dbc4..a4f0251 100644
--- a/drivers/mfd/tps6586x.c
+++ b/drivers/mfd/tps6586x.c
@@ -299,14 +299,7 @@ static int tps6586x_irq_map(struct irq_domain *h, unsigned int virq,
 	irq_set_chip_data(virq, tps6586x);
 	irq_set_chip_and_handler(virq, &tps6586x_irq_chip, handle_simple_irq);
 	irq_set_nested_thread(virq, 1);
-
-	/* ARM needs us to explicitly flag the IRQ as valid
-	 * and will set them noprobe when we do so. */
-#ifdef CONFIG_ARM
-	set_irq_flags(virq, IRQF_VALID);
-#else
 	irq_set_noprobe(virq);
-#endif
 
 	return 0;
 }
diff --git a/drivers/mfd/tps65912-irq.c b/drivers/mfd/tps65912-irq.c
index fbecec7..db2c29cb 100644
--- a/drivers/mfd/tps65912-irq.c
+++ b/drivers/mfd/tps65912-irq.c
@@ -197,13 +197,7 @@ int tps65912_irq_init(struct tps65912 *tps65912, int irq,
 		irq_set_chip_and_handler(cur_irq, &tps65912_irq_chip,
 					 handle_edge_irq);
 		irq_set_nested_thread(cur_irq, 1);
-		/* ARM needs us to explicitly flag the IRQ as valid
-		 * and will set them noprobe when we do so. */
-#ifdef CONFIG_ARM
-		set_irq_flags(cur_irq, IRQF_VALID);
-#else
-		irq_set_noprobe(cur_irq);
-#endif
+		irq_clear_status_flags(cur_irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	ret = request_threaded_irq(irq, NULL, tps65912_irq, flags,
diff --git a/drivers/mfd/twl4030-irq.c b/drivers/mfd/twl4030-irq.c
index 1b772ef..7c36fc0 100644
--- a/drivers/mfd/twl4030-irq.c
+++ b/drivers/mfd/twl4030-irq.c
@@ -419,16 +419,7 @@ static int twl4030_init_sih_modules(unsigned line)
 
 static inline void activate_irq(int irq)
 {
-#ifdef CONFIG_ARM
-	/*
-	 * ARM requires an extra step to clear IRQ_NOREQUEST, which it
-	 * sets on behalf of every irq_chip.  Also sets IRQ_NOPROBE.
-	 */
-	set_irq_flags(irq, IRQF_VALID);
-#else
-	/* same effect on other architectures */
-	irq_set_noprobe(irq);
-#endif
+	irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 }
 
 /*----------------------------------------------------------------------*/
diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c
index 2807e1a..f7ea098 100644
--- a/drivers/mfd/twl6030-irq.c
+++ b/drivers/mfd/twl6030-irq.c
@@ -352,26 +352,13 @@ static int twl6030_irq_map(struct irq_domain *d, unsigned int virq,
 	irq_set_chip_and_handler(virq,  &pdata->irq_chip, handle_simple_irq);
 	irq_set_nested_thread(virq, true);
 	irq_set_parent(virq, pdata->twl_irq);
-
-#ifdef CONFIG_ARM
-	/*
-	 * ARM requires an extra step to clear IRQ_NOREQUEST, which it
-	 * sets on behalf of every irq_chip.  Also sets IRQ_NOPROBE.
-	 */
-	set_irq_flags(virq, IRQF_VALID);
-#else
-	/* same effect on other architectures */
 	irq_set_noprobe(virq);
-#endif
 
 	return 0;
 }
 
 static void twl6030_irq_unmap(struct irq_domain *d, unsigned int virq)
 {
-#ifdef CONFIG_ARM
-	set_irq_flags(virq, 0);
-#endif
 	irq_set_chip_and_handler(virq, NULL, NULL);
 	irq_set_chip_data(virq, NULL);
 }
diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c
index 58ea9fd..c706ead 100644
--- a/drivers/mfd/ucb1x00-core.c
+++ b/drivers/mfd/ucb1x00-core.c
@@ -562,7 +562,7 @@ static int ucb1x00_probe(struct mcp *mcp)
 
 		irq_set_chip_and_handler(irq, &ucb1x00_irqchip, handle_edge_irq);
 		irq_set_chip_data(irq, ucb);
-		set_irq_flags(irq, IRQF_VALID | IRQ_NOREQUEST);
+		irq_clear_status_flags(irq, IRQ_NOREQUEST);
 	}
 
 	irq_set_irq_type(ucb->irq, IRQ_TYPE_EDGE_RISING);
diff --git a/drivers/mfd/wm831x-irq.c b/drivers/mfd/wm831x-irq.c
index 64e512e..0edf213 100644
--- a/drivers/mfd/wm831x-irq.c
+++ b/drivers/mfd/wm831x-irq.c
@@ -552,14 +552,7 @@ static int wm831x_irq_map(struct irq_domain *h, unsigned int virq,
 	irq_set_chip_data(virq, h->host_data);
 	irq_set_chip_and_handler(virq, &wm831x_irq_chip, handle_edge_irq);
 	irq_set_nested_thread(virq, 1);
-
-	/* ARM needs us to explicitly flag the IRQ as valid
-	 * and will set them noprobe when we do so. */
-#ifdef CONFIG_ARM
-	set_irq_flags(virq, IRQF_VALID);
-#else
 	irq_set_noprobe(virq);
-#endif
 
 	return 0;
 }
diff --git a/drivers/mfd/wm8350-irq.c b/drivers/mfd/wm8350-irq.c
index 813ff50..27054f3 100644
--- a/drivers/mfd/wm8350-irq.c
+++ b/drivers/mfd/wm8350-irq.c
@@ -526,13 +526,7 @@ int wm8350_irq_init(struct wm8350 *wm8350, int irq,
 					 handle_edge_irq);
 		irq_set_nested_thread(cur_irq, 1);
 
-		/* ARM needs us to explicitly flag the IRQ as valid
-		 * and will set them noprobe when we do so. */
-#ifdef CONFIG_ARM
-		set_irq_flags(cur_irq, IRQF_VALID);
-#else
-		irq_set_noprobe(cur_irq);
-#endif
+		irq_clear_status_flags(cur_irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 	}
 
 	ret = request_threaded_irq(irq, NULL, wm8350_irq, flags,
diff --git a/drivers/mfd/wm8994-irq.c b/drivers/mfd/wm8994-irq.c
index a14407e..6dbf108 100644
--- a/drivers/mfd/wm8994-irq.c
+++ b/drivers/mfd/wm8994-irq.c
@@ -172,14 +172,7 @@ static int wm8994_edge_irq_map(struct irq_domain *h, unsigned int virq,
 	irq_set_chip_data(virq, wm8994);
 	irq_set_chip_and_handler(virq, &wm8994_edge_irq_chip, handle_edge_irq);
 	irq_set_nested_thread(virq, 1);
-
-	/* ARM needs us to explicitly flag the IRQ as valid
-	 * and will set them noprobe when we do so. */
-#ifdef CONFIG_ARM
-	set_irq_flags(virq, IRQF_VALID);
-#else
 	irq_set_noprobe(virq);
-#endif
 
 	return 0;
 }
-- 
2.1.0

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

* [PATCH 10/15] PCI: kill off set_irq_flags usage
  2015-06-09 18:26 ` Rob Herring
  (?)
@ 2015-06-09 18:26   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: linux-arm-kernel

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Murali Karicheri <m-karicheri2@ti.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: Jingoo Han <jingoohan1@gmail.com>
Cc: Pratyush Anand <pratyush.anand@gmail.com>
Cc: Simon Horman <horms@verge.net.au>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
Cc: linux-omap@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-tegra@vger.kernel.org
Cc: linux-sh@vger.kernel.org
---
 drivers/pci/host/pci-dra7xx.c      | 1 -
 drivers/pci/host/pci-keystone-dw.c | 2 --
 drivers/pci/host/pci-tegra.c       | 1 -
 drivers/pci/host/pcie-designware.c | 1 -
 drivers/pci/host/pcie-rcar.c       | 1 -
 drivers/pci/host/pcie-xilinx.c     | 2 --
 6 files changed, 8 deletions(-)

diff --git a/drivers/pci/host/pci-dra7xx.c b/drivers/pci/host/pci-dra7xx.c
index 2d57e19..94cbc4d 100644
--- a/drivers/pci/host/pci-dra7xx.c
+++ b/drivers/pci/host/pci-dra7xx.c
@@ -160,7 +160,6 @@ static int dra7xx_pcie_intx_map(struct irq_domain *domain, unsigned int irq,
 {
 	irq_set_chip_and_handler(irq, &dummy_irq_chip, handle_simple_irq);
 	irq_set_chip_data(irq, domain->host_data);
-	set_irq_flags(irq, IRQF_VALID);
 
 	return 0;
 }
diff --git a/drivers/pci/host/pci-keystone-dw.c b/drivers/pci/host/pci-keystone-dw.c
index f34892e..f1d0749 100644
--- a/drivers/pci/host/pci-keystone-dw.c
+++ b/drivers/pci/host/pci-keystone-dw.c
@@ -196,7 +196,6 @@ static int ks_dw_pcie_msi_map(struct irq_domain *domain, unsigned int irq,
 	irq_set_chip_and_handler(irq, &ks_dw_pcie_msi_irq_chip,
 				 handle_level_irq);
 	irq_set_chip_data(irq, domain->host_data);
-	set_irq_flags(irq, IRQF_VALID);
 
 	return 0;
 }
@@ -277,7 +276,6 @@ static int ks_dw_pcie_init_legacy_irq_map(struct irq_domain *d,
 	irq_set_chip_and_handler(irq, &ks_dw_pcie_legacy_irq_chip,
 				 handle_level_irq);
 	irq_set_chip_data(irq, d->host_data);
-	set_irq_flags(irq, IRQF_VALID);
 
 	return 0;
 }
diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
index 00e9272..36bd700 100644
--- a/drivers/pci/host/pci-tegra.c
+++ b/drivers/pci/host/pci-tegra.c
@@ -1263,7 +1263,6 @@ static int tegra_msi_map(struct irq_domain *domain, unsigned int irq,
 {
 	irq_set_chip_and_handler(irq, &tegra_msi_irq_chip, handle_simple_irq);
 	irq_set_chip_data(irq, domain->host_data);
-	set_irq_flags(irq, IRQF_VALID);
 
 	tegra_cpuidle_pcie_irqs_in_use();
 
diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
index 2e9f84f..5caa94d 100644
--- a/drivers/pci/host/pcie-designware.c
+++ b/drivers/pci/host/pcie-designware.c
@@ -333,7 +333,6 @@ static int dw_pcie_msi_map(struct irq_domain *domain, unsigned int irq,
 {
 	irq_set_chip_and_handler(irq, &dw_msi_irq_chip, handle_simple_irq);
 	irq_set_chip_data(irq, domain->host_data);
-	set_irq_flags(irq, IRQF_VALID);
 
 	return 0;
 }
diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
index c086210..7678fe0 100644
--- a/drivers/pci/host/pcie-rcar.c
+++ b/drivers/pci/host/pcie-rcar.c
@@ -664,7 +664,6 @@ static int rcar_msi_map(struct irq_domain *domain, unsigned int irq,
 {
 	irq_set_chip_and_handler(irq, &rcar_msi_irq_chip, handle_simple_irq);
 	irq_set_chip_data(irq, domain->host_data);
-	set_irq_flags(irq, IRQF_VALID);
 
 	return 0;
 }
diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c
index f1a06a0..72015119 100644
--- a/drivers/pci/host/pcie-xilinx.c
+++ b/drivers/pci/host/pcie-xilinx.c
@@ -338,7 +338,6 @@ static int xilinx_pcie_msi_map(struct irq_domain *domain, unsigned int irq,
 {
 	irq_set_chip_and_handler(irq, &xilinx_msi_irq_chip, handle_simple_irq);
 	irq_set_chip_data(irq, domain->host_data);
-	set_irq_flags(irq, IRQF_VALID);
 
 	return 0;
 }
@@ -377,7 +376,6 @@ static int xilinx_pcie_intx_map(struct irq_domain *domain, unsigned int irq,
 {
 	irq_set_chip_and_handler(irq, &dummy_irq_chip, handle_simple_irq);
 	irq_set_chip_data(irq, domain->host_data);
-	set_irq_flags(irq, IRQF_VALID);
 
 	return 0;
 }
-- 
2.1.0


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

* [PATCH 10/15] PCI: kill off set_irq_flags usage
@ 2015-06-09 18:26   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: Russell King, linux-arm-kernel
  Cc: linux-kernel, arm, Rob Herring, Kishon Vijay Abraham I,
	Bjorn Helgaas, Murali Karicheri, Thierry Reding, Stephen Warren,
	Alexandre Courbot, Jingoo Han, Pratyush Anand, Simon Horman,
	Michal Simek, Sören Brinkmann, linux-omap, linux-pci,
	linux-tegra, linux-sh

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Murali Karicheri <m-karicheri2@ti.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: Jingoo Han <jingoohan1@gmail.com>
Cc: Pratyush Anand <pratyush.anand@gmail.com>
Cc: Simon Horman <horms@verge.net.au>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
Cc: linux-omap@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-tegra@vger.kernel.org
Cc: linux-sh@vger.kernel.org
---
 drivers/pci/host/pci-dra7xx.c      | 1 -
 drivers/pci/host/pci-keystone-dw.c | 2 --
 drivers/pci/host/pci-tegra.c       | 1 -
 drivers/pci/host/pcie-designware.c | 1 -
 drivers/pci/host/pcie-rcar.c       | 1 -
 drivers/pci/host/pcie-xilinx.c     | 2 --
 6 files changed, 8 deletions(-)

diff --git a/drivers/pci/host/pci-dra7xx.c b/drivers/pci/host/pci-dra7xx.c
index 2d57e19..94cbc4d 100644
--- a/drivers/pci/host/pci-dra7xx.c
+++ b/drivers/pci/host/pci-dra7xx.c
@@ -160,7 +160,6 @@ static int dra7xx_pcie_intx_map(struct irq_domain *domain, unsigned int irq,
 {
 	irq_set_chip_and_handler(irq, &dummy_irq_chip, handle_simple_irq);
 	irq_set_chip_data(irq, domain->host_data);
-	set_irq_flags(irq, IRQF_VALID);
 
 	return 0;
 }
diff --git a/drivers/pci/host/pci-keystone-dw.c b/drivers/pci/host/pci-keystone-dw.c
index f34892e..f1d0749 100644
--- a/drivers/pci/host/pci-keystone-dw.c
+++ b/drivers/pci/host/pci-keystone-dw.c
@@ -196,7 +196,6 @@ static int ks_dw_pcie_msi_map(struct irq_domain *domain, unsigned int irq,
 	irq_set_chip_and_handler(irq, &ks_dw_pcie_msi_irq_chip,
 				 handle_level_irq);
 	irq_set_chip_data(irq, domain->host_data);
-	set_irq_flags(irq, IRQF_VALID);
 
 	return 0;
 }
@@ -277,7 +276,6 @@ static int ks_dw_pcie_init_legacy_irq_map(struct irq_domain *d,
 	irq_set_chip_and_handler(irq, &ks_dw_pcie_legacy_irq_chip,
 				 handle_level_irq);
 	irq_set_chip_data(irq, d->host_data);
-	set_irq_flags(irq, IRQF_VALID);
 
 	return 0;
 }
diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
index 00e9272..36bd700 100644
--- a/drivers/pci/host/pci-tegra.c
+++ b/drivers/pci/host/pci-tegra.c
@@ -1263,7 +1263,6 @@ static int tegra_msi_map(struct irq_domain *domain, unsigned int irq,
 {
 	irq_set_chip_and_handler(irq, &tegra_msi_irq_chip, handle_simple_irq);
 	irq_set_chip_data(irq, domain->host_data);
-	set_irq_flags(irq, IRQF_VALID);
 
 	tegra_cpuidle_pcie_irqs_in_use();
 
diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
index 2e9f84f..5caa94d 100644
--- a/drivers/pci/host/pcie-designware.c
+++ b/drivers/pci/host/pcie-designware.c
@@ -333,7 +333,6 @@ static int dw_pcie_msi_map(struct irq_domain *domain, unsigned int irq,
 {
 	irq_set_chip_and_handler(irq, &dw_msi_irq_chip, handle_simple_irq);
 	irq_set_chip_data(irq, domain->host_data);
-	set_irq_flags(irq, IRQF_VALID);
 
 	return 0;
 }
diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
index c086210..7678fe0 100644
--- a/drivers/pci/host/pcie-rcar.c
+++ b/drivers/pci/host/pcie-rcar.c
@@ -664,7 +664,6 @@ static int rcar_msi_map(struct irq_domain *domain, unsigned int irq,
 {
 	irq_set_chip_and_handler(irq, &rcar_msi_irq_chip, handle_simple_irq);
 	irq_set_chip_data(irq, domain->host_data);
-	set_irq_flags(irq, IRQF_VALID);
 
 	return 0;
 }
diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c
index f1a06a0..72015119 100644
--- a/drivers/pci/host/pcie-xilinx.c
+++ b/drivers/pci/host/pcie-xilinx.c
@@ -338,7 +338,6 @@ static int xilinx_pcie_msi_map(struct irq_domain *domain, unsigned int irq,
 {
 	irq_set_chip_and_handler(irq, &xilinx_msi_irq_chip, handle_simple_irq);
 	irq_set_chip_data(irq, domain->host_data);
-	set_irq_flags(irq, IRQF_VALID);
 
 	return 0;
 }
@@ -377,7 +376,6 @@ static int xilinx_pcie_intx_map(struct irq_domain *domain, unsigned int irq,
 {
 	irq_set_chip_and_handler(irq, &dummy_irq_chip, handle_simple_irq);
 	irq_set_chip_data(irq, domain->host_data);
-	set_irq_flags(irq, IRQF_VALID);
 
 	return 0;
 }
-- 
2.1.0

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

* [PATCH 10/15] PCI: kill off set_irq_flags usage
@ 2015-06-09 18:26   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: linux-arm-kernel

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Murali Karicheri <m-karicheri2@ti.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: Jingoo Han <jingoohan1@gmail.com>
Cc: Pratyush Anand <pratyush.anand@gmail.com>
Cc: Simon Horman <horms@verge.net.au>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: "S?ren Brinkmann" <soren.brinkmann@xilinx.com>
Cc: linux-omap at vger.kernel.org
Cc: linux-pci at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-tegra at vger.kernel.org
Cc: linux-sh at vger.kernel.org
---
 drivers/pci/host/pci-dra7xx.c      | 1 -
 drivers/pci/host/pci-keystone-dw.c | 2 --
 drivers/pci/host/pci-tegra.c       | 1 -
 drivers/pci/host/pcie-designware.c | 1 -
 drivers/pci/host/pcie-rcar.c       | 1 -
 drivers/pci/host/pcie-xilinx.c     | 2 --
 6 files changed, 8 deletions(-)

diff --git a/drivers/pci/host/pci-dra7xx.c b/drivers/pci/host/pci-dra7xx.c
index 2d57e19..94cbc4d 100644
--- a/drivers/pci/host/pci-dra7xx.c
+++ b/drivers/pci/host/pci-dra7xx.c
@@ -160,7 +160,6 @@ static int dra7xx_pcie_intx_map(struct irq_domain *domain, unsigned int irq,
 {
 	irq_set_chip_and_handler(irq, &dummy_irq_chip, handle_simple_irq);
 	irq_set_chip_data(irq, domain->host_data);
-	set_irq_flags(irq, IRQF_VALID);
 
 	return 0;
 }
diff --git a/drivers/pci/host/pci-keystone-dw.c b/drivers/pci/host/pci-keystone-dw.c
index f34892e..f1d0749 100644
--- a/drivers/pci/host/pci-keystone-dw.c
+++ b/drivers/pci/host/pci-keystone-dw.c
@@ -196,7 +196,6 @@ static int ks_dw_pcie_msi_map(struct irq_domain *domain, unsigned int irq,
 	irq_set_chip_and_handler(irq, &ks_dw_pcie_msi_irq_chip,
 				 handle_level_irq);
 	irq_set_chip_data(irq, domain->host_data);
-	set_irq_flags(irq, IRQF_VALID);
 
 	return 0;
 }
@@ -277,7 +276,6 @@ static int ks_dw_pcie_init_legacy_irq_map(struct irq_domain *d,
 	irq_set_chip_and_handler(irq, &ks_dw_pcie_legacy_irq_chip,
 				 handle_level_irq);
 	irq_set_chip_data(irq, d->host_data);
-	set_irq_flags(irq, IRQF_VALID);
 
 	return 0;
 }
diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
index 00e9272..36bd700 100644
--- a/drivers/pci/host/pci-tegra.c
+++ b/drivers/pci/host/pci-tegra.c
@@ -1263,7 +1263,6 @@ static int tegra_msi_map(struct irq_domain *domain, unsigned int irq,
 {
 	irq_set_chip_and_handler(irq, &tegra_msi_irq_chip, handle_simple_irq);
 	irq_set_chip_data(irq, domain->host_data);
-	set_irq_flags(irq, IRQF_VALID);
 
 	tegra_cpuidle_pcie_irqs_in_use();
 
diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
index 2e9f84f..5caa94d 100644
--- a/drivers/pci/host/pcie-designware.c
+++ b/drivers/pci/host/pcie-designware.c
@@ -333,7 +333,6 @@ static int dw_pcie_msi_map(struct irq_domain *domain, unsigned int irq,
 {
 	irq_set_chip_and_handler(irq, &dw_msi_irq_chip, handle_simple_irq);
 	irq_set_chip_data(irq, domain->host_data);
-	set_irq_flags(irq, IRQF_VALID);
 
 	return 0;
 }
diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
index c086210..7678fe0 100644
--- a/drivers/pci/host/pcie-rcar.c
+++ b/drivers/pci/host/pcie-rcar.c
@@ -664,7 +664,6 @@ static int rcar_msi_map(struct irq_domain *domain, unsigned int irq,
 {
 	irq_set_chip_and_handler(irq, &rcar_msi_irq_chip, handle_simple_irq);
 	irq_set_chip_data(irq, domain->host_data);
-	set_irq_flags(irq, IRQF_VALID);
 
 	return 0;
 }
diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c
index f1a06a0..72015119 100644
--- a/drivers/pci/host/pcie-xilinx.c
+++ b/drivers/pci/host/pcie-xilinx.c
@@ -338,7 +338,6 @@ static int xilinx_pcie_msi_map(struct irq_domain *domain, unsigned int irq,
 {
 	irq_set_chip_and_handler(irq, &xilinx_msi_irq_chip, handle_simple_irq);
 	irq_set_chip_data(irq, domain->host_data);
-	set_irq_flags(irq, IRQF_VALID);
 
 	return 0;
 }
@@ -377,7 +376,6 @@ static int xilinx_pcie_intx_map(struct irq_domain *domain, unsigned int irq,
 {
 	irq_set_chip_and_handler(irq, &dummy_irq_chip, handle_simple_irq);
 	irq_set_chip_data(irq, domain->host_data);
-	set_irq_flags(irq, IRQF_VALID);
 
 	return 0;
 }
-- 
2.1.0

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

* [PATCH 11/15] pinctrl: kill off set_irq_flags usage
  2015-06-09 18:26 ` Rob Herring
@ 2015-06-09 18:26   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: Russell King, linux-arm-kernel
  Cc: linux-kernel, arm, Rob Herring, Linus Walleij, Stephen Warren,
	Lee Jones, Matthias Brugger, Tomasz Figa, Thomas Abraham,
	Kukjin Kim, Krzysztof Kozlowski, linux-gpio, linux-rpi-kernel,
	linux-mediatek, linux-samsung-soc

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Lee Jones <lee@kernel.org>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Thomas Abraham <thomas.abraham@linaro.org>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: linux-gpio@vger.kernel.org
Cc: linux-rpi-kernel@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
---
 drivers/pinctrl/bcm/pinctrl-bcm2835.c         | 1 -
 drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 2 --
 drivers/pinctrl/pinctrl-single.c              | 5 -----
 drivers/pinctrl/samsung/pinctrl-exynos.c      | 1 -
 drivers/pinctrl/samsung/pinctrl-exynos5440.c  | 1 -
 drivers/pinctrl/samsung/pinctrl-s3c24xx.c     | 2 --
 drivers/pinctrl/samsung/pinctrl-s3c64xx.c     | 2 --
 7 files changed, 14 deletions(-)

diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
index 8d908e3..de34017 100644
--- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
@@ -987,7 +987,6 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev)
 		irq_set_chip_and_handler(irq, &bcm2835_gpio_irq_chip,
 				handle_level_irq);
 		irq_set_chip_data(irq, pc);
-		set_irq_flags(irq, IRQF_VALID);
 	}
 
 	for (i = 0; i < BCM2835_NUM_BANKS; i++) {
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
index 474812e..e80cd1a 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
@@ -1239,12 +1239,10 @@ int mtk_pctrl_init(struct platform_device *pdev,
 		irq_set_chip_and_handler(virq, &mtk_pinctrl_irq_chip,
 			handle_level_irq);
 		irq_set_chip_data(virq, pctl);
-		set_irq_flags(virq, IRQF_VALID);
 	};
 
 	irq_set_chained_handler(irq, mtk_eint_irq_handler);
 	irq_set_handler_data(irq, pctl);
-	set_irq_flags(irq, IRQF_VALID);
 	return 0;
 
 chip_error:
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index 13b45f2..6f0da84 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -1716,12 +1716,7 @@ static int pcs_irqdomain_map(struct irq_domain *d, unsigned int irq,
 	irq_set_chip_data(irq, pcs_soc);
 	irq_set_chip_and_handler(irq, &pcs->chip,
 				 handle_level_irq);
-
-#ifdef CONFIG_ARM
-	set_irq_flags(irq, IRQF_VALID);
-#else
 	irq_set_noprobe(irq);
-#endif
 
 	return 0;
 }
diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.c b/drivers/pinctrl/samsung/pinctrl-exynos.c
index 0b7afa5..9996183 100644
--- a/drivers/pinctrl/samsung/pinctrl-exynos.c
+++ b/drivers/pinctrl/samsung/pinctrl-exynos.c
@@ -256,7 +256,6 @@ static int exynos_eint_irq_map(struct irq_domain *h, unsigned int virq,
 	irq_set_chip_data(virq, b);
 	irq_set_chip_and_handler(virq, &b->irq_chip->chip,
 					handle_level_irq);
-	set_irq_flags(virq, IRQF_VALID);
 	return 0;
 }
 
diff --git a/drivers/pinctrl/samsung/pinctrl-exynos5440.c b/drivers/pinctrl/samsung/pinctrl-exynos5440.c
index 86192be..3eb7b11 100644
--- a/drivers/pinctrl/samsung/pinctrl-exynos5440.c
+++ b/drivers/pinctrl/samsung/pinctrl-exynos5440.c
@@ -929,7 +929,6 @@ static int exynos5440_gpio_irq_map(struct irq_domain *h, unsigned int virq,
 	irq_set_chip_data(virq, d);
 	irq_set_chip_and_handler(virq, &exynos5440_gpio_irq_chip,
 					handle_level_irq);
-	set_irq_flags(virq, IRQF_VALID);
 	return 0;
 }
 
diff --git a/drivers/pinctrl/samsung/pinctrl-s3c24xx.c b/drivers/pinctrl/samsung/pinctrl-s3c24xx.c
index f1993f42..189f15b 100644
--- a/drivers/pinctrl/samsung/pinctrl-s3c24xx.c
+++ b/drivers/pinctrl/samsung/pinctrl-s3c24xx.c
@@ -437,7 +437,6 @@ static int s3c24xx_gpf_irq_map(struct irq_domain *h, unsigned int virq,
 					 handle_edge_irq);
 	}
 	irq_set_chip_data(virq, bank);
-	set_irq_flags(virq, IRQF_VALID);
 	return 0;
 }
 
@@ -457,7 +456,6 @@ static int s3c24xx_gpg_irq_map(struct irq_domain *h, unsigned int virq,
 
 	irq_set_chip_and_handler(virq, &s3c24xx_eint_chip, handle_edge_irq);
 	irq_set_chip_data(virq, bank);
-	set_irq_flags(virq, IRQF_VALID);
 	return 0;
 }
 
diff --git a/drivers/pinctrl/samsung/pinctrl-s3c64xx.c b/drivers/pinctrl/samsung/pinctrl-s3c64xx.c
index 7756c1e..1134f18 100644
--- a/drivers/pinctrl/samsung/pinctrl-s3c64xx.c
+++ b/drivers/pinctrl/samsung/pinctrl-s3c64xx.c
@@ -395,7 +395,6 @@ static int s3c64xx_gpio_irq_map(struct irq_domain *h, unsigned int virq,
 	irq_set_chip_and_handler(virq,
 				&s3c64xx_gpio_irq_chip, handle_level_irq);
 	irq_set_chip_data(virq, bank);
-	set_irq_flags(virq, IRQF_VALID);
 
 	return 0;
 }
@@ -674,7 +673,6 @@ static int s3c64xx_eint0_irq_map(struct irq_domain *h, unsigned int virq,
 	irq_set_chip_and_handler(virq,
 				&s3c64xx_eint0_irq_chip, handle_level_irq);
 	irq_set_chip_data(virq, ddata);
-	set_irq_flags(virq, IRQF_VALID);
 
 	return 0;
 }
-- 
2.1.0


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

* [PATCH 11/15] pinctrl: kill off set_irq_flags usage
@ 2015-06-09 18:26   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: linux-arm-kernel

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Lee Jones <lee@kernel.org>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Thomas Abraham <thomas.abraham@linaro.org>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: linux-gpio at vger.kernel.org
Cc: linux-rpi-kernel at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-samsung-soc at vger.kernel.org
---
 drivers/pinctrl/bcm/pinctrl-bcm2835.c         | 1 -
 drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 2 --
 drivers/pinctrl/pinctrl-single.c              | 5 -----
 drivers/pinctrl/samsung/pinctrl-exynos.c      | 1 -
 drivers/pinctrl/samsung/pinctrl-exynos5440.c  | 1 -
 drivers/pinctrl/samsung/pinctrl-s3c24xx.c     | 2 --
 drivers/pinctrl/samsung/pinctrl-s3c64xx.c     | 2 --
 7 files changed, 14 deletions(-)

diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
index 8d908e3..de34017 100644
--- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
@@ -987,7 +987,6 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev)
 		irq_set_chip_and_handler(irq, &bcm2835_gpio_irq_chip,
 				handle_level_irq);
 		irq_set_chip_data(irq, pc);
-		set_irq_flags(irq, IRQF_VALID);
 	}
 
 	for (i = 0; i < BCM2835_NUM_BANKS; i++) {
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
index 474812e..e80cd1a 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
@@ -1239,12 +1239,10 @@ int mtk_pctrl_init(struct platform_device *pdev,
 		irq_set_chip_and_handler(virq, &mtk_pinctrl_irq_chip,
 			handle_level_irq);
 		irq_set_chip_data(virq, pctl);
-		set_irq_flags(virq, IRQF_VALID);
 	};
 
 	irq_set_chained_handler(irq, mtk_eint_irq_handler);
 	irq_set_handler_data(irq, pctl);
-	set_irq_flags(irq, IRQF_VALID);
 	return 0;
 
 chip_error:
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index 13b45f2..6f0da84 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -1716,12 +1716,7 @@ static int pcs_irqdomain_map(struct irq_domain *d, unsigned int irq,
 	irq_set_chip_data(irq, pcs_soc);
 	irq_set_chip_and_handler(irq, &pcs->chip,
 				 handle_level_irq);
-
-#ifdef CONFIG_ARM
-	set_irq_flags(irq, IRQF_VALID);
-#else
 	irq_set_noprobe(irq);
-#endif
 
 	return 0;
 }
diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.c b/drivers/pinctrl/samsung/pinctrl-exynos.c
index 0b7afa5..9996183 100644
--- a/drivers/pinctrl/samsung/pinctrl-exynos.c
+++ b/drivers/pinctrl/samsung/pinctrl-exynos.c
@@ -256,7 +256,6 @@ static int exynos_eint_irq_map(struct irq_domain *h, unsigned int virq,
 	irq_set_chip_data(virq, b);
 	irq_set_chip_and_handler(virq, &b->irq_chip->chip,
 					handle_level_irq);
-	set_irq_flags(virq, IRQF_VALID);
 	return 0;
 }
 
diff --git a/drivers/pinctrl/samsung/pinctrl-exynos5440.c b/drivers/pinctrl/samsung/pinctrl-exynos5440.c
index 86192be..3eb7b11 100644
--- a/drivers/pinctrl/samsung/pinctrl-exynos5440.c
+++ b/drivers/pinctrl/samsung/pinctrl-exynos5440.c
@@ -929,7 +929,6 @@ static int exynos5440_gpio_irq_map(struct irq_domain *h, unsigned int virq,
 	irq_set_chip_data(virq, d);
 	irq_set_chip_and_handler(virq, &exynos5440_gpio_irq_chip,
 					handle_level_irq);
-	set_irq_flags(virq, IRQF_VALID);
 	return 0;
 }
 
diff --git a/drivers/pinctrl/samsung/pinctrl-s3c24xx.c b/drivers/pinctrl/samsung/pinctrl-s3c24xx.c
index f1993f42..189f15b 100644
--- a/drivers/pinctrl/samsung/pinctrl-s3c24xx.c
+++ b/drivers/pinctrl/samsung/pinctrl-s3c24xx.c
@@ -437,7 +437,6 @@ static int s3c24xx_gpf_irq_map(struct irq_domain *h, unsigned int virq,
 					 handle_edge_irq);
 	}
 	irq_set_chip_data(virq, bank);
-	set_irq_flags(virq, IRQF_VALID);
 	return 0;
 }
 
@@ -457,7 +456,6 @@ static int s3c24xx_gpg_irq_map(struct irq_domain *h, unsigned int virq,
 
 	irq_set_chip_and_handler(virq, &s3c24xx_eint_chip, handle_edge_irq);
 	irq_set_chip_data(virq, bank);
-	set_irq_flags(virq, IRQF_VALID);
 	return 0;
 }
 
diff --git a/drivers/pinctrl/samsung/pinctrl-s3c64xx.c b/drivers/pinctrl/samsung/pinctrl-s3c64xx.c
index 7756c1e..1134f18 100644
--- a/drivers/pinctrl/samsung/pinctrl-s3c64xx.c
+++ b/drivers/pinctrl/samsung/pinctrl-s3c64xx.c
@@ -395,7 +395,6 @@ static int s3c64xx_gpio_irq_map(struct irq_domain *h, unsigned int virq,
 	irq_set_chip_and_handler(virq,
 				&s3c64xx_gpio_irq_chip, handle_level_irq);
 	irq_set_chip_data(virq, bank);
-	set_irq_flags(virq, IRQF_VALID);
 
 	return 0;
 }
@@ -674,7 +673,6 @@ static int s3c64xx_eint0_irq_map(struct irq_domain *h, unsigned int virq,
 	irq_set_chip_and_handler(virq,
 				&s3c64xx_eint0_irq_chip, handle_level_irq);
 	irq_set_chip_data(virq, ddata);
-	set_irq_flags(virq, IRQF_VALID);
 
 	return 0;
 }
-- 
2.1.0

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

* [PATCH 12/15] SH: kill off set_irq_flags usage
  2015-06-09 18:26 ` Rob Herring
  (?)
@ 2015-06-09 18:26   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: linux-arm-kernel

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: linux-sh@vger.kernel.org
---
 drivers/sh/intc/internals.h | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
index 7dff08e..897ffb1 100644
--- a/drivers/sh/intc/internals.h
+++ b/drivers/sh/intc/internals.h
@@ -99,15 +99,7 @@ static inline struct intc_desc_int *get_intc_desc(unsigned int irq)
  */
 static inline void activate_irq(int irq)
 {
-#ifdef CONFIG_ARM
-	/* ARM requires an extra step to clear IRQ_NOREQUEST, which it
-	 * sets on behalf of every irq_chip.  Also sets IRQ_NOPROBE.
-	 */
-	set_irq_flags(irq, IRQF_VALID);
-#else
-	/* same effect on other architectures */
-	irq_set_noprobe(irq);
-#endif
+	irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 }
 
 static inline int intc_handle_int_cmp(const void *a, const void *b)
-- 
2.1.0


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

* [PATCH 12/15] SH: kill off set_irq_flags usage
@ 2015-06-09 18:26   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: Russell King, linux-arm-kernel
  Cc: linux-kernel, arm, Rob Herring, Simon Horman, Magnus Damm, linux-sh

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: linux-sh@vger.kernel.org
---
 drivers/sh/intc/internals.h | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
index 7dff08e..897ffb1 100644
--- a/drivers/sh/intc/internals.h
+++ b/drivers/sh/intc/internals.h
@@ -99,15 +99,7 @@ static inline struct intc_desc_int *get_intc_desc(unsigned int irq)
  */
 static inline void activate_irq(int irq)
 {
-#ifdef CONFIG_ARM
-	/* ARM requires an extra step to clear IRQ_NOREQUEST, which it
-	 * sets on behalf of every irq_chip.  Also sets IRQ_NOPROBE.
-	 */
-	set_irq_flags(irq, IRQF_VALID);
-#else
-	/* same effect on other architectures */
-	irq_set_noprobe(irq);
-#endif
+	irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 }
 
 static inline int intc_handle_int_cmp(const void *a, const void *b)
-- 
2.1.0


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

* [PATCH 12/15] SH: kill off set_irq_flags usage
@ 2015-06-09 18:26   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: linux-arm-kernel

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: linux-sh at vger.kernel.org
---
 drivers/sh/intc/internals.h | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
index 7dff08e..897ffb1 100644
--- a/drivers/sh/intc/internals.h
+++ b/drivers/sh/intc/internals.h
@@ -99,15 +99,7 @@ static inline struct intc_desc_int *get_intc_desc(unsigned int irq)
  */
 static inline void activate_irq(int irq)
 {
-#ifdef CONFIG_ARM
-	/* ARM requires an extra step to clear IRQ_NOREQUEST, which it
-	 * sets on behalf of every irq_chip.  Also sets IRQ_NOPROBE.
-	 */
-	set_irq_flags(irq, IRQF_VALID);
-#else
-	/* same effect on other architectures */
-	irq_set_noprobe(irq);
-#endif
+	irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 }
 
 static inline int intc_handle_int_cmp(const void *a, const void *b)
-- 
2.1.0

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

* [PATCH 13/15] tty/serial: kill off set_irq_flags usage
  2015-06-09 18:26 ` Rob Herring
@ 2015-06-09 18:26   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: Russell King, linux-arm-kernel
  Cc: linux-kernel, arm, Rob Herring, Greg Kroah-Hartman, Jiri Slaby,
	Barry Song, linux-serial

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: Barry Song <baohua@kernel.org>
Cc: linux-serial@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
---
 drivers/tty/serial/serial_ks8695.c | 2 +-
 drivers/tty/serial/sirfsoc_uart.c  | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/tty/serial/serial_ks8695.c b/drivers/tty/serial/serial_ks8695.c
index 5c79bda..b4decf8 100644
--- a/drivers/tty/serial/serial_ks8695.c
+++ b/drivers/tty/serial/serial_ks8695.c
@@ -328,7 +328,7 @@ static int ks8695uart_startup(struct uart_port *port)
 {
 	int retval;
 
-	set_irq_flags(KS8695_IRQ_UART_TX, IRQF_VALID | IRQF_NOAUTOEN);
+	irq_modify_status(KS8695_IRQ_UART_TX, IRQ_NOREQUEST, IRQ_NOAUTOEN);
 	tx_enable(port, 0);
 	rx_enable(port, 1);
 	ms_enable(port, 1);
diff --git a/drivers/tty/serial/sirfsoc_uart.c b/drivers/tty/serial/sirfsoc_uart.c
index 9de3eab..bcc298d 100644
--- a/drivers/tty/serial/sirfsoc_uart.c
+++ b/drivers/tty/serial/sirfsoc_uart.c
@@ -1053,7 +1053,7 @@ static int sirfsoc_uart_startup(struct uart_port *port)
 	struct sirfsoc_register *ureg = &sirfport->uart_reg->uart_reg;
 	unsigned int index			= port->line;
 	int ret;
-	set_irq_flags(port->irq, IRQF_VALID | IRQF_NOAUTOEN);
+	irq_modify_status(port->irq, IRQ_NOREQUEST, IRQ_NOAUTOEN);
 	ret = request_irq(port->irq,
 				sirfsoc_uart_isr,
 				0,
@@ -1100,8 +1100,8 @@ static int sirfsoc_uart_startup(struct uart_port *port)
 	sirfport->ms_enabled = false;
 	if (sirfport->uart_reg->uart_type == SIRF_USP_UART &&
 		sirfport->hw_flow_ctrl) {
-		set_irq_flags(gpio_to_irq(sirfport->cts_gpio),
-			IRQF_VALID | IRQF_NOAUTOEN);
+		irq_modify_status(gpio_to_irq(sirfport->cts_gpio),
+			IRQ_NOREQUEST, IRQ_NOAUTOEN);
 		ret = request_irq(gpio_to_irq(sirfport->cts_gpio),
 			sirfsoc_uart_usp_cts_handler, IRQF_TRIGGER_FALLING |
 			IRQF_TRIGGER_RISING, "usp_cts_irq", sirfport);
-- 
2.1.0


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

* [PATCH 13/15] tty/serial: kill off set_irq_flags usage
@ 2015-06-09 18:26   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: linux-arm-kernel

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: Barry Song <baohua@kernel.org>
Cc: linux-serial at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org
---
 drivers/tty/serial/serial_ks8695.c | 2 +-
 drivers/tty/serial/sirfsoc_uart.c  | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/tty/serial/serial_ks8695.c b/drivers/tty/serial/serial_ks8695.c
index 5c79bda..b4decf8 100644
--- a/drivers/tty/serial/serial_ks8695.c
+++ b/drivers/tty/serial/serial_ks8695.c
@@ -328,7 +328,7 @@ static int ks8695uart_startup(struct uart_port *port)
 {
 	int retval;
 
-	set_irq_flags(KS8695_IRQ_UART_TX, IRQF_VALID | IRQF_NOAUTOEN);
+	irq_modify_status(KS8695_IRQ_UART_TX, IRQ_NOREQUEST, IRQ_NOAUTOEN);
 	tx_enable(port, 0);
 	rx_enable(port, 1);
 	ms_enable(port, 1);
diff --git a/drivers/tty/serial/sirfsoc_uart.c b/drivers/tty/serial/sirfsoc_uart.c
index 9de3eab..bcc298d 100644
--- a/drivers/tty/serial/sirfsoc_uart.c
+++ b/drivers/tty/serial/sirfsoc_uart.c
@@ -1053,7 +1053,7 @@ static int sirfsoc_uart_startup(struct uart_port *port)
 	struct sirfsoc_register *ureg = &sirfport->uart_reg->uart_reg;
 	unsigned int index			= port->line;
 	int ret;
-	set_irq_flags(port->irq, IRQF_VALID | IRQF_NOAUTOEN);
+	irq_modify_status(port->irq, IRQ_NOREQUEST, IRQ_NOAUTOEN);
 	ret = request_irq(port->irq,
 				sirfsoc_uart_isr,
 				0,
@@ -1100,8 +1100,8 @@ static int sirfsoc_uart_startup(struct uart_port *port)
 	sirfport->ms_enabled = false;
 	if (sirfport->uart_reg->uart_type == SIRF_USP_UART &&
 		sirfport->hw_flow_ctrl) {
-		set_irq_flags(gpio_to_irq(sirfport->cts_gpio),
-			IRQF_VALID | IRQF_NOAUTOEN);
+		irq_modify_status(gpio_to_irq(sirfport->cts_gpio),
+			IRQ_NOREQUEST, IRQ_NOAUTOEN);
 		ret = request_irq(gpio_to_irq(sirfport->cts_gpio),
 			sirfsoc_uart_usp_cts_handler, IRQF_TRIGGER_FALLING |
 			IRQF_TRIGGER_RISING, "usp_cts_irq", sirfport);
-- 
2.1.0

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

* [PATCH 14/15] ARM: remove ununsed set_irq_flags
  2015-06-09 18:26 ` Rob Herring
@ 2015-06-09 18:26   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: Russell King, linux-arm-kernel; +Cc: linux-kernel, arm, Rob Herring

Now that all users of set_irq_flags and custom flags are converted to
genirq functions, the ARM specific set_irq_flags can be removed.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
---
 arch/arm/include/asm/hw_irq.h |  6 ------
 arch/arm/kernel/irq.c         | 20 --------------------
 2 files changed, 26 deletions(-)

diff --git a/arch/arm/include/asm/hw_irq.h b/arch/arm/include/asm/hw_irq.h
index af79da4..9beb929 100644
--- a/arch/arm/include/asm/hw_irq.h
+++ b/arch/arm/include/asm/hw_irq.h
@@ -11,12 +11,6 @@ static inline void ack_bad_irq(int irq)
 	pr_crit("unexpected IRQ trap at vector %02x\n", irq);
 }
 
-void set_irq_flags(unsigned int irq, unsigned int flags);
-
-#define IRQF_VALID	(1 << 0)
-#define IRQF_PROBE	(1 << 1)
-#define IRQF_NOAUTOEN	(1 << 2)
-
 #define ARCH_IRQ_INIT_FLAGS	(IRQ_NOREQUEST | IRQ_NOPROBE)
 
 #endif
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index 350f188..4072266 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -78,26 +78,6 @@ asm_do_IRQ(unsigned int irq, struct pt_regs *regs)
 	handle_IRQ(irq, regs);
 }
 
-void set_irq_flags(unsigned int irq, unsigned int iflags)
-{
-	unsigned long clr = 0, set = IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN;
-
-	if (irq >= nr_irqs) {
-		pr_err("Trying to set irq flags for IRQ%d\n", irq);
-		return;
-	}
-
-	if (iflags & IRQF_VALID)
-		clr |= IRQ_NOREQUEST;
-	if (iflags & IRQF_PROBE)
-		clr |= IRQ_NOPROBE;
-	if (!(iflags & IRQF_NOAUTOEN))
-		clr |= IRQ_NOAUTOEN;
-	/* Order is clear bits in "clr" then set bits in "set" */
-	irq_modify_status(irq, clr, set & ~clr);
-}
-EXPORT_SYMBOL_GPL(set_irq_flags);
-
 void __init init_IRQ(void)
 {
 	int ret;
-- 
2.1.0


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

* [PATCH 14/15] ARM: remove ununsed set_irq_flags
@ 2015-06-09 18:26   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: linux-arm-kernel

Now that all users of set_irq_flags and custom flags are converted to
genirq functions, the ARM specific set_irq_flags can be removed.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: linux-arm-kernel at lists.infradead.org
---
 arch/arm/include/asm/hw_irq.h |  6 ------
 arch/arm/kernel/irq.c         | 20 --------------------
 2 files changed, 26 deletions(-)

diff --git a/arch/arm/include/asm/hw_irq.h b/arch/arm/include/asm/hw_irq.h
index af79da4..9beb929 100644
--- a/arch/arm/include/asm/hw_irq.h
+++ b/arch/arm/include/asm/hw_irq.h
@@ -11,12 +11,6 @@ static inline void ack_bad_irq(int irq)
 	pr_crit("unexpected IRQ trap at vector %02x\n", irq);
 }
 
-void set_irq_flags(unsigned int irq, unsigned int flags);
-
-#define IRQF_VALID	(1 << 0)
-#define IRQF_PROBE	(1 << 1)
-#define IRQF_NOAUTOEN	(1 << 2)
-
 #define ARCH_IRQ_INIT_FLAGS	(IRQ_NOREQUEST | IRQ_NOPROBE)
 
 #endif
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index 350f188..4072266 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -78,26 +78,6 @@ asm_do_IRQ(unsigned int irq, struct pt_regs *regs)
 	handle_IRQ(irq, regs);
 }
 
-void set_irq_flags(unsigned int irq, unsigned int iflags)
-{
-	unsigned long clr = 0, set = IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN;
-
-	if (irq >= nr_irqs) {
-		pr_err("Trying to set irq flags for IRQ%d\n", irq);
-		return;
-	}
-
-	if (iflags & IRQF_VALID)
-		clr |= IRQ_NOREQUEST;
-	if (iflags & IRQF_PROBE)
-		clr |= IRQ_NOPROBE;
-	if (!(iflags & IRQF_NOAUTOEN))
-		clr |= IRQ_NOAUTOEN;
-	/* Order is clear bits in "clr" then set bits in "set" */
-	irq_modify_status(irq, clr, set & ~clr);
-}
-EXPORT_SYMBOL_GPL(set_irq_flags);
-
 void __init init_IRQ(void)
 {
 	int ret;
-- 
2.1.0

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

* [PATCH 15/15] arm64: remove ununsed set_irq_flags
  2015-06-09 18:26 ` Rob Herring
@ 2015-06-09 18:26   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: Russell King, linux-arm-kernel
  Cc: linux-kernel, arm, Rob Herring, Catalin Marinas, Will Deacon

Now that all users of set_irq_flags and custom flags are converted to
genirq functions, the ARM specific set_irq_flags can be removed.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
---
 arch/arm64/include/asm/hardirq.h | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/arch/arm64/include/asm/hardirq.h b/arch/arm64/include/asm/hardirq.h
index 6aae421..1679d22 100644
--- a/arch/arm64/include/asm/hardirq.h
+++ b/arch/arm64/include/asm/hardirq.h
@@ -47,9 +47,4 @@ static inline void ack_bad_irq(unsigned int irq)
 	irq_err_count++;
 }
 
-/*
- * No arch-specific IRQ flags.
- */
-#define set_irq_flags(irq, flags)
-
 #endif /* __ASM_HARDIRQ_H */
-- 
2.1.0


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

* [PATCH 15/15] arm64: remove ununsed set_irq_flags
@ 2015-06-09 18:26   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
  To: linux-arm-kernel

Now that all users of set_irq_flags and custom flags are converted to
genirq functions, the ARM specific set_irq_flags can be removed.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-arm-kernel at lists.infradead.org
---
 arch/arm64/include/asm/hardirq.h | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/arch/arm64/include/asm/hardirq.h b/arch/arm64/include/asm/hardirq.h
index 6aae421..1679d22 100644
--- a/arch/arm64/include/asm/hardirq.h
+++ b/arch/arm64/include/asm/hardirq.h
@@ -47,9 +47,4 @@ static inline void ack_bad_irq(unsigned int irq)
 	irq_err_count++;
 }
 
-/*
- * No arch-specific IRQ flags.
- */
-#define set_irq_flags(irq, flags)
-
 #endif /* __ASM_HARDIRQ_H */
-- 
2.1.0

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

* Re: [PATCH 03/15] clk: kill off set_irq_flags usage
  2015-06-09 18:26   ` Rob Herring
@ 2015-06-09 18:44     ` Boris Brezillon
  -1 siblings, 0 replies; 112+ messages in thread
From: Boris Brezillon @ 2015-06-09 18:44 UTC (permalink / raw)
  To: Rob Herring
  Cc: Russell King, linux-arm-kernel, linux-kernel, arm,
	Mike Turquette, Stephen Boyd, linux-clk

On Tue,  9 Jun 2015 13:26:29 -0500
Rob Herring <robh@kernel.org> wrote:

> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
> 
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> 
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>

Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>

> Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
> Cc: Mike Turquette <mturquette@linaro.org>
> Cc: Stephen Boyd <sboyd@codeaurora.org>
> Cc: linux-clk@vger.kernel.org
> ---
>  drivers/clk/at91/pmc.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/clk/at91/pmc.c b/drivers/clk/at91/pmc.c
> index 3f27d21..828b196 100644
> --- a/drivers/clk/at91/pmc.c
> +++ b/drivers/clk/at91/pmc.c
> @@ -125,7 +125,6 @@ static int pmc_irq_map(struct irq_domain *h, unsigned int virq,
>  
>  	irq_set_chip_and_handler(virq, &pmc_irq,
>  				 handle_level_irq);
> -	set_irq_flags(virq, IRQF_VALID);
>  	irq_set_chip_data(virq, pmc);
>  
>  	return 0;



-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* [PATCH 03/15] clk: kill off set_irq_flags usage
@ 2015-06-09 18:44     ` Boris Brezillon
  0 siblings, 0 replies; 112+ messages in thread
From: Boris Brezillon @ 2015-06-09 18:44 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue,  9 Jun 2015 13:26:29 -0500
Rob Herring <robh@kernel.org> wrote:

> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
> 
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> 
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>

Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>

> Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
> Cc: Mike Turquette <mturquette@linaro.org>
> Cc: Stephen Boyd <sboyd@codeaurora.org>
> Cc: linux-clk at vger.kernel.org
> ---
>  drivers/clk/at91/pmc.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/clk/at91/pmc.c b/drivers/clk/at91/pmc.c
> index 3f27d21..828b196 100644
> --- a/drivers/clk/at91/pmc.c
> +++ b/drivers/clk/at91/pmc.c
> @@ -125,7 +125,6 @@ static int pmc_irq_map(struct irq_domain *h, unsigned int virq,
>  
>  	irq_set_chip_and_handler(virq, &pmc_irq,
>  				 handle_level_irq);
> -	set_irq_flags(virq, IRQF_VALID);
>  	irq_set_chip_data(virq, pmc);
>  
>  	return 0;



-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* Re: [PATCH 03/15] clk: kill off set_irq_flags usage
  2015-06-09 18:26   ` Rob Herring
@ 2015-06-09 18:52     ` Stephen Boyd
  -1 siblings, 0 replies; 112+ messages in thread
From: Stephen Boyd @ 2015-06-09 18:52 UTC (permalink / raw)
  To: Rob Herring
  Cc: Russell King, linux-arm-kernel, linux-kernel, arm,
	Boris Brezillon, Mike Turquette, linux-clk

On 06/09, Rob Herring wrote:
> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
> 
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> 
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
> Cc: Mike Turquette <mturquette@linaro.org>
> Cc: Stephen Boyd <sboyd@codeaurora.org>
> Cc: linux-clk@vger.kernel.org
> ---

Acked-by: Stephen Boyd <sboyd@codeaurora.org>

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

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

* [PATCH 03/15] clk: kill off set_irq_flags usage
@ 2015-06-09 18:52     ` Stephen Boyd
  0 siblings, 0 replies; 112+ messages in thread
From: Stephen Boyd @ 2015-06-09 18:52 UTC (permalink / raw)
  To: linux-arm-kernel

On 06/09, Rob Herring wrote:
> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
> 
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> 
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
> Cc: Mike Turquette <mturquette@linaro.org>
> Cc: Stephen Boyd <sboyd@codeaurora.org>
> Cc: linux-clk at vger.kernel.org
> ---

Acked-by: Stephen Boyd <sboyd@codeaurora.org>

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

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

* Re: [PATCH 02/15] regmap: kill off set_irq_flags usage
  2015-06-09 18:26   ` Rob Herring
@ 2015-06-09 19:12     ` Mark Brown
  -1 siblings, 0 replies; 112+ messages in thread
From: Mark Brown @ 2015-06-09 19:12 UTC (permalink / raw)
  To: Rob Herring
  Cc: Russell King, linux-arm-kernel, linux-kernel, arm, Greg Kroah-Hartman

[-- Attachment #1: Type: text/plain, Size: 520 bytes --]

On Tue, Jun 09, 2015 at 01:26:28PM -0500, Rob Herring wrote:

> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.

Well, I don't think it's blind - IIRC it's just that this code all
predates the genirq flags and ARM had the opposite default to x86 (I
guess because of being conservative about all the random interrupt
controllers you get and what might be hanging off them) so we needed to
do this dance to get interrupts to work.

Anyway, I've applied this - thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

* [PATCH 02/15] regmap: kill off set_irq_flags usage
@ 2015-06-09 19:12     ` Mark Brown
  0 siblings, 0 replies; 112+ messages in thread
From: Mark Brown @ 2015-06-09 19:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jun 09, 2015 at 01:26:28PM -0500, Rob Herring wrote:

> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.

Well, I don't think it's blind - IIRC it's just that this code all
predates the genirq flags and ARM had the opposite default to x86 (I
guess because of being conservative about all the random interrupt
controllers you get and what might be hanging off them) so we needed to
do this dance to get interrupts to work.

Anyway, I've applied this - thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150609/07a9ae89/attachment.sig>

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

* Re: [PATCH 00/15] Kill off set_irq_flags
  2015-06-09 18:26 ` Rob Herring
@ 2015-06-09 20:28   ` Russell King - ARM Linux
  -1 siblings, 0 replies; 112+ messages in thread
From: Russell King - ARM Linux @ 2015-06-09 20:28 UTC (permalink / raw)
  To: Rob Herring
  Cc: linux-arm-kernel, linux-kernel, arm, Catalin Marinas,
	Will Deacon, Greg Kroah-Hartman, Jiri Slaby, Barry Song,
	Simon Horman, Magnus Damm, Tomasz Figa, Thomas Abraham,
	Bjorn Helgaas, Samuel Ortiz, Lee Jones, Linus Walleij,
	Roger Quadros, Tony Lindgren, Thomas Gleixner, Jason Cooper,
	David Airlie, Alexandre Courbot, Dan Williams, Vinod Koul,
	Mike Turquette, Stephen Boyd, Mark Brown

On Tue, Jun 09, 2015 at 01:26:26PM -0500, Rob Herring wrote:
> This series converts all users of ARM specific set_irq_flags to use
> common genirq functions. In many cases where irqdomains are used, the
> set_irq_flags calls were redundant, so I've removed them.
> 
> This is not intended for 4.2, but if any subsystem maintainers want to
> pick up their subsystem's change that is fine. All but the last 2
> patches stand on their own. Any new drivers going into 4.2 may need a
> similar change, but I'm sure people are told not to use set_irq_flags in
> reviews. ;)

So what are you doing about the initial state of IRQs on legacy ARM where
IRQs start off being un-requestable, and need the set_irq_flags() to make
them requestable.  I think you could be introducing a massive regression
by making this change.

Unless you can prove that this isn't the case, you shouldn't be removing
this stuff, especially not from legacy platforms.

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

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

* [PATCH 00/15] Kill off set_irq_flags
@ 2015-06-09 20:28   ` Russell King - ARM Linux
  0 siblings, 0 replies; 112+ messages in thread
From: Russell King - ARM Linux @ 2015-06-09 20:28 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jun 09, 2015 at 01:26:26PM -0500, Rob Herring wrote:
> This series converts all users of ARM specific set_irq_flags to use
> common genirq functions. In many cases where irqdomains are used, the
> set_irq_flags calls were redundant, so I've removed them.
> 
> This is not intended for 4.2, but if any subsystem maintainers want to
> pick up their subsystem's change that is fine. All but the last 2
> patches stand on their own. Any new drivers going into 4.2 may need a
> similar change, but I'm sure people are told not to use set_irq_flags in
> reviews. ;)

So what are you doing about the initial state of IRQs on legacy ARM where
IRQs start off being un-requestable, and need the set_irq_flags() to make
them requestable.  I think you could be introducing a massive regression
by making this change.

Unless you can prove that this isn't the case, you shouldn't be removing
this stuff, especially not from legacy platforms.

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

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

* Re: [PATCH 00/15] Kill off set_irq_flags
  2015-06-09 20:28   ` Russell King - ARM Linux
@ 2015-06-09 21:23     ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 21:23 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: linux-arm-kernel, linux-kernel, arm, Catalin Marinas,
	Will Deacon, Greg Kroah-Hartman, Jiri Slaby, Barry Song,
	Simon Horman, Magnus Damm, Tomasz Figa, Thomas Abraham,
	Bjorn Helgaas, Samuel Ortiz, Lee Jones, Linus Walleij,
	Roger Quadros, Tony Lindgren, Thomas Gleixner, Jason Cooper,
	David Airlie, Alexandre Courbot, Dan Williams, Vinod Koul,
	Mike Turquette, Stephen Boyd, Mark Brown

On Tue, Jun 9, 2015 at 3:28 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Tue, Jun 09, 2015 at 01:26:26PM -0500, Rob Herring wrote:
>> This series converts all users of ARM specific set_irq_flags to use
>> common genirq functions. In many cases where irqdomains are used, the
>> set_irq_flags calls were redundant, so I've removed them.
>>
>> This is not intended for 4.2, but if any subsystem maintainers want to
>> pick up their subsystem's change that is fine. All but the last 2
>> patches stand on their own. Any new drivers going into 4.2 may need a
>> similar change, but I'm sure people are told not to use set_irq_flags in
>> reviews. ;)
>
> So what are you doing about the initial state of IRQs on legacy ARM where
> IRQs start off being un-requestable, and need the set_irq_flags() to make
> them requestable.  I think you could be introducing a massive regression
> by making this change.

None of that changes. The initial state is set by ARCH_IRQ_INIT_FLAGS
which I've not changed:

#define ARCH_IRQ_INIT_FLAGS     (IRQ_NOREQUEST | IRQ_NOPROBE)

> Unless you can prove that this isn't the case, you shouldn't be removing
> this stuff, especially not from legacy platforms.

set_irq_flags() only does a translation from custom ARM IRQF_* flags
to standard flags and then calls irq_modify_status(). This only
removes the translation and users set/clear standard flags directly.
It is a straight-forward removal of a wrapper function.

I *would* like to get rid of ARCH_IRQ_INIT_FLAGS and have the same
defaults across arches, but yes that would likely cause regressions.

Rob

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

* [PATCH 00/15] Kill off set_irq_flags
@ 2015-06-09 21:23     ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-09 21:23 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jun 9, 2015 at 3:28 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Tue, Jun 09, 2015 at 01:26:26PM -0500, Rob Herring wrote:
>> This series converts all users of ARM specific set_irq_flags to use
>> common genirq functions. In many cases where irqdomains are used, the
>> set_irq_flags calls were redundant, so I've removed them.
>>
>> This is not intended for 4.2, but if any subsystem maintainers want to
>> pick up their subsystem's change that is fine. All but the last 2
>> patches stand on their own. Any new drivers going into 4.2 may need a
>> similar change, but I'm sure people are told not to use set_irq_flags in
>> reviews. ;)
>
> So what are you doing about the initial state of IRQs on legacy ARM where
> IRQs start off being un-requestable, and need the set_irq_flags() to make
> them requestable.  I think you could be introducing a massive regression
> by making this change.

None of that changes. The initial state is set by ARCH_IRQ_INIT_FLAGS
which I've not changed:

#define ARCH_IRQ_INIT_FLAGS     (IRQ_NOREQUEST | IRQ_NOPROBE)

> Unless you can prove that this isn't the case, you shouldn't be removing
> this stuff, especially not from legacy platforms.

set_irq_flags() only does a translation from custom ARM IRQF_* flags
to standard flags and then calls irq_modify_status(). This only
removes the translation and users set/clear standard flags directly.
It is a straight-forward removal of a wrapper function.

I *would* like to get rid of ARCH_IRQ_INIT_FLAGS and have the same
defaults across arches, but yes that would likely cause regressions.

Rob

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

* Re: [PATCH 02/15] regmap: kill off set_irq_flags usage
  2015-06-09 19:12     ` Mark Brown
@ 2015-06-09 21:27       ` Russell King - ARM Linux
  -1 siblings, 0 replies; 112+ messages in thread
From: Russell King - ARM Linux @ 2015-06-09 21:27 UTC (permalink / raw)
  To: Mark Brown
  Cc: Rob Herring, linux-arm-kernel, linux-kernel, arm, Greg Kroah-Hartman

On Tue, Jun 09, 2015 at 08:12:11PM +0100, Mark Brown wrote:
> On Tue, Jun 09, 2015 at 01:26:28PM -0500, Rob Herring wrote:
> 
> > clear that is really needed. There appears to be a great deal of blind
> > copy and paste of this code.
> 
> Well, I don't think it's blind - IIRC it's just that this code all
> predates the genirq flags and ARM had the opposite default to x86 (I
> guess because of being conservative about all the random interrupt
> controllers you get and what might be hanging off them) so we needed to
> do this dance to get interrupts to work.

It's because there exist platforms where specific IRQs are permanently
asserted, and unexpectedly claiming such an interrupt (eg, through IRQ
probing) would lock the system - at least before we ended up with the
detection in genirq (which has its roots in the ARM code.)

The problem is we're dealing with history here, and flipping ARM from
defaulting to "IRQs not valid" to "All IRQs valid" is a far from
trivial task.

I'd suggest people think carefully about applying these patches.  They
have only been around for a matter of hours, so to rush to apply them
when they haven't been revewied as a whole to assess whether the approach
is the right one is rather hasty.

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

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

* [PATCH 02/15] regmap: kill off set_irq_flags usage
@ 2015-06-09 21:27       ` Russell King - ARM Linux
  0 siblings, 0 replies; 112+ messages in thread
From: Russell King - ARM Linux @ 2015-06-09 21:27 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jun 09, 2015 at 08:12:11PM +0100, Mark Brown wrote:
> On Tue, Jun 09, 2015 at 01:26:28PM -0500, Rob Herring wrote:
> 
> > clear that is really needed. There appears to be a great deal of blind
> > copy and paste of this code.
> 
> Well, I don't think it's blind - IIRC it's just that this code all
> predates the genirq flags and ARM had the opposite default to x86 (I
> guess because of being conservative about all the random interrupt
> controllers you get and what might be hanging off them) so we needed to
> do this dance to get interrupts to work.

It's because there exist platforms where specific IRQs are permanently
asserted, and unexpectedly claiming such an interrupt (eg, through IRQ
probing) would lock the system - at least before we ended up with the
detection in genirq (which has its roots in the ARM code.)

The problem is we're dealing with history here, and flipping ARM from
defaulting to "IRQs not valid" to "All IRQs valid" is a far from
trivial task.

I'd suggest people think carefully about applying these patches.  They
have only been around for a matter of hours, so to rush to apply them
when they haven't been revewied as a whole to assess whether the approach
is the right one is rather hasty.

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

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

* Re: [PATCH 02/15] regmap: kill off set_irq_flags usage
  2015-06-09 21:27       ` Russell King - ARM Linux
@ 2015-06-09 23:20         ` Mark Brown
  -1 siblings, 0 replies; 112+ messages in thread
From: Mark Brown @ 2015-06-09 23:20 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Rob Herring, linux-arm-kernel, linux-kernel, arm, Greg Kroah-Hartman

[-- Attachment #1: Type: text/plain, Size: 886 bytes --]

On Tue, Jun 09, 2015 at 10:27:09PM +0100, Russell King - ARM Linux wrote:

> It's because there exist platforms where specific IRQs are permanently
> asserted, and unexpectedly claiming such an interrupt (eg, through IRQ
> probing) would lock the system - at least before we ended up with the
> detection in genirq (which has its roots in the ARM code.)

Ah, yes - now I remember.  I just had a vauge recollection of broken
probing.

> I'd suggest people think carefully about applying these patches.  They
> have only been around for a matter of hours, so to rush to apply them
> when they haven't been revewied as a whole to assess whether the approach
> is the right one is rather hasty.

I'm fairly comfortable with the patch for regmap as that code is
architecture neutral, should already have been consistent and the
non-ARM path has definitely been tested (I've done it myself).

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

* [PATCH 02/15] regmap: kill off set_irq_flags usage
@ 2015-06-09 23:20         ` Mark Brown
  0 siblings, 0 replies; 112+ messages in thread
From: Mark Brown @ 2015-06-09 23:20 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jun 09, 2015 at 10:27:09PM +0100, Russell King - ARM Linux wrote:

> It's because there exist platforms where specific IRQs are permanently
> asserted, and unexpectedly claiming such an interrupt (eg, through IRQ
> probing) would lock the system - at least before we ended up with the
> detection in genirq (which has its roots in the ARM code.)

Ah, yes - now I remember.  I just had a vauge recollection of broken
probing.

> I'd suggest people think carefully about applying these patches.  They
> have only been around for a matter of hours, so to rush to apply them
> when they haven't been revewied as a whole to assess whether the approach
> is the right one is rather hasty.

I'm fairly comfortable with the patch for regmap as that code is
architecture neutral, should already have been consistent and the
non-ARM path has definitely been tested (I've done it myself).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150610/2c153884/attachment.sig>

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

* Re: [PATCH 11/15] pinctrl: kill off set_irq_flags usage
  2015-06-09 18:26   ` Rob Herring
  (?)
@ 2015-06-10 12:42     ` Linus Walleij
  -1 siblings, 0 replies; 112+ messages in thread
From: Linus Walleij @ 2015-06-10 12:42 UTC (permalink / raw)
  To: Rob Herring
  Cc: Russell King, linux-arm-kernel, Krzysztof Kozlowski,
	linux-samsung-soc, Stephen Warren, Lee Jones, linux-kernel,
	Tomasz Figa, linux-gpio, arm, Thomas Abraham, Kukjin Kim,
	Matthias Brugger, linux-mediatek, linux-rpi-kernel

On Tue, Jun 9, 2015 at 8:26 PM, Rob Herring <robh@kernel.org> wrote:

> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
>
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Stephen Warren <swarren@wwwdotorg.org>
> Cc: Lee Jones <lee@kernel.org>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Tomasz Figa <tomasz.figa@gmail.com>
> Cc: Thomas Abraham <thomas.abraham@linaro.org>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Cc: linux-gpio@vger.kernel.org
> Cc: linux-rpi-kernel@lists.infradead.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-mediatek@lists.infradead.org
> Cc: linux-samsung-soc@vger.kernel.org

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

Yours,
Linus Walleij

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

* Re: [PATCH 11/15] pinctrl: kill off set_irq_flags usage
@ 2015-06-10 12:42     ` Linus Walleij
  0 siblings, 0 replies; 112+ messages in thread
From: Linus Walleij @ 2015-06-10 12:42 UTC (permalink / raw)
  To: Rob Herring
  Cc: Russell King, linux-arm-kernel, Krzysztof Kozlowski,
	linux-samsung-soc, Stephen Warren, Lee Jones, linux-kernel,
	Tomasz Figa, linux-gpio, arm, Thomas Abraham, Kukjin Kim,
	Matthias Brugger, linux-mediatek, linux-rpi-kernel

On Tue, Jun 9, 2015 at 8:26 PM, Rob Herring <robh@kernel.org> wrote:

> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
>
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Stephen Warren <swarren@wwwdotorg.org>
> Cc: Lee Jones <lee@kernel.org>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Tomasz Figa <tomasz.figa@gmail.com>
> Cc: Thomas Abraham <thomas.abraham@linaro.org>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Cc: linux-gpio@vger.kernel.org
> Cc: linux-rpi-kernel@lists.infradead.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-mediatek@lists.infradead.org
> Cc: linux-samsung-soc@vger.kernel.org

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

Yours,
Linus Walleij

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

* [PATCH 11/15] pinctrl: kill off set_irq_flags usage
@ 2015-06-10 12:42     ` Linus Walleij
  0 siblings, 0 replies; 112+ messages in thread
From: Linus Walleij @ 2015-06-10 12:42 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jun 9, 2015 at 8:26 PM, Rob Herring <robh@kernel.org> wrote:

> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
>
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Stephen Warren <swarren@wwwdotorg.org>
> Cc: Lee Jones <lee@kernel.org>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Tomasz Figa <tomasz.figa@gmail.com>
> Cc: Thomas Abraham <thomas.abraham@linaro.org>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Cc: linux-gpio at vger.kernel.org
> Cc: linux-rpi-kernel at lists.infradead.org
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-mediatek at lists.infradead.org
> Cc: linux-samsung-soc at vger.kernel.org

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

Yours,
Linus Walleij

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

* Re: [PATCH 05/15] gpio: kill off set_irq_flags usage
  2015-06-09 18:26   ` Rob Herring
  (?)
@ 2015-06-10 12:43       ` Linus Walleij
  -1 siblings, 0 replies; 112+ messages in thread
From: Linus Walleij @ 2015-06-10 12:43 UTC (permalink / raw)
  To: Rob Herring
  Cc: Russell King, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, arm-DgEjT+Ai2ygdnm+yROfE0A,
	Michael Hennerich, Alexandre Courbot, Ray Jui, Stephen Warren,
	Thierry Reding, linux-gpio-u79uwXL29TY76Z2rM5mHXA,
	bcm-kernel-feedback-list, linux-tegra-u79uwXL29TY76Z2rM5mHXA

On Tue, Jun 9, 2015 at 8:26 PM, Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:

> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
>
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.
>
> Signed-off-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Cc: Michael Hennerich <michael.hennerich-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org>
> Cc: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Cc: Alexandre Courbot <gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Cc: Ray Jui <rjui-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
> Cc: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
> Cc: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Cc: linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org
> Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

Acked-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

Yours,
Linus Walleij

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

* Re: [PATCH 05/15] gpio: kill off set_irq_flags usage
@ 2015-06-10 12:43       ` Linus Walleij
  0 siblings, 0 replies; 112+ messages in thread
From: Linus Walleij @ 2015-06-10 12:43 UTC (permalink / raw)
  To: Rob Herring
  Cc: Russell King, linux-arm-kernel, linux-kernel, arm,
	Michael Hennerich, Alexandre Courbot, Ray Jui, Stephen Warren,
	Thierry Reding, linux-gpio, bcm-kernel-feedback-list,
	linux-tegra

On Tue, Jun 9, 2015 at 8:26 PM, Rob Herring <robh@kernel.org> wrote:

> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
>
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Michael Hennerich <michael.hennerich@analog.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Alexandre Courbot <gnurou@gmail.com>
> Cc: Ray Jui <rjui@broadcom.com>
> Cc: Stephen Warren <swarren@wwwdotorg.org>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: linux-gpio@vger.kernel.org
> Cc: bcm-kernel-feedback-list@broadcom.com
> Cc: linux-tegra@vger.kernel.org

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

Yours,
Linus Walleij

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

* [PATCH 05/15] gpio: kill off set_irq_flags usage
@ 2015-06-10 12:43       ` Linus Walleij
  0 siblings, 0 replies; 112+ messages in thread
From: Linus Walleij @ 2015-06-10 12:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jun 9, 2015 at 8:26 PM, Rob Herring <robh@kernel.org> wrote:

> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
>
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Michael Hennerich <michael.hennerich@analog.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Alexandre Courbot <gnurou@gmail.com>
> Cc: Ray Jui <rjui@broadcom.com>
> Cc: Stephen Warren <swarren@wwwdotorg.org>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: linux-gpio at vger.kernel.org
> Cc: bcm-kernel-feedback-list at broadcom.com
> Cc: linux-tegra at vger.kernel.org

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

Yours,
Linus Walleij

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

* Re: [PATCH 09/15] mfd: kill off set_irq_flags usage
  2015-06-09 18:26   ` Rob Herring
  (?)
@ 2015-06-10 12:43     ` Linus Walleij
  -1 siblings, 0 replies; 112+ messages in thread
From: Linus Walleij @ 2015-06-10 12:43 UTC (permalink / raw)
  To: Rob Herring
  Cc: Russell King, linux-arm-kernel, linux-kernel, arm, Samuel Ortiz,
	Lee Jones, Milo Kim, Kumar Gala, Andy Gross, David Brown,
	Tony Lindgren, patches, linux-arm-msm, linux-soc, Linux-OMAP

On Tue, Jun 9, 2015 at 8:26 PM, Rob Herring <robh@kernel.org> wrote:

> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
>
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Milo Kim <milo.kim@ti.com>
> Cc: Kumar Gala <galak@codeaurora.org>
> Cc: Andy Gross <agross@codeaurora.org>
> Cc: David Brown <davidb@codeaurora.org>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: patches@opensource.wolfsonmicro.com
> Cc: linux-arm-msm@vger.kernel.org
> Cc: linux-soc@vger.kernel.org
> Cc: linux-omap@vger.kernel.org

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

Yours,
Linus Walleij

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

* Re: [PATCH 09/15] mfd: kill off set_irq_flags usage
@ 2015-06-10 12:43     ` Linus Walleij
  0 siblings, 0 replies; 112+ messages in thread
From: Linus Walleij @ 2015-06-10 12:43 UTC (permalink / raw)
  To: Rob Herring
  Cc: Russell King, linux-arm-kernel, linux-kernel, arm, Samuel Ortiz,
	Lee Jones, Milo Kim, Kumar Gala, Andy Gross, David Brown,
	Tony Lindgren, patches, linux-arm-msm, linux-soc, Linux-OMAP

On Tue, Jun 9, 2015 at 8:26 PM, Rob Herring <robh@kernel.org> wrote:

> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
>
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Milo Kim <milo.kim@ti.com>
> Cc: Kumar Gala <galak@codeaurora.org>
> Cc: Andy Gross <agross@codeaurora.org>
> Cc: David Brown <davidb@codeaurora.org>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: patches@opensource.wolfsonmicro.com
> Cc: linux-arm-msm@vger.kernel.org
> Cc: linux-soc@vger.kernel.org
> Cc: linux-omap@vger.kernel.org

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

Yours,
Linus Walleij

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

* [PATCH 09/15] mfd: kill off set_irq_flags usage
@ 2015-06-10 12:43     ` Linus Walleij
  0 siblings, 0 replies; 112+ messages in thread
From: Linus Walleij @ 2015-06-10 12:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jun 9, 2015 at 8:26 PM, Rob Herring <robh@kernel.org> wrote:

> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
>
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Milo Kim <milo.kim@ti.com>
> Cc: Kumar Gala <galak@codeaurora.org>
> Cc: Andy Gross <agross@codeaurora.org>
> Cc: David Brown <davidb@codeaurora.org>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: patches at opensource.wolfsonmicro.com
> Cc: linux-arm-msm at vger.kernel.org
> Cc: linux-soc at vger.kernel.org
> Cc: linux-omap at vger.kernel.org

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

Yours,
Linus Walleij

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

* Re: [PATCH 15/15] arm64: remove ununsed set_irq_flags
  2015-06-09 18:26   ` Rob Herring
@ 2015-06-10 16:56     ` Catalin Marinas
  -1 siblings, 0 replies; 112+ messages in thread
From: Catalin Marinas @ 2015-06-10 16:56 UTC (permalink / raw)
  To: Rob Herring
  Cc: Russell King, linux-arm-kernel, arm, Will Deacon, linux-kernel

On Tue, Jun 09, 2015 at 01:26:41PM -0500, Rob Herring wrote:
> Now that all users of set_irq_flags and custom flags are converted to
> genirq functions, the ARM specific set_irq_flags can be removed.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: linux-arm-kernel@lists.infradead.org
> ---
>  arch/arm64/include/asm/hardirq.h | 5 -----
>  1 file changed, 5 deletions(-)

Acked-by: Catalin Marinas <catalin.marinas@arm.com>

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

* [PATCH 15/15] arm64: remove ununsed set_irq_flags
@ 2015-06-10 16:56     ` Catalin Marinas
  0 siblings, 0 replies; 112+ messages in thread
From: Catalin Marinas @ 2015-06-10 16:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jun 09, 2015 at 01:26:41PM -0500, Rob Herring wrote:
> Now that all users of set_irq_flags and custom flags are converted to
> genirq functions, the ARM specific set_irq_flags can be removed.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: linux-arm-kernel at lists.infradead.org
> ---
>  arch/arm64/include/asm/hardirq.h | 5 -----
>  1 file changed, 5 deletions(-)

Acked-by: Catalin Marinas <catalin.marinas@arm.com>

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

* Re: [PATCH 07/15] irqchip: kill off set_irq_flags usage
  2015-06-09 18:26   ` Rob Herring
  (?)
@ 2015-06-10 17:13     ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-10 17:13 UTC (permalink / raw)
  To: linux-arm-kernel, Thomas Gleixner, Jason Cooper
  Cc: Russell King, linux-kernel, arm, Rob Herring, Kukjin Kim,
	Krzysztof Kozlowski, Stephen Warren, Lee Jones, Alexander Shiyan,
	Maxime Ripard, linux-samsung-soc, linux-rpi-kernel

On Tue, Jun 9, 2015 at 1:26 PM, Rob Herring <robh@kernel.org> wrote:
> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
>
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.

[...]

> diff --git a/drivers/irqchip/irq-clps711x.c b/drivers/irqchip/irq-clps711x.c
> index 33127f1..e3609ae 100644
> --- a/drivers/irqchip/irq-clps711x.c
> +++ b/drivers/irqchip/irq-clps711x.c
> @@ -133,14 +133,14 @@ static int __init clps711x_intc_irq_map(struct irq_domain *h, unsigned int virq,
>                                         irq_hw_number_t hw)
>  {
>         irq_flow_handler_t handler = handle_level_irq;
> -       unsigned int flags = IRQF_VALID | IRQF_PROBE;
> +       unsigned int flags = 0;
>
>         if (!clps711x_irqs[hw].flags)
>                 return 0;
>
>         if (clps711x_irqs[hw].flags & CLPS711X_FLAG_FIQ) {
>                 handler = handle_bad_irq;
> -               flags |= IRQF_NOAUTOEN;
> +               flags |= IRQ_NOAUTOEN;
>         } else if (clps711x_irqs[hw].eoi) {
>                 handler = handle_fasteoi_irq;
>         }
> @@ -150,7 +150,7 @@ static int __init clps711x_intc_irq_map(struct irq_domain *h, unsigned int virq,
>                 writel_relaxed(0, clps711x_intc->base + clps711x_irqs[hw].eoi);
>
>         irq_set_chip_and_handler(virq, &clps711x_intc_chip, handler);
> -       set_irq_flags(virq, flags);
> +       irq_modify_status_flags(irq, IRQ_NOPROBE, flags);

One fix needed here:

diff --git a/drivers/irqchip/irq-clps711x.c b/drivers/irqchip/irq-clps711x.c
index e3609ae..2e74e81 100644
--- a/drivers/irqchip/irq-clps711x.c
+++ b/drivers/irqchip/irq-clps711x.c
@@ -150,7 +150,7 @@ static int __init clps711x_intc_irq_map(struct
irq_domain *h, unsigned int virq,
                writel_relaxed(0, clps711x_intc->base + clps711x_irqs[hw].eoi);

        irq_set_chip_and_handler(virq, &clps711x_intc_chip, handler);
-       irq_modify_status_flags(irq, IRQ_NOPROBE, flags);
+       irq_modify_status(virq, IRQ_NOPROBE, flags);

        return 0;
 }

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

* Re: [PATCH 07/15] irqchip: kill off set_irq_flags usage
@ 2015-06-10 17:13     ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-10 17:13 UTC (permalink / raw)
  To: linux-arm-kernel, Thomas Gleixner, Jason Cooper
  Cc: Russell King, linux-kernel, arm, Rob Herring, Kukjin Kim,
	Krzysztof Kozlowski, Stephen Warren, Lee Jones, Alexander Shiyan,
	Maxime Ripard, linux-samsung-soc, linux-rpi-kernel

On Tue, Jun 9, 2015 at 1:26 PM, Rob Herring <robh@kernel.org> wrote:
> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
>
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.

[...]

> diff --git a/drivers/irqchip/irq-clps711x.c b/drivers/irqchip/irq-clps711x.c
> index 33127f1..e3609ae 100644
> --- a/drivers/irqchip/irq-clps711x.c
> +++ b/drivers/irqchip/irq-clps711x.c
> @@ -133,14 +133,14 @@ static int __init clps711x_intc_irq_map(struct irq_domain *h, unsigned int virq,
>                                         irq_hw_number_t hw)
>  {
>         irq_flow_handler_t handler = handle_level_irq;
> -       unsigned int flags = IRQF_VALID | IRQF_PROBE;
> +       unsigned int flags = 0;
>
>         if (!clps711x_irqs[hw].flags)
>                 return 0;
>
>         if (clps711x_irqs[hw].flags & CLPS711X_FLAG_FIQ) {
>                 handler = handle_bad_irq;
> -               flags |= IRQF_NOAUTOEN;
> +               flags |= IRQ_NOAUTOEN;
>         } else if (clps711x_irqs[hw].eoi) {
>                 handler = handle_fasteoi_irq;
>         }
> @@ -150,7 +150,7 @@ static int __init clps711x_intc_irq_map(struct irq_domain *h, unsigned int virq,
>                 writel_relaxed(0, clps711x_intc->base + clps711x_irqs[hw].eoi);
>
>         irq_set_chip_and_handler(virq, &clps711x_intc_chip, handler);
> -       set_irq_flags(virq, flags);
> +       irq_modify_status_flags(irq, IRQ_NOPROBE, flags);

One fix needed here:

diff --git a/drivers/irqchip/irq-clps711x.c b/drivers/irqchip/irq-clps711x.c
index e3609ae..2e74e81 100644
--- a/drivers/irqchip/irq-clps711x.c
+++ b/drivers/irqchip/irq-clps711x.c
@@ -150,7 +150,7 @@ static int __init clps711x_intc_irq_map(struct
irq_domain *h, unsigned int virq,
                writel_relaxed(0, clps711x_intc->base + clps711x_irqs[hw].eoi);

        irq_set_chip_and_handler(virq, &clps711x_intc_chip, handler);
-       irq_modify_status_flags(irq, IRQ_NOPROBE, flags);
+       irq_modify_status(virq, IRQ_NOPROBE, flags);

        return 0;
 }

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

* [PATCH 07/15] irqchip: kill off set_irq_flags usage
@ 2015-06-10 17:13     ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-10 17:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jun 9, 2015 at 1:26 PM, Rob Herring <robh@kernel.org> wrote:
> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
>
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.

[...]

> diff --git a/drivers/irqchip/irq-clps711x.c b/drivers/irqchip/irq-clps711x.c
> index 33127f1..e3609ae 100644
> --- a/drivers/irqchip/irq-clps711x.c
> +++ b/drivers/irqchip/irq-clps711x.c
> @@ -133,14 +133,14 @@ static int __init clps711x_intc_irq_map(struct irq_domain *h, unsigned int virq,
>                                         irq_hw_number_t hw)
>  {
>         irq_flow_handler_t handler = handle_level_irq;
> -       unsigned int flags = IRQF_VALID | IRQF_PROBE;
> +       unsigned int flags = 0;
>
>         if (!clps711x_irqs[hw].flags)
>                 return 0;
>
>         if (clps711x_irqs[hw].flags & CLPS711X_FLAG_FIQ) {
>                 handler = handle_bad_irq;
> -               flags |= IRQF_NOAUTOEN;
> +               flags |= IRQ_NOAUTOEN;
>         } else if (clps711x_irqs[hw].eoi) {
>                 handler = handle_fasteoi_irq;
>         }
> @@ -150,7 +150,7 @@ static int __init clps711x_intc_irq_map(struct irq_domain *h, unsigned int virq,
>                 writel_relaxed(0, clps711x_intc->base + clps711x_irqs[hw].eoi);
>
>         irq_set_chip_and_handler(virq, &clps711x_intc_chip, handler);
> -       set_irq_flags(virq, flags);
> +       irq_modify_status_flags(irq, IRQ_NOPROBE, flags);

One fix needed here:

diff --git a/drivers/irqchip/irq-clps711x.c b/drivers/irqchip/irq-clps711x.c
index e3609ae..2e74e81 100644
--- a/drivers/irqchip/irq-clps711x.c
+++ b/drivers/irqchip/irq-clps711x.c
@@ -150,7 +150,7 @@ static int __init clps711x_intc_irq_map(struct
irq_domain *h, unsigned int virq,
                writel_relaxed(0, clps711x_intc->base + clps711x_irqs[hw].eoi);

        irq_set_chip_and_handler(virq, &clps711x_intc_chip, handler);
-       irq_modify_status_flags(irq, IRQ_NOPROBE, flags);
+       irq_modify_status(virq, IRQ_NOPROBE, flags);

        return 0;
 }

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

* Re: [PATCH 00/15] Kill off set_irq_flags
  2015-06-09 21:23     ` Rob Herring
@ 2015-06-10 23:32       ` Kevin Hilman
  -1 siblings, 0 replies; 112+ messages in thread
From: Kevin Hilman @ 2015-06-10 23:32 UTC (permalink / raw)
  To: Rob Herring
  Cc: Russell King - ARM Linux, linux-arm-kernel, linux-kernel, arm,
	Catalin Marinas, Will Deacon, Greg Kroah-Hartman, Jiri Slaby,
	Barry Song, Simon Horman, Magnus Damm, Tomasz Figa,
	Thomas Abraham, Bjorn Helgaas, Samuel Ortiz, Lee Jones,
	Linus Walleij, Roger Quadros, Tony Lindgren, Thomas Gleixner,
	Jason Cooper, David Airlie, Alexandre Courbot, Dan Williams,
	Vinod Koul, Mike Turquette, Stephen Boyd, Mark Brown

Rob Herring <robh@kernel.org> writes:

> On Tue, Jun 9, 2015 at 3:28 PM, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
>> On Tue, Jun 09, 2015 at 01:26:26PM -0500, Rob Herring wrote:
>>> This series converts all users of ARM specific set_irq_flags to use
>>> common genirq functions. In many cases where irqdomains are used, the
>>> set_irq_flags calls were redundant, so I've removed them.
>>>
>>> This is not intended for 4.2, but if any subsystem maintainers want to
>>> pick up their subsystem's change that is fine. All but the last 2
>>> patches stand on their own. Any new drivers going into 4.2 may need a
>>> similar change, but I'm sure people are told not to use set_irq_flags in
>>> reviews. ;)
>>
>> So what are you doing about the initial state of IRQs on legacy ARM where
>> IRQs start off being un-requestable, and need the set_irq_flags() to make
>> them requestable.  I think you could be introducing a massive regression
>> by making this change.
>
> None of that changes. The initial state is set by ARCH_IRQ_INIT_FLAGS
> which I've not changed:
>
> #define ARCH_IRQ_INIT_FLAGS     (IRQ_NOREQUEST | IRQ_NOPROBE)
>
>> Unless you can prove that this isn't the case, you shouldn't be removing
>> this stuff, especially not from legacy platforms.
>
> set_irq_flags() only does a translation from custom ARM IRQF_* flags
> to standard flags and then calls irq_modify_status(). This only
> removes the translation and users set/clear standard flags directly.
> It is a straight-forward removal of a wrapper function.
>
> I *would* like to get rid of ARCH_IRQ_INIT_FLAGS and have the same
> defaults across arches, but yes that would likely cause regressions.

For some reason, I don't have  00/15 in my inbox or list folders, so
replying here...

I gave this series a spin through the kernelci.org build/boot bot where
it was booted on ~20 different ARM SoC families and mulitple different
defconfigs, and there were no boot failures, so it at least passes a
basic boot sanity check.

If you think it's appropriate, feel free to add :

Tested-by: Kevin Hilman <khilman@linaro.org>

Kevin

[1] http://kernelci.org/boot/all/job/khilman/kernel/v4.1-rc7-15-g64b9a5c929f7/

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

* [PATCH 00/15] Kill off set_irq_flags
@ 2015-06-10 23:32       ` Kevin Hilman
  0 siblings, 0 replies; 112+ messages in thread
From: Kevin Hilman @ 2015-06-10 23:32 UTC (permalink / raw)
  To: linux-arm-kernel

Rob Herring <robh@kernel.org> writes:

> On Tue, Jun 9, 2015 at 3:28 PM, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
>> On Tue, Jun 09, 2015 at 01:26:26PM -0500, Rob Herring wrote:
>>> This series converts all users of ARM specific set_irq_flags to use
>>> common genirq functions. In many cases where irqdomains are used, the
>>> set_irq_flags calls were redundant, so I've removed them.
>>>
>>> This is not intended for 4.2, but if any subsystem maintainers want to
>>> pick up their subsystem's change that is fine. All but the last 2
>>> patches stand on their own. Any new drivers going into 4.2 may need a
>>> similar change, but I'm sure people are told not to use set_irq_flags in
>>> reviews. ;)
>>
>> So what are you doing about the initial state of IRQs on legacy ARM where
>> IRQs start off being un-requestable, and need the set_irq_flags() to make
>> them requestable.  I think you could be introducing a massive regression
>> by making this change.
>
> None of that changes. The initial state is set by ARCH_IRQ_INIT_FLAGS
> which I've not changed:
>
> #define ARCH_IRQ_INIT_FLAGS     (IRQ_NOREQUEST | IRQ_NOPROBE)
>
>> Unless you can prove that this isn't the case, you shouldn't be removing
>> this stuff, especially not from legacy platforms.
>
> set_irq_flags() only does a translation from custom ARM IRQF_* flags
> to standard flags and then calls irq_modify_status(). This only
> removes the translation and users set/clear standard flags directly.
> It is a straight-forward removal of a wrapper function.
>
> I *would* like to get rid of ARCH_IRQ_INIT_FLAGS and have the same
> defaults across arches, but yes that would likely cause regressions.

For some reason, I don't have  00/15 in my inbox or list folders, so
replying here...

I gave this series a spin through the kernelci.org build/boot bot where
it was booted on ~20 different ARM SoC families and mulitple different
defconfigs, and there were no boot failures, so it at least passes a
basic boot sanity check.

If you think it's appropriate, feel free to add :

Tested-by: Kevin Hilman <khilman@linaro.org>

Kevin

[1] http://kernelci.org/boot/all/job/khilman/kernel/v4.1-rc7-15-g64b9a5c929f7/

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

* Re: [PATCH 09/15] mfd: kill off set_irq_flags usage
  2015-06-09 18:26   ` Rob Herring
@ 2015-06-11  8:51     ` Lee Jones
  -1 siblings, 0 replies; 112+ messages in thread
From: Lee Jones @ 2015-06-11  8:51 UTC (permalink / raw)
  To: Rob Herring
  Cc: Russell King, linux-arm-kernel, linux-kernel, arm, Samuel Ortiz,
	Linus Walleij, Milo Kim, Kumar Gala, Andy Gross, David Brown,
	Tony Lindgren, patches, linux-arm-msm, linux-soc, linux-omap

On Tue, 09 Jun 2015, Rob Herring wrote:

> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
> 
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> 
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Milo Kim <milo.kim@ti.com>
> Cc: Kumar Gala <galak@codeaurora.org>
> Cc: Andy Gross <agross@codeaurora.org>
> Cc: David Brown <davidb@codeaurora.org>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: patches@opensource.wolfsonmicro.com
> Cc: linux-arm-msm@vger.kernel.org
> Cc: linux-soc@vger.kernel.org
> Cc: linux-omap@vger.kernel.org
> ---
>  drivers/mfd/88pm860x-core.c |  4 ----
>  drivers/mfd/ab8500-core.c   |  4 ----
>  drivers/mfd/arizona-irq.c   |  7 -------
>  drivers/mfd/asic3.c         |  4 ++--
>  drivers/mfd/db8500-prcmu.c  |  1 -
>  drivers/mfd/ezx-pcap.c      |  6 +-----
>  drivers/mfd/htc-egpio.c     |  4 ++--
>  drivers/mfd/htc-i2cpld.c    |  6 +-----
>  drivers/mfd/lp8788-irq.c    |  5 -----
>  drivers/mfd/max8925-core.c  |  5 +----
>  drivers/mfd/max8997-irq.c   |  5 +----
>  drivers/mfd/max8998-irq.c   |  5 +----
>  drivers/mfd/mt6397-core.c   |  4 ----
>  drivers/mfd/pm8921-core.c   |  5 +----
>  drivers/mfd/rc5t583-irq.c   |  4 +---
>  drivers/mfd/stmpe.c         |  7 -------
>  drivers/mfd/t7l66xb.c       |  6 ------
>  drivers/mfd/tc3589x.c       |  7 -------
>  drivers/mfd/tc6393xb.c      |  4 ++--
>  drivers/mfd/tps6586x.c      |  7 -------
>  drivers/mfd/tps65912-irq.c  |  8 +-------
>  drivers/mfd/twl4030-irq.c   | 11 +----------
>  drivers/mfd/twl6030-irq.c   | 13 -------------
>  drivers/mfd/ucb1x00-core.c  |  2 +-
>  drivers/mfd/wm831x-irq.c    |  7 -------
>  drivers/mfd/wm8350-irq.c    |  8 +-------
>  drivers/mfd/wm8994-irq.c    |  7 -------
>  27 files changed, 17 insertions(+), 139 deletions(-)

Acked-by: Lee Jones <lee.jones@linaro.org>

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* [PATCH 09/15] mfd: kill off set_irq_flags usage
@ 2015-06-11  8:51     ` Lee Jones
  0 siblings, 0 replies; 112+ messages in thread
From: Lee Jones @ 2015-06-11  8:51 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, 09 Jun 2015, Rob Herring wrote:

> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
> 
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> 
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Milo Kim <milo.kim@ti.com>
> Cc: Kumar Gala <galak@codeaurora.org>
> Cc: Andy Gross <agross@codeaurora.org>
> Cc: David Brown <davidb@codeaurora.org>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: patches at opensource.wolfsonmicro.com
> Cc: linux-arm-msm at vger.kernel.org
> Cc: linux-soc at vger.kernel.org
> Cc: linux-omap at vger.kernel.org
> ---
>  drivers/mfd/88pm860x-core.c |  4 ----
>  drivers/mfd/ab8500-core.c   |  4 ----
>  drivers/mfd/arizona-irq.c   |  7 -------
>  drivers/mfd/asic3.c         |  4 ++--
>  drivers/mfd/db8500-prcmu.c  |  1 -
>  drivers/mfd/ezx-pcap.c      |  6 +-----
>  drivers/mfd/htc-egpio.c     |  4 ++--
>  drivers/mfd/htc-i2cpld.c    |  6 +-----
>  drivers/mfd/lp8788-irq.c    |  5 -----
>  drivers/mfd/max8925-core.c  |  5 +----
>  drivers/mfd/max8997-irq.c   |  5 +----
>  drivers/mfd/max8998-irq.c   |  5 +----
>  drivers/mfd/mt6397-core.c   |  4 ----
>  drivers/mfd/pm8921-core.c   |  5 +----
>  drivers/mfd/rc5t583-irq.c   |  4 +---
>  drivers/mfd/stmpe.c         |  7 -------
>  drivers/mfd/t7l66xb.c       |  6 ------
>  drivers/mfd/tc3589x.c       |  7 -------
>  drivers/mfd/tc6393xb.c      |  4 ++--
>  drivers/mfd/tps6586x.c      |  7 -------
>  drivers/mfd/tps65912-irq.c  |  8 +-------
>  drivers/mfd/twl4030-irq.c   | 11 +----------
>  drivers/mfd/twl6030-irq.c   | 13 -------------
>  drivers/mfd/ucb1x00-core.c  |  2 +-
>  drivers/mfd/wm831x-irq.c    |  7 -------
>  drivers/mfd/wm8350-irq.c    |  8 +-------
>  drivers/mfd/wm8994-irq.c    |  7 -------
>  27 files changed, 17 insertions(+), 139 deletions(-)

Acked-by: Lee Jones <lee.jones@linaro.org>

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 08/15] memory: kill off set_irq_flags usage
  2015-06-09 18:26   ` Rob Herring
  (?)
@ 2015-06-11 12:18     ` Roger Quadros
  -1 siblings, 0 replies; 112+ messages in thread
From: Roger Quadros @ 2015-06-11 12:18 UTC (permalink / raw)
  To: Rob Herring
  Cc: Russell King, linux-arm-kernel, linux-kernel, arm, Tony Lindgren,
	linux-omap

Rob,

On Tue, 9 Jun 2015 13:26:34 -0500
Rob Herring <robh@kernel.org> wrote:

> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
> 
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> 
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Roger Quadros <rogerq@ti.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: linux-omap@vger.kernel.org
> ---
>  drivers/memory/omap-gpmc.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
> index c94ea0d..0c833e2 100644
> --- a/drivers/memory/omap-gpmc.c
> +++ b/drivers/memory/omap-gpmc.c
> @@ -1176,8 +1176,8 @@ static int gpmc_setup_irq(void)
>  		gpmc_client_irq[i].irq = gpmc_irq_start + i;
>  		irq_set_chip_and_handler(gpmc_client_irq[i].irq,
>  					&gpmc_irq_chip, handle_simple_irq);
> -		set_irq_flags(gpmc_client_irq[i].irq,
> -				IRQF_VALID | IRQF_NOAUTOEN);
> +		irq_modify_status(gpmc_client_irq[i].irq, IRQ_NOREQUEST,
> +				  IRQ_NOAUTOEN);

Shouldn't this be
		irq_modify_status(gpmc_client_irq[i].irq, IRQ_NOREQUEST,
				  IRQ_NOAUTOEN | IRQ_NOPROBE);
?

>  	}
>  
>  	/* Disable interrupts */
> @@ -1200,7 +1200,6 @@ static int gpmc_free_irq(void)
>  	for (i = 0; i < GPMC_NR_IRQ; i++) {
>  		irq_set_handler(gpmc_client_irq[i].irq, NULL);
>  		irq_set_chip(gpmc_client_irq[i].irq, &no_irq_chip);
> -		irq_modify_status(gpmc_client_irq[i].irq, 0, 0);
>  	}
>  
>  	irq_free_descs(gpmc_irq_start, GPMC_NR_IRQ);

cheers,
-roger

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

* Re: [PATCH 08/15] memory: kill off set_irq_flags usage
@ 2015-06-11 12:18     ` Roger Quadros
  0 siblings, 0 replies; 112+ messages in thread
From: Roger Quadros @ 2015-06-11 12:18 UTC (permalink / raw)
  To: Rob Herring
  Cc: Russell King, linux-arm-kernel, linux-kernel, arm, Tony Lindgren,
	linux-omap

Rob,

On Tue, 9 Jun 2015 13:26:34 -0500
Rob Herring <robh@kernel.org> wrote:

> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
> 
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> 
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Roger Quadros <rogerq@ti.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: linux-omap@vger.kernel.org
> ---
>  drivers/memory/omap-gpmc.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
> index c94ea0d..0c833e2 100644
> --- a/drivers/memory/omap-gpmc.c
> +++ b/drivers/memory/omap-gpmc.c
> @@ -1176,8 +1176,8 @@ static int gpmc_setup_irq(void)
>  		gpmc_client_irq[i].irq = gpmc_irq_start + i;
>  		irq_set_chip_and_handler(gpmc_client_irq[i].irq,
>  					&gpmc_irq_chip, handle_simple_irq);
> -		set_irq_flags(gpmc_client_irq[i].irq,
> -				IRQF_VALID | IRQF_NOAUTOEN);
> +		irq_modify_status(gpmc_client_irq[i].irq, IRQ_NOREQUEST,
> +				  IRQ_NOAUTOEN);

Shouldn't this be
		irq_modify_status(gpmc_client_irq[i].irq, IRQ_NOREQUEST,
				  IRQ_NOAUTOEN | IRQ_NOPROBE);
?

>  	}
>  
>  	/* Disable interrupts */
> @@ -1200,7 +1200,6 @@ static int gpmc_free_irq(void)
>  	for (i = 0; i < GPMC_NR_IRQ; i++) {
>  		irq_set_handler(gpmc_client_irq[i].irq, NULL);
>  		irq_set_chip(gpmc_client_irq[i].irq, &no_irq_chip);
> -		irq_modify_status(gpmc_client_irq[i].irq, 0, 0);
>  	}
>  
>  	irq_free_descs(gpmc_irq_start, GPMC_NR_IRQ);

cheers,
-roger

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

* [PATCH 08/15] memory: kill off set_irq_flags usage
@ 2015-06-11 12:18     ` Roger Quadros
  0 siblings, 0 replies; 112+ messages in thread
From: Roger Quadros @ 2015-06-11 12:18 UTC (permalink / raw)
  To: linux-arm-kernel

Rob,

On Tue, 9 Jun 2015 13:26:34 -0500
Rob Herring <robh@kernel.org> wrote:

> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
> 
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> 
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Roger Quadros <rogerq@ti.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: linux-omap at vger.kernel.org
> ---
>  drivers/memory/omap-gpmc.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
> index c94ea0d..0c833e2 100644
> --- a/drivers/memory/omap-gpmc.c
> +++ b/drivers/memory/omap-gpmc.c
> @@ -1176,8 +1176,8 @@ static int gpmc_setup_irq(void)
>  		gpmc_client_irq[i].irq = gpmc_irq_start + i;
>  		irq_set_chip_and_handler(gpmc_client_irq[i].irq,
>  					&gpmc_irq_chip, handle_simple_irq);
> -		set_irq_flags(gpmc_client_irq[i].irq,
> -				IRQF_VALID | IRQF_NOAUTOEN);
> +		irq_modify_status(gpmc_client_irq[i].irq, IRQ_NOREQUEST,
> +				  IRQ_NOAUTOEN);

Shouldn't this be
		irq_modify_status(gpmc_client_irq[i].irq, IRQ_NOREQUEST,
				  IRQ_NOAUTOEN | IRQ_NOPROBE);
?

>  	}
>  
>  	/* Disable interrupts */
> @@ -1200,7 +1200,6 @@ static int gpmc_free_irq(void)
>  	for (i = 0; i < GPMC_NR_IRQ; i++) {
>  		irq_set_handler(gpmc_client_irq[i].irq, NULL);
>  		irq_set_chip(gpmc_client_irq[i].irq, &no_irq_chip);
> -		irq_modify_status(gpmc_client_irq[i].irq, 0, 0);
>  	}
>  
>  	irq_free_descs(gpmc_irq_start, GPMC_NR_IRQ);

cheers,
-roger

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

* Re: [PATCH 08/15] memory: kill off set_irq_flags usage
  2015-06-11 12:18     ` Roger Quadros
  (?)
@ 2015-06-11 13:17       ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-11 13:17 UTC (permalink / raw)
  To: Roger Quadros
  Cc: Russell King, linux-arm-kernel, linux-kernel, arm, Tony Lindgren,
	linux-omap

On Thu, Jun 11, 2015 at 7:18 AM, Roger Quadros <rogerq@ti.com> wrote:
> Rob,
>
> On Tue, 9 Jun 2015 13:26:34 -0500
> Rob Herring <robh@kernel.org> wrote:
>
>> set_irq_flags is ARM specific with custom flags which have genirq
>> equivalents. Convert drivers to use the genirq interfaces directly, so we
>> can kill off set_irq_flags. The translation of flags is as follows:
>>
>> IRQF_VALID -> !IRQ_NOREQUEST
>> IRQF_PROBE -> !IRQ_NOPROBE
>> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>>
>> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
>> and setting IRQ_NOREQUEST already, so there is no need to do this in
>> .map() functions and we can simply remove the set_irq_flags calls. Some
>> users also set IRQ_NOPROBE and this has been maintained although it is not
>> clear that is really needed. There appears to be a great deal of blind
>> copy and paste of this code.
>>
>> Signed-off-by: Rob Herring <robh@kernel.org>
>> Cc: Roger Quadros <rogerq@ti.com>
>> Cc: Tony Lindgren <tony@atomide.com>
>> Cc: linux-omap@vger.kernel.org
>> ---
>>  drivers/memory/omap-gpmc.c | 5 ++---
>>  1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
>> index c94ea0d..0c833e2 100644
>> --- a/drivers/memory/omap-gpmc.c
>> +++ b/drivers/memory/omap-gpmc.c
>> @@ -1176,8 +1176,8 @@ static int gpmc_setup_irq(void)
>>               gpmc_client_irq[i].irq = gpmc_irq_start + i;
>>               irq_set_chip_and_handler(gpmc_client_irq[i].irq,
>>                                       &gpmc_irq_chip, handle_simple_irq);
>> -             set_irq_flags(gpmc_client_irq[i].irq,
>> -                             IRQF_VALID | IRQF_NOAUTOEN);
>> +             irq_modify_status(gpmc_client_irq[i].irq, IRQ_NOREQUEST,
>> +                               IRQ_NOAUTOEN);
>
> Shouldn't this be
>                 irq_modify_status(gpmc_client_irq[i].irq, IRQ_NOREQUEST,
>                                   IRQ_NOAUTOEN | IRQ_NOPROBE);
> ?

Only if this needs to work on !ARM. The default for ARM is IRQ_NOPROBE set.

Rob

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

* Re: [PATCH 08/15] memory: kill off set_irq_flags usage
@ 2015-06-11 13:17       ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-11 13:17 UTC (permalink / raw)
  To: Roger Quadros
  Cc: Russell King, linux-arm-kernel, linux-kernel, arm, Tony Lindgren,
	linux-omap

On Thu, Jun 11, 2015 at 7:18 AM, Roger Quadros <rogerq@ti.com> wrote:
> Rob,
>
> On Tue, 9 Jun 2015 13:26:34 -0500
> Rob Herring <robh@kernel.org> wrote:
>
>> set_irq_flags is ARM specific with custom flags which have genirq
>> equivalents. Convert drivers to use the genirq interfaces directly, so we
>> can kill off set_irq_flags. The translation of flags is as follows:
>>
>> IRQF_VALID -> !IRQ_NOREQUEST
>> IRQF_PROBE -> !IRQ_NOPROBE
>> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>>
>> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
>> and setting IRQ_NOREQUEST already, so there is no need to do this in
>> .map() functions and we can simply remove the set_irq_flags calls. Some
>> users also set IRQ_NOPROBE and this has been maintained although it is not
>> clear that is really needed. There appears to be a great deal of blind
>> copy and paste of this code.
>>
>> Signed-off-by: Rob Herring <robh@kernel.org>
>> Cc: Roger Quadros <rogerq@ti.com>
>> Cc: Tony Lindgren <tony@atomide.com>
>> Cc: linux-omap@vger.kernel.org
>> ---
>>  drivers/memory/omap-gpmc.c | 5 ++---
>>  1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
>> index c94ea0d..0c833e2 100644
>> --- a/drivers/memory/omap-gpmc.c
>> +++ b/drivers/memory/omap-gpmc.c
>> @@ -1176,8 +1176,8 @@ static int gpmc_setup_irq(void)
>>               gpmc_client_irq[i].irq = gpmc_irq_start + i;
>>               irq_set_chip_and_handler(gpmc_client_irq[i].irq,
>>                                       &gpmc_irq_chip, handle_simple_irq);
>> -             set_irq_flags(gpmc_client_irq[i].irq,
>> -                             IRQF_VALID | IRQF_NOAUTOEN);
>> +             irq_modify_status(gpmc_client_irq[i].irq, IRQ_NOREQUEST,
>> +                               IRQ_NOAUTOEN);
>
> Shouldn't this be
>                 irq_modify_status(gpmc_client_irq[i].irq, IRQ_NOREQUEST,
>                                   IRQ_NOAUTOEN | IRQ_NOPROBE);
> ?

Only if this needs to work on !ARM. The default for ARM is IRQ_NOPROBE set.

Rob

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

* [PATCH 08/15] memory: kill off set_irq_flags usage
@ 2015-06-11 13:17       ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-11 13:17 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jun 11, 2015 at 7:18 AM, Roger Quadros <rogerq@ti.com> wrote:
> Rob,
>
> On Tue, 9 Jun 2015 13:26:34 -0500
> Rob Herring <robh@kernel.org> wrote:
>
>> set_irq_flags is ARM specific with custom flags which have genirq
>> equivalents. Convert drivers to use the genirq interfaces directly, so we
>> can kill off set_irq_flags. The translation of flags is as follows:
>>
>> IRQF_VALID -> !IRQ_NOREQUEST
>> IRQF_PROBE -> !IRQ_NOPROBE
>> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>>
>> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
>> and setting IRQ_NOREQUEST already, so there is no need to do this in
>> .map() functions and we can simply remove the set_irq_flags calls. Some
>> users also set IRQ_NOPROBE and this has been maintained although it is not
>> clear that is really needed. There appears to be a great deal of blind
>> copy and paste of this code.
>>
>> Signed-off-by: Rob Herring <robh@kernel.org>
>> Cc: Roger Quadros <rogerq@ti.com>
>> Cc: Tony Lindgren <tony@atomide.com>
>> Cc: linux-omap at vger.kernel.org
>> ---
>>  drivers/memory/omap-gpmc.c | 5 ++---
>>  1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
>> index c94ea0d..0c833e2 100644
>> --- a/drivers/memory/omap-gpmc.c
>> +++ b/drivers/memory/omap-gpmc.c
>> @@ -1176,8 +1176,8 @@ static int gpmc_setup_irq(void)
>>               gpmc_client_irq[i].irq = gpmc_irq_start + i;
>>               irq_set_chip_and_handler(gpmc_client_irq[i].irq,
>>                                       &gpmc_irq_chip, handle_simple_irq);
>> -             set_irq_flags(gpmc_client_irq[i].irq,
>> -                             IRQF_VALID | IRQF_NOAUTOEN);
>> +             irq_modify_status(gpmc_client_irq[i].irq, IRQ_NOREQUEST,
>> +                               IRQ_NOAUTOEN);
>
> Shouldn't this be
>                 irq_modify_status(gpmc_client_irq[i].irq, IRQ_NOREQUEST,
>                                   IRQ_NOAUTOEN | IRQ_NOPROBE);
> ?

Only if this needs to work on !ARM. The default for ARM is IRQ_NOPROBE set.

Rob

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

* Re: [PATCH 08/15] memory: kill off set_irq_flags usage
  2015-06-11 13:17       ` Rob Herring
  (?)
@ 2015-06-11 14:00         ` Roger Quadros
  -1 siblings, 0 replies; 112+ messages in thread
From: Roger Quadros @ 2015-06-11 14:00 UTC (permalink / raw)
  To: Rob Herring
  Cc: Russell King, linux-arm-kernel, linux-kernel, arm, Tony Lindgren,
	linux-omap

On Thu, 11 Jun 2015 08:17:45 -0500
Rob Herring <robh@kernel.org> wrote:

> On Thu, Jun 11, 2015 at 7:18 AM, Roger Quadros <rogerq@ti.com> wrote:
> > Rob,
> >
> > On Tue, 9 Jun 2015 13:26:34 -0500
> > Rob Herring <robh@kernel.org> wrote:
> >
> >> set_irq_flags is ARM specific with custom flags which have genirq
> >> equivalents. Convert drivers to use the genirq interfaces directly, so we
> >> can kill off set_irq_flags. The translation of flags is as follows:
> >>
> >> IRQF_VALID -> !IRQ_NOREQUEST
> >> IRQF_PROBE -> !IRQ_NOPROBE
> >> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> >>
> >> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> >> and setting IRQ_NOREQUEST already, so there is no need to do this in
> >> .map() functions and we can simply remove the set_irq_flags calls. Some
> >> users also set IRQ_NOPROBE and this has been maintained although it is not
> >> clear that is really needed. There appears to be a great deal of blind
> >> copy and paste of this code.
> >>
> >> Signed-off-by: Rob Herring <robh@kernel.org>
> >> Cc: Roger Quadros <rogerq@ti.com>
> >> Cc: Tony Lindgren <tony@atomide.com>
> >> Cc: linux-omap@vger.kernel.org
> >> ---
> >>  drivers/memory/omap-gpmc.c | 5 ++---
> >>  1 file changed, 2 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
> >> index c94ea0d..0c833e2 100644
> >> --- a/drivers/memory/omap-gpmc.c
> >> +++ b/drivers/memory/omap-gpmc.c
> >> @@ -1176,8 +1176,8 @@ static int gpmc_setup_irq(void)
> >>               gpmc_client_irq[i].irq = gpmc_irq_start + i;
> >>               irq_set_chip_and_handler(gpmc_client_irq[i].irq,
> >>                                       &gpmc_irq_chip, handle_simple_irq);
> >> -             set_irq_flags(gpmc_client_irq[i].irq,
> >> -                             IRQF_VALID | IRQF_NOAUTOEN);
> >> +             irq_modify_status(gpmc_client_irq[i].irq, IRQ_NOREQUEST,
> >> +                               IRQ_NOAUTOEN);
> >
> > Shouldn't this be
> >                 irq_modify_status(gpmc_client_irq[i].irq, IRQ_NOREQUEST,
> >                                   IRQ_NOAUTOEN | IRQ_NOPROBE);
> > ?
> 
> Only if this needs to work on !ARM. The default for ARM is IRQ_NOPROBE set.

OK. In that case.

Acked-by: Roger Quadros <rogerq@ti.com>

cheers,
-roger

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

* Re: [PATCH 08/15] memory: kill off set_irq_flags usage
@ 2015-06-11 14:00         ` Roger Quadros
  0 siblings, 0 replies; 112+ messages in thread
From: Roger Quadros @ 2015-06-11 14:00 UTC (permalink / raw)
  To: Rob Herring
  Cc: Russell King, linux-arm-kernel, linux-kernel, arm, Tony Lindgren,
	linux-omap

On Thu, 11 Jun 2015 08:17:45 -0500
Rob Herring <robh@kernel.org> wrote:

> On Thu, Jun 11, 2015 at 7:18 AM, Roger Quadros <rogerq@ti.com> wrote:
> > Rob,
> >
> > On Tue, 9 Jun 2015 13:26:34 -0500
> > Rob Herring <robh@kernel.org> wrote:
> >
> >> set_irq_flags is ARM specific with custom flags which have genirq
> >> equivalents. Convert drivers to use the genirq interfaces directly, so we
> >> can kill off set_irq_flags. The translation of flags is as follows:
> >>
> >> IRQF_VALID -> !IRQ_NOREQUEST
> >> IRQF_PROBE -> !IRQ_NOPROBE
> >> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> >>
> >> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> >> and setting IRQ_NOREQUEST already, so there is no need to do this in
> >> .map() functions and we can simply remove the set_irq_flags calls. Some
> >> users also set IRQ_NOPROBE and this has been maintained although it is not
> >> clear that is really needed. There appears to be a great deal of blind
> >> copy and paste of this code.
> >>
> >> Signed-off-by: Rob Herring <robh@kernel.org>
> >> Cc: Roger Quadros <rogerq@ti.com>
> >> Cc: Tony Lindgren <tony@atomide.com>
> >> Cc: linux-omap@vger.kernel.org
> >> ---
> >>  drivers/memory/omap-gpmc.c | 5 ++---
> >>  1 file changed, 2 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
> >> index c94ea0d..0c833e2 100644
> >> --- a/drivers/memory/omap-gpmc.c
> >> +++ b/drivers/memory/omap-gpmc.c
> >> @@ -1176,8 +1176,8 @@ static int gpmc_setup_irq(void)
> >>               gpmc_client_irq[i].irq = gpmc_irq_start + i;
> >>               irq_set_chip_and_handler(gpmc_client_irq[i].irq,
> >>                                       &gpmc_irq_chip, handle_simple_irq);
> >> -             set_irq_flags(gpmc_client_irq[i].irq,
> >> -                             IRQF_VALID | IRQF_NOAUTOEN);
> >> +             irq_modify_status(gpmc_client_irq[i].irq, IRQ_NOREQUEST,
> >> +                               IRQ_NOAUTOEN);
> >
> > Shouldn't this be
> >                 irq_modify_status(gpmc_client_irq[i].irq, IRQ_NOREQUEST,
> >                                   IRQ_NOAUTOEN | IRQ_NOPROBE);
> > ?
> 
> Only if this needs to work on !ARM. The default for ARM is IRQ_NOPROBE set.

OK. In that case.

Acked-by: Roger Quadros <rogerq@ti.com>

cheers,
-roger

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

* [PATCH 08/15] memory: kill off set_irq_flags usage
@ 2015-06-11 14:00         ` Roger Quadros
  0 siblings, 0 replies; 112+ messages in thread
From: Roger Quadros @ 2015-06-11 14:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, 11 Jun 2015 08:17:45 -0500
Rob Herring <robh@kernel.org> wrote:

> On Thu, Jun 11, 2015 at 7:18 AM, Roger Quadros <rogerq@ti.com> wrote:
> > Rob,
> >
> > On Tue, 9 Jun 2015 13:26:34 -0500
> > Rob Herring <robh@kernel.org> wrote:
> >
> >> set_irq_flags is ARM specific with custom flags which have genirq
> >> equivalents. Convert drivers to use the genirq interfaces directly, so we
> >> can kill off set_irq_flags. The translation of flags is as follows:
> >>
> >> IRQF_VALID -> !IRQ_NOREQUEST
> >> IRQF_PROBE -> !IRQ_NOPROBE
> >> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> >>
> >> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> >> and setting IRQ_NOREQUEST already, so there is no need to do this in
> >> .map() functions and we can simply remove the set_irq_flags calls. Some
> >> users also set IRQ_NOPROBE and this has been maintained although it is not
> >> clear that is really needed. There appears to be a great deal of blind
> >> copy and paste of this code.
> >>
> >> Signed-off-by: Rob Herring <robh@kernel.org>
> >> Cc: Roger Quadros <rogerq@ti.com>
> >> Cc: Tony Lindgren <tony@atomide.com>
> >> Cc: linux-omap at vger.kernel.org
> >> ---
> >>  drivers/memory/omap-gpmc.c | 5 ++---
> >>  1 file changed, 2 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
> >> index c94ea0d..0c833e2 100644
> >> --- a/drivers/memory/omap-gpmc.c
> >> +++ b/drivers/memory/omap-gpmc.c
> >> @@ -1176,8 +1176,8 @@ static int gpmc_setup_irq(void)
> >>               gpmc_client_irq[i].irq = gpmc_irq_start + i;
> >>               irq_set_chip_and_handler(gpmc_client_irq[i].irq,
> >>                                       &gpmc_irq_chip, handle_simple_irq);
> >> -             set_irq_flags(gpmc_client_irq[i].irq,
> >> -                             IRQF_VALID | IRQF_NOAUTOEN);
> >> +             irq_modify_status(gpmc_client_irq[i].irq, IRQ_NOREQUEST,
> >> +                               IRQ_NOAUTOEN);
> >
> > Shouldn't this be
> >                 irq_modify_status(gpmc_client_irq[i].irq, IRQ_NOREQUEST,
> >                                   IRQ_NOAUTOEN | IRQ_NOPROBE);
> > ?
> 
> Only if this needs to work on !ARM. The default for ARM is IRQ_NOPROBE set.

OK. In that case.

Acked-by: Roger Quadros <rogerq@ti.com>

cheers,
-roger

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

* Re: [PATCH 01/15] ARM: kill off set_irq_flags usage
  2015-06-09 18:26   ` Rob Herring
@ 2015-06-12  9:30     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 112+ messages in thread
From: Krzysztof Kozlowski @ 2015-06-12  9:30 UTC (permalink / raw)
  To: Rob Herring, Russell King, linux-arm-kernel
  Cc: linux-kernel, arm, Sekhar Nori, Kevin Hilman, Jason Cooper,
	Andrew Lunn, Sebastian Hesselbarth, Gregory Clement,
	Hans Ulli Kroll, Shawn Guo, Sascha Hauer, Imre Kaloz,
	Krzysztof Halasa, Greg Ungerer, Roland Stigge, Tony Lindgren,
	Daniel Mack, Haojian Zhuang, Robert Jarzmik, Simtec Linux Team,
	Kukjin Kim, Wan ZongShun, linux-omap, linux-samsung-soc

On 10.06.2015 03:26, Rob Herring wrote:
> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
> 
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> 
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: Sekhar Nori <nsekhar@ti.com>
> Cc: Kevin Hilman <khilman@deeprootsystems.com>
> Cc: Jason Cooper <jason@lakedaemon.net>
> Cc: Andrew Lunn <andrew@lunn.ch>
> Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
> Cc: Gregory Clement <gregory.clement@free-electrons.com>
> Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
> Cc: Shawn Guo <shawn.guo@linaro.org>
> Cc: Sascha Hauer <kernel@pengutronix.de>
> Cc: Imre Kaloz <kaloz@openwrt.org>
> Cc: Krzysztof Halasa <khalasa@piap.pl>
> Cc: Greg Ungerer <gerg@uclinux.org>
> Cc: Roland Stigge <stigge@antcom.de>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Daniel Mack <daniel@zonque.org>
> Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
> Cc: Robert Jarzmik <robert.jarzmik@free.fr>
> Cc: Simtec Linux Team <linux@simtec.co.uk>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Cc: Wan ZongShun <mcuos.com@gmail.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-omap@vger.kernel.org
> Cc: linux-samsung-soc@vger.kernel.org
> ---
>  arch/arm/common/it8152.c             |  2 +-
>  arch/arm/common/locomo.c             |  2 +-
>  arch/arm/common/sa1111.c             |  4 ++--
>  arch/arm/mach-davinci/cp_intc.c      |  2 +-
>  arch/arm/mach-dove/irq.c             |  2 +-
>  arch/arm/mach-ebsa110/core.c         |  2 +-
>  arch/arm/mach-footbridge/common.c    |  2 +-
>  arch/arm/mach-footbridge/isa-irq.c   |  8 ++++----
>  arch/arm/mach-gemini/gpio.c          |  2 +-
>  arch/arm/mach-gemini/irq.c           |  2 +-
>  arch/arm/mach-imx/3ds_debugboard.c   |  2 +-
>  arch/arm/mach-imx/mach-mx31ads.c     |  2 +-
>  arch/arm/mach-iop13xx/irq.c          |  2 +-
>  arch/arm/mach-iop32x/irq.c           |  2 +-
>  arch/arm/mach-iop33x/irq.c           |  2 +-
>  arch/arm/mach-ixp4xx/common.c        |  2 +-
>  arch/arm/mach-ks8695/irq.c           |  2 +-
>  arch/arm/mach-lpc32xx/irq.c          |  2 +-
>  arch/arm/mach-netx/generic.c         |  2 +-
>  arch/arm/mach-omap1/fpga.c           |  2 +-
>  arch/arm/mach-omap1/irq.c            |  2 +-
>  arch/arm/mach-pxa/balloon3.c         |  2 +-
>  arch/arm/mach-pxa/irq.c              |  1 -
>  arch/arm/mach-pxa/lpd270.c           |  2 +-
>  arch/arm/mach-pxa/pcm990-baseboard.c |  2 +-
>  arch/arm/mach-pxa/pxa3xx.c           |  2 +-
>  arch/arm/mach-pxa/viper.c            |  2 +-
>  arch/arm/mach-pxa/zeus.c             |  2 +-
>  arch/arm/mach-rpc/ecard.c            |  2 +-
>  arch/arm/mach-rpc/irq.c              | 16 ++++++++--------
>  arch/arm/mach-s3c24xx/bast-irq.c     |  2 +-
>  arch/arm/mach-s3c64xx/common.c       |  2 +-
>  arch/arm/mach-sa1100/irq.c           |  1 -
>  arch/arm/mach-sa1100/neponset.c      |  4 ++--
>  arch/arm/mach-w90x900/irq.c          |  2 +-
>  35 files changed, 45 insertions(+), 47 deletions(-)

For the s3c24xx and s3c64xx it looks fine:
Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Best regards,
Krzysztof

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

* [PATCH 01/15] ARM: kill off set_irq_flags usage
@ 2015-06-12  9:30     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 112+ messages in thread
From: Krzysztof Kozlowski @ 2015-06-12  9:30 UTC (permalink / raw)
  To: linux-arm-kernel

On 10.06.2015 03:26, Rob Herring wrote:
> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
> 
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> 
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: Sekhar Nori <nsekhar@ti.com>
> Cc: Kevin Hilman <khilman@deeprootsystems.com>
> Cc: Jason Cooper <jason@lakedaemon.net>
> Cc: Andrew Lunn <andrew@lunn.ch>
> Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
> Cc: Gregory Clement <gregory.clement@free-electrons.com>
> Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
> Cc: Shawn Guo <shawn.guo@linaro.org>
> Cc: Sascha Hauer <kernel@pengutronix.de>
> Cc: Imre Kaloz <kaloz@openwrt.org>
> Cc: Krzysztof Halasa <khalasa@piap.pl>
> Cc: Greg Ungerer <gerg@uclinux.org>
> Cc: Roland Stigge <stigge@antcom.de>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Daniel Mack <daniel@zonque.org>
> Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
> Cc: Robert Jarzmik <robert.jarzmik@free.fr>
> Cc: Simtec Linux Team <linux@simtec.co.uk>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Cc: Wan ZongShun <mcuos.com@gmail.com>
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-omap at vger.kernel.org
> Cc: linux-samsung-soc at vger.kernel.org
> ---
>  arch/arm/common/it8152.c             |  2 +-
>  arch/arm/common/locomo.c             |  2 +-
>  arch/arm/common/sa1111.c             |  4 ++--
>  arch/arm/mach-davinci/cp_intc.c      |  2 +-
>  arch/arm/mach-dove/irq.c             |  2 +-
>  arch/arm/mach-ebsa110/core.c         |  2 +-
>  arch/arm/mach-footbridge/common.c    |  2 +-
>  arch/arm/mach-footbridge/isa-irq.c   |  8 ++++----
>  arch/arm/mach-gemini/gpio.c          |  2 +-
>  arch/arm/mach-gemini/irq.c           |  2 +-
>  arch/arm/mach-imx/3ds_debugboard.c   |  2 +-
>  arch/arm/mach-imx/mach-mx31ads.c     |  2 +-
>  arch/arm/mach-iop13xx/irq.c          |  2 +-
>  arch/arm/mach-iop32x/irq.c           |  2 +-
>  arch/arm/mach-iop33x/irq.c           |  2 +-
>  arch/arm/mach-ixp4xx/common.c        |  2 +-
>  arch/arm/mach-ks8695/irq.c           |  2 +-
>  arch/arm/mach-lpc32xx/irq.c          |  2 +-
>  arch/arm/mach-netx/generic.c         |  2 +-
>  arch/arm/mach-omap1/fpga.c           |  2 +-
>  arch/arm/mach-omap1/irq.c            |  2 +-
>  arch/arm/mach-pxa/balloon3.c         |  2 +-
>  arch/arm/mach-pxa/irq.c              |  1 -
>  arch/arm/mach-pxa/lpd270.c           |  2 +-
>  arch/arm/mach-pxa/pcm990-baseboard.c |  2 +-
>  arch/arm/mach-pxa/pxa3xx.c           |  2 +-
>  arch/arm/mach-pxa/viper.c            |  2 +-
>  arch/arm/mach-pxa/zeus.c             |  2 +-
>  arch/arm/mach-rpc/ecard.c            |  2 +-
>  arch/arm/mach-rpc/irq.c              | 16 ++++++++--------
>  arch/arm/mach-s3c24xx/bast-irq.c     |  2 +-
>  arch/arm/mach-s3c64xx/common.c       |  2 +-
>  arch/arm/mach-sa1100/irq.c           |  1 -
>  arch/arm/mach-sa1100/neponset.c      |  4 ++--
>  arch/arm/mach-w90x900/irq.c          |  2 +-
>  35 files changed, 45 insertions(+), 47 deletions(-)

For the s3c24xx and s3c64xx it looks fine:
Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Best regards,
Krzysztof

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

* Re: [PATCH 01/15] ARM: kill off set_irq_flags usage
  2015-06-09 18:26   ` Rob Herring
  (?)
@ 2015-06-12 14:05     ` Hans Ulli Kroll
  -1 siblings, 0 replies; 112+ messages in thread
From: Hans Ulli Kroll @ 2015-06-12 14:05 UTC (permalink / raw)
  To: Rob Herring
  Cc: Russell King, linux-arm-kernel, linux-kernel, arm, Sekhar Nori,
	Kevin Hilman, Jason Cooper, Andrew Lunn, Sebastian Hesselbarth,
	Gregory Clement, Hans Ulli Kroll, Shawn Guo, Sascha Hauer,
	Imre Kaloz, Krzysztof Halasa, Greg Ungerer, Roland Stigge,
	Tony Lindgren, Daniel Mack, Haojian Zhuang, Robert Jarzmik,
	Simtec Linux Team, Kukjin Kim, Krzysztof Kozlowski, Wan ZongShun,
	linux-omap, linux-samsung-soc



On Tue, 9 Jun 2015, Rob Herring wrote:

> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
> 
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> 
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.
> 

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

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

* Re: [PATCH 01/15] ARM: kill off set_irq_flags usage
@ 2015-06-12 14:05     ` Hans Ulli Kroll
  0 siblings, 0 replies; 112+ messages in thread
From: Hans Ulli Kroll @ 2015-06-12 14:05 UTC (permalink / raw)
  To: Rob Herring
  Cc: Russell King, linux-arm-kernel, linux-kernel, arm, Sekhar Nori,
	Kevin Hilman, Jason Cooper, Andrew Lunn, Sebastian Hesselbarth,
	Gregory Clement, Hans Ulli Kroll, Shawn Guo, Sascha Hauer,
	Imre Kaloz, Krzysztof Halasa, Greg Ungerer, Roland Stigge,
	Tony Lindgren, Daniel Mack, Haojian Zhuang, Robert Jarzmik,
	Simtec Linux Team, Kukjin Kim, Krzysztof Kozlowski



On Tue, 9 Jun 2015, Rob Herring wrote:

> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
> 
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> 
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.
> 

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

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

* [PATCH 01/15] ARM: kill off set_irq_flags usage
@ 2015-06-12 14:05     ` Hans Ulli Kroll
  0 siblings, 0 replies; 112+ messages in thread
From: Hans Ulli Kroll @ 2015-06-12 14:05 UTC (permalink / raw)
  To: linux-arm-kernel



On Tue, 9 Jun 2015, Rob Herring wrote:

> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
> 
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> 
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.
> 

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

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

* Re: [PATCH 01/15] ARM: kill off set_irq_flags usage
  2015-06-12 14:05     ` Hans Ulli Kroll
  (?)
@ 2015-06-12 14:35       ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-12 14:35 UTC (permalink / raw)
  To: Hans Ulli Kroll
  Cc: Russell King, linux-arm-kernel, linux-kernel, arm, Sekhar Nori,
	Kevin Hilman, Jason Cooper, Andrew Lunn, Sebastian Hesselbarth,
	Gregory Clement, Shawn Guo, Sascha Hauer, Imre Kaloz,
	Krzysztof Halasa, Greg Ungerer, Roland Stigge, Tony Lindgren,
	Daniel Mack, Haojian Zhuang, Robert Jarzmik, Simtec Linux Team,
	Kukjin Kim, Krzysztof Kozlowski, Wan ZongShun, linux-omap,
	linux-samsung-soc

On Fri, Jun 12, 2015 at 9:05 AM, Hans Ulli Kroll
<ulli.kroll@googlemail.com> wrote:
>
>
> On Tue, 9 Jun 2015, Rob Herring wrote:
>
>> set_irq_flags is ARM specific with custom flags which have genirq
>> equivalents. Convert drivers to use the genirq interfaces directly, so we
>> can kill off set_irq_flags. The translation of flags is as follows:
>>
>> IRQF_VALID -> !IRQ_NOREQUEST
>> IRQF_PROBE -> !IRQ_NOPROBE
>> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>>
>> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
>> and setting IRQ_NOREQUEST already, so there is no need to do this in
>> .map() functions and we can simply remove the set_irq_flags calls. Some
>> users also set IRQ_NOPROBE and this has been maintained although it is not
>> clear that is really needed. There appears to be a great deal of blind
>> copy and paste of this code.
>>
>
> for mach-gemini
> Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>

You mean acked-by, right?

Rob

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

* Re: [PATCH 01/15] ARM: kill off set_irq_flags usage
@ 2015-06-12 14:35       ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-12 14:35 UTC (permalink / raw)
  To: Hans Ulli Kroll
  Cc: Russell King, linux-arm-kernel, linux-kernel, arm, Sekhar Nori,
	Kevin Hilman, Jason Cooper, Andrew Lunn, Sebastian Hesselbarth,
	Gregory Clement, Shawn Guo, Sascha Hauer, Imre Kaloz,
	Krzysztof Halasa, Greg Ungerer, Roland Stigge, Tony Lindgren,
	Daniel Mack, Haojian Zhuang, Robert Jarzmik, Simtec Linux Team,
	Kukjin

On Fri, Jun 12, 2015 at 9:05 AM, Hans Ulli Kroll
<ulli.kroll@googlemail.com> wrote:
>
>
> On Tue, 9 Jun 2015, Rob Herring wrote:
>
>> set_irq_flags is ARM specific with custom flags which have genirq
>> equivalents. Convert drivers to use the genirq interfaces directly, so we
>> can kill off set_irq_flags. The translation of flags is as follows:
>>
>> IRQF_VALID -> !IRQ_NOREQUEST
>> IRQF_PROBE -> !IRQ_NOPROBE
>> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>>
>> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
>> and setting IRQ_NOREQUEST already, so there is no need to do this in
>> .map() functions and we can simply remove the set_irq_flags calls. Some
>> users also set IRQ_NOPROBE and this has been maintained although it is not
>> clear that is really needed. There appears to be a great deal of blind
>> copy and paste of this code.
>>
>
> for mach-gemini
> Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>

You mean acked-by, right?

Rob

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

* [PATCH 01/15] ARM: kill off set_irq_flags usage
@ 2015-06-12 14:35       ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-12 14:35 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jun 12, 2015 at 9:05 AM, Hans Ulli Kroll
<ulli.kroll@googlemail.com> wrote:
>
>
> On Tue, 9 Jun 2015, Rob Herring wrote:
>
>> set_irq_flags is ARM specific with custom flags which have genirq
>> equivalents. Convert drivers to use the genirq interfaces directly, so we
>> can kill off set_irq_flags. The translation of flags is as follows:
>>
>> IRQF_VALID -> !IRQ_NOREQUEST
>> IRQF_PROBE -> !IRQ_NOPROBE
>> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>>
>> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
>> and setting IRQ_NOREQUEST already, so there is no need to do this in
>> .map() functions and we can simply remove the set_irq_flags calls. Some
>> users also set IRQ_NOPROBE and this has been maintained although it is not
>> clear that is really needed. There appears to be a great deal of blind
>> copy and paste of this code.
>>
>
> for mach-gemini
> Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>

You mean acked-by, right?

Rob

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

* Re: [PATCH 01/15] ARM: kill off set_irq_flags usage
  2015-06-12 14:35       ` Rob Herring
  (?)
@ 2015-06-12 16:23         ` Hans Ulli Kroll
  -1 siblings, 0 replies; 112+ messages in thread
From: Hans Ulli Kroll @ 2015-06-12 16:23 UTC (permalink / raw)
  To: Rob Herring
  Cc: Hans Ulli Kroll, Russell King, linux-arm-kernel, linux-kernel,
	arm, Sekhar Nori, Kevin Hilman, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Gregory Clement, Shawn Guo, Sascha Hauer,
	Imre Kaloz, Krzysztof Halasa, Greg Ungerer, Roland Stigge,
	Tony Lindgren, Daniel Mack, Haojian Zhuang, Robert Jarzmik,
	Simtec Linux Team, Kukjin Kim, Krzysztof Kozlowski, Wan ZongShun,
	linux-omap, linux-samsung-soc



On Fri, 12 Jun 2015, Rob Herring wrote:

> On Fri, Jun 12, 2015 at 9:05 AM, Hans Ulli Kroll
> <ulli.kroll@googlemail.com> wrote:
> >
> >
> > On Tue, 9 Jun 2015, Rob Herring wrote:
> >
> >> set_irq_flags is ARM specific with custom flags which have genirq
> >> equivalents. Convert drivers to use the genirq interfaces directly, so we
> >> can kill off set_irq_flags. The translation of flags is as follows:
> >>
> >> IRQF_VALID -> !IRQ_NOREQUEST
> >> IRQF_PROBE -> !IRQ_NOPROBE
> >> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> >>
> >> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> >> and setting IRQ_NOREQUEST already, so there is no need to do this in
> >> .map() functions and we can simply remove the set_irq_flags calls. Some
> >> users also set IRQ_NOPROBE and this has been maintained although it is not
> >> clear that is really needed. There appears to be a great deal of blind
> >> copy and paste of this code.
> >>
> >
> > for mach-gemini
> > Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
> 
> You mean acked-by, right?
> 
> Rob
> 

Yeah

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

Ulli

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

* Re: [PATCH 01/15] ARM: kill off set_irq_flags usage
@ 2015-06-12 16:23         ` Hans Ulli Kroll
  0 siblings, 0 replies; 112+ messages in thread
From: Hans Ulli Kroll @ 2015-06-12 16:23 UTC (permalink / raw)
  To: Rob Herring
  Cc: Hans Ulli Kroll, Russell King, linux-arm-kernel, linux-kernel,
	arm, Sekhar Nori, Kevin Hilman, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Gregory Clement, Shawn Guo, Sascha Hauer,
	Imre Kaloz, Krzysztof Halasa, Greg Ungerer, Roland Stigge,
	Tony Lindgren, Daniel Mack, Haojian Zhuang, Robert Jarzmik, Sim



On Fri, 12 Jun 2015, Rob Herring wrote:

> On Fri, Jun 12, 2015 at 9:05 AM, Hans Ulli Kroll
> <ulli.kroll@googlemail.com> wrote:
> >
> >
> > On Tue, 9 Jun 2015, Rob Herring wrote:
> >
> >> set_irq_flags is ARM specific with custom flags which have genirq
> >> equivalents. Convert drivers to use the genirq interfaces directly, so we
> >> can kill off set_irq_flags. The translation of flags is as follows:
> >>
> >> IRQF_VALID -> !IRQ_NOREQUEST
> >> IRQF_PROBE -> !IRQ_NOPROBE
> >> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> >>
> >> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> >> and setting IRQ_NOREQUEST already, so there is no need to do this in
> >> .map() functions and we can simply remove the set_irq_flags calls. Some
> >> users also set IRQ_NOPROBE and this has been maintained although it is not
> >> clear that is really needed. There appears to be a great deal of blind
> >> copy and paste of this code.
> >>
> >
> > for mach-gemini
> > Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
> 
> You mean acked-by, right?
> 
> Rob
> 

Yeah

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

Ulli

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

* [PATCH 01/15] ARM: kill off set_irq_flags usage
@ 2015-06-12 16:23         ` Hans Ulli Kroll
  0 siblings, 0 replies; 112+ messages in thread
From: Hans Ulli Kroll @ 2015-06-12 16:23 UTC (permalink / raw)
  To: linux-arm-kernel



On Fri, 12 Jun 2015, Rob Herring wrote:

> On Fri, Jun 12, 2015 at 9:05 AM, Hans Ulli Kroll
> <ulli.kroll@googlemail.com> wrote:
> >
> >
> > On Tue, 9 Jun 2015, Rob Herring wrote:
> >
> >> set_irq_flags is ARM specific with custom flags which have genirq
> >> equivalents. Convert drivers to use the genirq interfaces directly, so we
> >> can kill off set_irq_flags. The translation of flags is as follows:
> >>
> >> IRQF_VALID -> !IRQ_NOREQUEST
> >> IRQF_PROBE -> !IRQ_NOPROBE
> >> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> >>
> >> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> >> and setting IRQ_NOREQUEST already, so there is no need to do this in
> >> .map() functions and we can simply remove the set_irq_flags calls. Some
> >> users also set IRQ_NOPROBE and this has been maintained although it is not
> >> clear that is really needed. There appears to be a great deal of blind
> >> copy and paste of this code.
> >>
> >
> > for mach-gemini
> > Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
> 
> You mean acked-by, right?
> 
> Rob
> 

Yeah

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

Ulli

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

* Re: [PATCH 01/15] ARM: kill off set_irq_flags usage
  2015-06-09 18:26   ` Rob Herring
  (?)
@ 2015-06-13 11:32     ` Wan ZongShun
  -1 siblings, 0 replies; 112+ messages in thread
From: Wan ZongShun @ 2015-06-13 11:32 UTC (permalink / raw)
  To: Rob Herring
  Cc: Russell King, linux-arm-kernel, linux-kernel, arm, Sekhar Nori,
	Kevin Hilman, Jason Cooper, Andrew Lunn, Sebastian Hesselbarth,
	Gregory Clement, Hans Ulli Kroll, Shawn Guo, Sascha Hauer,
	Imre Kaloz, Krzysztof Halasa, Greg Ungerer, Roland Stigge,
	Tony Lindgren, Daniel Mack, Haojian Zhuang, Robert Jarzmik,
	Simtec Linux Team, Kukjin Kim, Krzysztof Kozlowski, linux-omap,
	linux-samsung-soc

2015-06-10 2:26 GMT+08:00 Rob Herring <robh@kernel.org>:
> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
>
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> Cc: Robert Jarzmik <robert.jarzmik@free.fr>
> Cc: Simtec Linux Team <linux@simtec.co.uk>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Cc: Wan ZongShun <mcuos.com@gmail.com>

For Nuvoton W90x900
Acked-by: Wan ZongShun <mcuos.com@gmail.com>

> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-omap@vger.kernel.org
> +++ b/arch/arm/mach-w90x900/irq.c
> @@ -211,6 +211,6 @@ void __init nuc900_init_irq(void)
>         for (irqno = IRQ_WDT; irqno <= IRQ_ADC; irqno++) {
>                 irq_set_chip_and_handler(irqno, &nuc900_irq_chip,
>                                          handle_level_irq);
> -               set_irq_flags(irqno, IRQF_VALID);
> +               irq_clear_status_flags(irqno, IRQ_NOREQUEST);
>         }
>  }
> --
> 2.1.0
>



-- 
---
Vincent Wan(Zongshun)
www.mcuos.com

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

* Re: [PATCH 01/15] ARM: kill off set_irq_flags usage
@ 2015-06-13 11:32     ` Wan ZongShun
  0 siblings, 0 replies; 112+ messages in thread
From: Wan ZongShun @ 2015-06-13 11:32 UTC (permalink / raw)
  To: Rob Herring
  Cc: Russell King, linux-arm-kernel, linux-kernel, arm, Sekhar Nori,
	Kevin Hilman, Jason Cooper, Andrew Lunn, Sebastian Hesselbarth,
	Gregory Clement, Hans Ulli Kroll, Shawn Guo, Sascha Hauer,
	Imre Kaloz, Krzysztof Halasa, Greg Ungerer, Roland Stigge,
	Tony Lindgren, Daniel Mack, Haojian Zhuang, Robert Jarzmik,
	Simtec Linux Team, Kukjin Kim

2015-06-10 2:26 GMT+08:00 Rob Herring <robh@kernel.org>:
> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
>
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> Cc: Robert Jarzmik <robert.jarzmik@free.fr>
> Cc: Simtec Linux Team <linux@simtec.co.uk>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Cc: Wan ZongShun <mcuos.com@gmail.com>

For Nuvoton W90x900
Acked-by: Wan ZongShun <mcuos.com@gmail.com>

> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-omap@vger.kernel.org
> +++ b/arch/arm/mach-w90x900/irq.c
> @@ -211,6 +211,6 @@ void __init nuc900_init_irq(void)
>         for (irqno = IRQ_WDT; irqno <= IRQ_ADC; irqno++) {
>                 irq_set_chip_and_handler(irqno, &nuc900_irq_chip,
>                                          handle_level_irq);
> -               set_irq_flags(irqno, IRQF_VALID);
> +               irq_clear_status_flags(irqno, IRQ_NOREQUEST);
>         }
>  }
> --
> 2.1.0
>



-- 
---
Vincent Wan(Zongshun)
www.mcuos.com

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

* [PATCH 01/15] ARM: kill off set_irq_flags usage
@ 2015-06-13 11:32     ` Wan ZongShun
  0 siblings, 0 replies; 112+ messages in thread
From: Wan ZongShun @ 2015-06-13 11:32 UTC (permalink / raw)
  To: linux-arm-kernel

2015-06-10 2:26 GMT+08:00 Rob Herring <robh@kernel.org>:
> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
>
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> Cc: Robert Jarzmik <robert.jarzmik@free.fr>
> Cc: Simtec Linux Team <linux@simtec.co.uk>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Cc: Wan ZongShun <mcuos.com@gmail.com>

For Nuvoton W90x900
Acked-by: Wan ZongShun <mcuos.com@gmail.com>

> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-omap at vger.kernel.org
> +++ b/arch/arm/mach-w90x900/irq.c
> @@ -211,6 +211,6 @@ void __init nuc900_init_irq(void)
>         for (irqno = IRQ_WDT; irqno <= IRQ_ADC; irqno++) {
>                 irq_set_chip_and_handler(irqno, &nuc900_irq_chip,
>                                          handle_level_irq);
> -               set_irq_flags(irqno, IRQF_VALID);
> +               irq_clear_status_flags(irqno, IRQ_NOREQUEST);
>         }
>  }
> --
> 2.1.0
>



-- 
---
Vincent Wan(Zongshun)
www.mcuos.com

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

* Re: [PATCH 10/15] PCI: kill off set_irq_flags usage
  2015-06-09 18:26   ` Rob Herring
  (?)
@ 2015-06-18 16:59     ` Bjorn Helgaas
  -1 siblings, 0 replies; 112+ messages in thread
From: Bjorn Helgaas @ 2015-06-18 16:59 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jun 09, 2015 at 01:26:36PM -0500, Rob Herring wrote:
> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
> 
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> 
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Kishon Vijay Abraham I <kishon@ti.com>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Murali Karicheri <m-karicheri2@ti.com>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Stephen Warren <swarren@wwwdotorg.org>
> Cc: Alexandre Courbot <gnurou@gmail.com>
> Cc: Jingoo Han <jingoohan1@gmail.com>
> Cc: Pratyush Anand <pratyush.anand@gmail.com>
> Cc: Simon Horman <horms@verge.net.au>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
> Cc: linux-omap@vger.kernel.org
> Cc: linux-pci@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-tegra@vger.kernel.org
> Cc: linux-sh@vger.kernel.org

This is the only part of the series on linux-pci, so I assume this will be
merged by somebody else along with the rest.

Acked-by: Bjorn Helgaas <bhelgaas@google.com>

> ---
>  drivers/pci/host/pci-dra7xx.c      | 1 -
>  drivers/pci/host/pci-keystone-dw.c | 2 --
>  drivers/pci/host/pci-tegra.c       | 1 -
>  drivers/pci/host/pcie-designware.c | 1 -
>  drivers/pci/host/pcie-rcar.c       | 1 -
>  drivers/pci/host/pcie-xilinx.c     | 2 --
>  6 files changed, 8 deletions(-)
> 
> diff --git a/drivers/pci/host/pci-dra7xx.c b/drivers/pci/host/pci-dra7xx.c
> index 2d57e19..94cbc4d 100644
> --- a/drivers/pci/host/pci-dra7xx.c
> +++ b/drivers/pci/host/pci-dra7xx.c
> @@ -160,7 +160,6 @@ static int dra7xx_pcie_intx_map(struct irq_domain *domain, unsigned int irq,
>  {
>  	irq_set_chip_and_handler(irq, &dummy_irq_chip, handle_simple_irq);
>  	irq_set_chip_data(irq, domain->host_data);
> -	set_irq_flags(irq, IRQF_VALID);
>  
>  	return 0;
>  }
> diff --git a/drivers/pci/host/pci-keystone-dw.c b/drivers/pci/host/pci-keystone-dw.c
> index f34892e..f1d0749 100644
> --- a/drivers/pci/host/pci-keystone-dw.c
> +++ b/drivers/pci/host/pci-keystone-dw.c
> @@ -196,7 +196,6 @@ static int ks_dw_pcie_msi_map(struct irq_domain *domain, unsigned int irq,
>  	irq_set_chip_and_handler(irq, &ks_dw_pcie_msi_irq_chip,
>  				 handle_level_irq);
>  	irq_set_chip_data(irq, domain->host_data);
> -	set_irq_flags(irq, IRQF_VALID);
>  
>  	return 0;
>  }
> @@ -277,7 +276,6 @@ static int ks_dw_pcie_init_legacy_irq_map(struct irq_domain *d,
>  	irq_set_chip_and_handler(irq, &ks_dw_pcie_legacy_irq_chip,
>  				 handle_level_irq);
>  	irq_set_chip_data(irq, d->host_data);
> -	set_irq_flags(irq, IRQF_VALID);
>  
>  	return 0;
>  }
> diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
> index 00e9272..36bd700 100644
> --- a/drivers/pci/host/pci-tegra.c
> +++ b/drivers/pci/host/pci-tegra.c
> @@ -1263,7 +1263,6 @@ static int tegra_msi_map(struct irq_domain *domain, unsigned int irq,
>  {
>  	irq_set_chip_and_handler(irq, &tegra_msi_irq_chip, handle_simple_irq);
>  	irq_set_chip_data(irq, domain->host_data);
> -	set_irq_flags(irq, IRQF_VALID);
>  
>  	tegra_cpuidle_pcie_irqs_in_use();
>  
> diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
> index 2e9f84f..5caa94d 100644
> --- a/drivers/pci/host/pcie-designware.c
> +++ b/drivers/pci/host/pcie-designware.c
> @@ -333,7 +333,6 @@ static int dw_pcie_msi_map(struct irq_domain *domain, unsigned int irq,
>  {
>  	irq_set_chip_and_handler(irq, &dw_msi_irq_chip, handle_simple_irq);
>  	irq_set_chip_data(irq, domain->host_data);
> -	set_irq_flags(irq, IRQF_VALID);
>  
>  	return 0;
>  }
> diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
> index c086210..7678fe0 100644
> --- a/drivers/pci/host/pcie-rcar.c
> +++ b/drivers/pci/host/pcie-rcar.c
> @@ -664,7 +664,6 @@ static int rcar_msi_map(struct irq_domain *domain, unsigned int irq,
>  {
>  	irq_set_chip_and_handler(irq, &rcar_msi_irq_chip, handle_simple_irq);
>  	irq_set_chip_data(irq, domain->host_data);
> -	set_irq_flags(irq, IRQF_VALID);
>  
>  	return 0;
>  }
> diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c
> index f1a06a0..72015119 100644
> --- a/drivers/pci/host/pcie-xilinx.c
> +++ b/drivers/pci/host/pcie-xilinx.c
> @@ -338,7 +338,6 @@ static int xilinx_pcie_msi_map(struct irq_domain *domain, unsigned int irq,
>  {
>  	irq_set_chip_and_handler(irq, &xilinx_msi_irq_chip, handle_simple_irq);
>  	irq_set_chip_data(irq, domain->host_data);
> -	set_irq_flags(irq, IRQF_VALID);
>  
>  	return 0;
>  }
> @@ -377,7 +376,6 @@ static int xilinx_pcie_intx_map(struct irq_domain *domain, unsigned int irq,
>  {
>  	irq_set_chip_and_handler(irq, &dummy_irq_chip, handle_simple_irq);
>  	irq_set_chip_data(irq, domain->host_data);
> -	set_irq_flags(irq, IRQF_VALID);
>  
>  	return 0;
>  }
> -- 
> 2.1.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH 10/15] PCI: kill off set_irq_flags usage
@ 2015-06-18 16:59     ` Bjorn Helgaas
  0 siblings, 0 replies; 112+ messages in thread
From: Bjorn Helgaas @ 2015-06-18 16:59 UTC (permalink / raw)
  To: Rob Herring
  Cc: Russell King, linux-arm-kernel, linux-kernel, arm,
	Kishon Vijay Abraham I, Murali Karicheri, Thierry Reding,
	Stephen Warren, Alexandre Courbot, Jingoo Han, Pratyush Anand,
	Simon Horman, Michal Simek, Sören Brinkmann, linux-omap,
	linux-pci, linux-tegra, linux-sh

On Tue, Jun 09, 2015 at 01:26:36PM -0500, Rob Herring wrote:
> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
> 
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> 
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Kishon Vijay Abraham I <kishon@ti.com>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Murali Karicheri <m-karicheri2@ti.com>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Stephen Warren <swarren@wwwdotorg.org>
> Cc: Alexandre Courbot <gnurou@gmail.com>
> Cc: Jingoo Han <jingoohan1@gmail.com>
> Cc: Pratyush Anand <pratyush.anand@gmail.com>
> Cc: Simon Horman <horms@verge.net.au>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
> Cc: linux-omap@vger.kernel.org
> Cc: linux-pci@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-tegra@vger.kernel.org
> Cc: linux-sh@vger.kernel.org

This is the only part of the series on linux-pci, so I assume this will be
merged by somebody else along with the rest.

Acked-by: Bjorn Helgaas <bhelgaas@google.com>

> ---
>  drivers/pci/host/pci-dra7xx.c      | 1 -
>  drivers/pci/host/pci-keystone-dw.c | 2 --
>  drivers/pci/host/pci-tegra.c       | 1 -
>  drivers/pci/host/pcie-designware.c | 1 -
>  drivers/pci/host/pcie-rcar.c       | 1 -
>  drivers/pci/host/pcie-xilinx.c     | 2 --
>  6 files changed, 8 deletions(-)
> 
> diff --git a/drivers/pci/host/pci-dra7xx.c b/drivers/pci/host/pci-dra7xx.c
> index 2d57e19..94cbc4d 100644
> --- a/drivers/pci/host/pci-dra7xx.c
> +++ b/drivers/pci/host/pci-dra7xx.c
> @@ -160,7 +160,6 @@ static int dra7xx_pcie_intx_map(struct irq_domain *domain, unsigned int irq,
>  {
>  	irq_set_chip_and_handler(irq, &dummy_irq_chip, handle_simple_irq);
>  	irq_set_chip_data(irq, domain->host_data);
> -	set_irq_flags(irq, IRQF_VALID);
>  
>  	return 0;
>  }
> diff --git a/drivers/pci/host/pci-keystone-dw.c b/drivers/pci/host/pci-keystone-dw.c
> index f34892e..f1d0749 100644
> --- a/drivers/pci/host/pci-keystone-dw.c
> +++ b/drivers/pci/host/pci-keystone-dw.c
> @@ -196,7 +196,6 @@ static int ks_dw_pcie_msi_map(struct irq_domain *domain, unsigned int irq,
>  	irq_set_chip_and_handler(irq, &ks_dw_pcie_msi_irq_chip,
>  				 handle_level_irq);
>  	irq_set_chip_data(irq, domain->host_data);
> -	set_irq_flags(irq, IRQF_VALID);
>  
>  	return 0;
>  }
> @@ -277,7 +276,6 @@ static int ks_dw_pcie_init_legacy_irq_map(struct irq_domain *d,
>  	irq_set_chip_and_handler(irq, &ks_dw_pcie_legacy_irq_chip,
>  				 handle_level_irq);
>  	irq_set_chip_data(irq, d->host_data);
> -	set_irq_flags(irq, IRQF_VALID);
>  
>  	return 0;
>  }
> diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
> index 00e9272..36bd700 100644
> --- a/drivers/pci/host/pci-tegra.c
> +++ b/drivers/pci/host/pci-tegra.c
> @@ -1263,7 +1263,6 @@ static int tegra_msi_map(struct irq_domain *domain, unsigned int irq,
>  {
>  	irq_set_chip_and_handler(irq, &tegra_msi_irq_chip, handle_simple_irq);
>  	irq_set_chip_data(irq, domain->host_data);
> -	set_irq_flags(irq, IRQF_VALID);
>  
>  	tegra_cpuidle_pcie_irqs_in_use();
>  
> diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
> index 2e9f84f..5caa94d 100644
> --- a/drivers/pci/host/pcie-designware.c
> +++ b/drivers/pci/host/pcie-designware.c
> @@ -333,7 +333,6 @@ static int dw_pcie_msi_map(struct irq_domain *domain, unsigned int irq,
>  {
>  	irq_set_chip_and_handler(irq, &dw_msi_irq_chip, handle_simple_irq);
>  	irq_set_chip_data(irq, domain->host_data);
> -	set_irq_flags(irq, IRQF_VALID);
>  
>  	return 0;
>  }
> diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
> index c086210..7678fe0 100644
> --- a/drivers/pci/host/pcie-rcar.c
> +++ b/drivers/pci/host/pcie-rcar.c
> @@ -664,7 +664,6 @@ static int rcar_msi_map(struct irq_domain *domain, unsigned int irq,
>  {
>  	irq_set_chip_and_handler(irq, &rcar_msi_irq_chip, handle_simple_irq);
>  	irq_set_chip_data(irq, domain->host_data);
> -	set_irq_flags(irq, IRQF_VALID);
>  
>  	return 0;
>  }
> diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c
> index f1a06a0..72015119 100644
> --- a/drivers/pci/host/pcie-xilinx.c
> +++ b/drivers/pci/host/pcie-xilinx.c
> @@ -338,7 +338,6 @@ static int xilinx_pcie_msi_map(struct irq_domain *domain, unsigned int irq,
>  {
>  	irq_set_chip_and_handler(irq, &xilinx_msi_irq_chip, handle_simple_irq);
>  	irq_set_chip_data(irq, domain->host_data);
> -	set_irq_flags(irq, IRQF_VALID);
>  
>  	return 0;
>  }
> @@ -377,7 +376,6 @@ static int xilinx_pcie_intx_map(struct irq_domain *domain, unsigned int irq,
>  {
>  	irq_set_chip_and_handler(irq, &dummy_irq_chip, handle_simple_irq);
>  	irq_set_chip_data(irq, domain->host_data);
> -	set_irq_flags(irq, IRQF_VALID);
>  
>  	return 0;
>  }
> -- 
> 2.1.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

* [PATCH 10/15] PCI: kill off set_irq_flags usage
@ 2015-06-18 16:59     ` Bjorn Helgaas
  0 siblings, 0 replies; 112+ messages in thread
From: Bjorn Helgaas @ 2015-06-18 16:59 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jun 09, 2015 at 01:26:36PM -0500, Rob Herring wrote:
> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
> 
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> 
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Kishon Vijay Abraham I <kishon@ti.com>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Murali Karicheri <m-karicheri2@ti.com>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Stephen Warren <swarren@wwwdotorg.org>
> Cc: Alexandre Courbot <gnurou@gmail.com>
> Cc: Jingoo Han <jingoohan1@gmail.com>
> Cc: Pratyush Anand <pratyush.anand@gmail.com>
> Cc: Simon Horman <horms@verge.net.au>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: "S?ren Brinkmann" <soren.brinkmann@xilinx.com>
> Cc: linux-omap at vger.kernel.org
> Cc: linux-pci at vger.kernel.org
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-tegra at vger.kernel.org
> Cc: linux-sh at vger.kernel.org

This is the only part of the series on linux-pci, so I assume this will be
merged by somebody else along with the rest.

Acked-by: Bjorn Helgaas <bhelgaas@google.com>

> ---
>  drivers/pci/host/pci-dra7xx.c      | 1 -
>  drivers/pci/host/pci-keystone-dw.c | 2 --
>  drivers/pci/host/pci-tegra.c       | 1 -
>  drivers/pci/host/pcie-designware.c | 1 -
>  drivers/pci/host/pcie-rcar.c       | 1 -
>  drivers/pci/host/pcie-xilinx.c     | 2 --
>  6 files changed, 8 deletions(-)
> 
> diff --git a/drivers/pci/host/pci-dra7xx.c b/drivers/pci/host/pci-dra7xx.c
> index 2d57e19..94cbc4d 100644
> --- a/drivers/pci/host/pci-dra7xx.c
> +++ b/drivers/pci/host/pci-dra7xx.c
> @@ -160,7 +160,6 @@ static int dra7xx_pcie_intx_map(struct irq_domain *domain, unsigned int irq,
>  {
>  	irq_set_chip_and_handler(irq, &dummy_irq_chip, handle_simple_irq);
>  	irq_set_chip_data(irq, domain->host_data);
> -	set_irq_flags(irq, IRQF_VALID);
>  
>  	return 0;
>  }
> diff --git a/drivers/pci/host/pci-keystone-dw.c b/drivers/pci/host/pci-keystone-dw.c
> index f34892e..f1d0749 100644
> --- a/drivers/pci/host/pci-keystone-dw.c
> +++ b/drivers/pci/host/pci-keystone-dw.c
> @@ -196,7 +196,6 @@ static int ks_dw_pcie_msi_map(struct irq_domain *domain, unsigned int irq,
>  	irq_set_chip_and_handler(irq, &ks_dw_pcie_msi_irq_chip,
>  				 handle_level_irq);
>  	irq_set_chip_data(irq, domain->host_data);
> -	set_irq_flags(irq, IRQF_VALID);
>  
>  	return 0;
>  }
> @@ -277,7 +276,6 @@ static int ks_dw_pcie_init_legacy_irq_map(struct irq_domain *d,
>  	irq_set_chip_and_handler(irq, &ks_dw_pcie_legacy_irq_chip,
>  				 handle_level_irq);
>  	irq_set_chip_data(irq, d->host_data);
> -	set_irq_flags(irq, IRQF_VALID);
>  
>  	return 0;
>  }
> diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
> index 00e9272..36bd700 100644
> --- a/drivers/pci/host/pci-tegra.c
> +++ b/drivers/pci/host/pci-tegra.c
> @@ -1263,7 +1263,6 @@ static int tegra_msi_map(struct irq_domain *domain, unsigned int irq,
>  {
>  	irq_set_chip_and_handler(irq, &tegra_msi_irq_chip, handle_simple_irq);
>  	irq_set_chip_data(irq, domain->host_data);
> -	set_irq_flags(irq, IRQF_VALID);
>  
>  	tegra_cpuidle_pcie_irqs_in_use();
>  
> diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
> index 2e9f84f..5caa94d 100644
> --- a/drivers/pci/host/pcie-designware.c
> +++ b/drivers/pci/host/pcie-designware.c
> @@ -333,7 +333,6 @@ static int dw_pcie_msi_map(struct irq_domain *domain, unsigned int irq,
>  {
>  	irq_set_chip_and_handler(irq, &dw_msi_irq_chip, handle_simple_irq);
>  	irq_set_chip_data(irq, domain->host_data);
> -	set_irq_flags(irq, IRQF_VALID);
>  
>  	return 0;
>  }
> diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
> index c086210..7678fe0 100644
> --- a/drivers/pci/host/pcie-rcar.c
> +++ b/drivers/pci/host/pcie-rcar.c
> @@ -664,7 +664,6 @@ static int rcar_msi_map(struct irq_domain *domain, unsigned int irq,
>  {
>  	irq_set_chip_and_handler(irq, &rcar_msi_irq_chip, handle_simple_irq);
>  	irq_set_chip_data(irq, domain->host_data);
> -	set_irq_flags(irq, IRQF_VALID);
>  
>  	return 0;
>  }
> diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c
> index f1a06a0..72015119 100644
> --- a/drivers/pci/host/pcie-xilinx.c
> +++ b/drivers/pci/host/pcie-xilinx.c
> @@ -338,7 +338,6 @@ static int xilinx_pcie_msi_map(struct irq_domain *domain, unsigned int irq,
>  {
>  	irq_set_chip_and_handler(irq, &xilinx_msi_irq_chip, handle_simple_irq);
>  	irq_set_chip_data(irq, domain->host_data);
> -	set_irq_flags(irq, IRQF_VALID);
>  
>  	return 0;
>  }
> @@ -377,7 +376,6 @@ static int xilinx_pcie_intx_map(struct irq_domain *domain, unsigned int irq,
>  {
>  	irq_set_chip_and_handler(irq, &dummy_irq_chip, handle_simple_irq);
>  	irq_set_chip_data(irq, domain->host_data);
> -	set_irq_flags(irq, IRQF_VALID);
>  
>  	return 0;
>  }
> -- 
> 2.1.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH 10/15] PCI: kill off set_irq_flags usage
  2015-06-18 16:59     ` Bjorn Helgaas
  (?)
@ 2015-06-18 20:08       ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-18 20:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jun 18, 2015 at 11:59 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> On Tue, Jun 09, 2015 at 01:26:36PM -0500, Rob Herring wrote:
>> set_irq_flags is ARM specific with custom flags which have genirq
>> equivalents. Convert drivers to use the genirq interfaces directly, so we
>> can kill off set_irq_flags. The translation of flags is as follows:
>>
>> IRQF_VALID -> !IRQ_NOREQUEST
>> IRQF_PROBE -> !IRQ_NOPROBE
>> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>>
>> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
>> and setting IRQ_NOREQUEST already, so there is no need to do this in
>> .map() functions and we can simply remove the set_irq_flags calls. Some
>> users also set IRQ_NOPROBE and this has been maintained although it is not
>> clear that is really needed. There appears to be a great deal of blind
>> copy and paste of this code.
>>
>> Signed-off-by: Rob Herring <robh@kernel.org>
>> Cc: Kishon Vijay Abraham I <kishon@ti.com>
>> Cc: Bjorn Helgaas <bhelgaas@google.com>
>> Cc: Murali Karicheri <m-karicheri2@ti.com>
>> Cc: Thierry Reding <thierry.reding@gmail.com>
>> Cc: Stephen Warren <swarren@wwwdotorg.org>
>> Cc: Alexandre Courbot <gnurou@gmail.com>
>> Cc: Jingoo Han <jingoohan1@gmail.com>
>> Cc: Pratyush Anand <pratyush.anand@gmail.com>
>> Cc: Simon Horman <horms@verge.net.au>
>> Cc: Michal Simek <michal.simek@xilinx.com>
>> Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
>> Cc: linux-omap@vger.kernel.org
>> Cc: linux-pci@vger.kernel.org
>> Cc: linux-arm-kernel@lists.infradead.org
>> Cc: linux-tegra@vger.kernel.org
>> Cc: linux-sh@vger.kernel.org
>
> This is the only part of the series on linux-pci, so I assume this will be
> merged by somebody else along with the rest.

I copied you on the intro, but all the lists and all the maintainers
was too long to cc. Being late in the cycle I didn't really intend for
this to be for 4.2, but you can pick up this patch if you want to as
it doesn't have any dependencies. If you don't, then I will submit the
whole series for 4.3.

> Acked-by: Bjorn Helgaas <bhelgaas@google.com>

Thanks.

Rob

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

* Re: [PATCH 10/15] PCI: kill off set_irq_flags usage
@ 2015-06-18 20:08       ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-18 20:08 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Russell King, linux-arm-kernel, linux-kernel, arm,
	Kishon Vijay Abraham I, Murali Karicheri, Thierry Reding,
	Stephen Warren, Alexandre Courbot, Jingoo Han, Pratyush Anand,
	Simon Horman, Michal Simek, Sören Brinkmann, linux-omap,
	linux-pci, linux-tegra, SH-Linux

On Thu, Jun 18, 2015 at 11:59 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> On Tue, Jun 09, 2015 at 01:26:36PM -0500, Rob Herring wrote:
>> set_irq_flags is ARM specific with custom flags which have genirq
>> equivalents. Convert drivers to use the genirq interfaces directly, so we
>> can kill off set_irq_flags. The translation of flags is as follows:
>>
>> IRQF_VALID -> !IRQ_NOREQUEST
>> IRQF_PROBE -> !IRQ_NOPROBE
>> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>>
>> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
>> and setting IRQ_NOREQUEST already, so there is no need to do this in
>> .map() functions and we can simply remove the set_irq_flags calls. Some
>> users also set IRQ_NOPROBE and this has been maintained although it is not
>> clear that is really needed. There appears to be a great deal of blind
>> copy and paste of this code.
>>
>> Signed-off-by: Rob Herring <robh@kernel.org>
>> Cc: Kishon Vijay Abraham I <kishon@ti.com>
>> Cc: Bjorn Helgaas <bhelgaas@google.com>
>> Cc: Murali Karicheri <m-karicheri2@ti.com>
>> Cc: Thierry Reding <thierry.reding@gmail.com>
>> Cc: Stephen Warren <swarren@wwwdotorg.org>
>> Cc: Alexandre Courbot <gnurou@gmail.com>
>> Cc: Jingoo Han <jingoohan1@gmail.com>
>> Cc: Pratyush Anand <pratyush.anand@gmail.com>
>> Cc: Simon Horman <horms@verge.net.au>
>> Cc: Michal Simek <michal.simek@xilinx.com>
>> Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
>> Cc: linux-omap@vger.kernel.org
>> Cc: linux-pci@vger.kernel.org
>> Cc: linux-arm-kernel@lists.infradead.org
>> Cc: linux-tegra@vger.kernel.org
>> Cc: linux-sh@vger.kernel.org
>
> This is the only part of the series on linux-pci, so I assume this will be
> merged by somebody else along with the rest.

I copied you on the intro, but all the lists and all the maintainers
was too long to cc. Being late in the cycle I didn't really intend for
this to be for 4.2, but you can pick up this patch if you want to as
it doesn't have any dependencies. If you don't, then I will submit the
whole series for 4.3.

> Acked-by: Bjorn Helgaas <bhelgaas@google.com>

Thanks.

Rob

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

* [PATCH 10/15] PCI: kill off set_irq_flags usage
@ 2015-06-18 20:08       ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-06-18 20:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jun 18, 2015 at 11:59 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> On Tue, Jun 09, 2015 at 01:26:36PM -0500, Rob Herring wrote:
>> set_irq_flags is ARM specific with custom flags which have genirq
>> equivalents. Convert drivers to use the genirq interfaces directly, so we
>> can kill off set_irq_flags. The translation of flags is as follows:
>>
>> IRQF_VALID -> !IRQ_NOREQUEST
>> IRQF_PROBE -> !IRQ_NOPROBE
>> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>>
>> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
>> and setting IRQ_NOREQUEST already, so there is no need to do this in
>> .map() functions and we can simply remove the set_irq_flags calls. Some
>> users also set IRQ_NOPROBE and this has been maintained although it is not
>> clear that is really needed. There appears to be a great deal of blind
>> copy and paste of this code.
>>
>> Signed-off-by: Rob Herring <robh@kernel.org>
>> Cc: Kishon Vijay Abraham I <kishon@ti.com>
>> Cc: Bjorn Helgaas <bhelgaas@google.com>
>> Cc: Murali Karicheri <m-karicheri2@ti.com>
>> Cc: Thierry Reding <thierry.reding@gmail.com>
>> Cc: Stephen Warren <swarren@wwwdotorg.org>
>> Cc: Alexandre Courbot <gnurou@gmail.com>
>> Cc: Jingoo Han <jingoohan1@gmail.com>
>> Cc: Pratyush Anand <pratyush.anand@gmail.com>
>> Cc: Simon Horman <horms@verge.net.au>
>> Cc: Michal Simek <michal.simek@xilinx.com>
>> Cc: "S?ren Brinkmann" <soren.brinkmann@xilinx.com>
>> Cc: linux-omap at vger.kernel.org
>> Cc: linux-pci at vger.kernel.org
>> Cc: linux-arm-kernel at lists.infradead.org
>> Cc: linux-tegra at vger.kernel.org
>> Cc: linux-sh at vger.kernel.org
>
> This is the only part of the series on linux-pci, so I assume this will be
> merged by somebody else along with the rest.

I copied you on the intro, but all the lists and all the maintainers
was too long to cc. Being late in the cycle I didn't really intend for
this to be for 4.2, but you can pick up this patch if you want to as
it doesn't have any dependencies. If you don't, then I will submit the
whole series for 4.3.

> Acked-by: Bjorn Helgaas <bhelgaas@google.com>

Thanks.

Rob

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

* Re: [PATCH 10/15] PCI: kill off set_irq_flags usage
  2015-06-18 20:08       ` Rob Herring
  (?)
@ 2015-06-18 20:10         ` Bjorn Helgaas
  -1 siblings, 0 replies; 112+ messages in thread
From: Bjorn Helgaas @ 2015-06-18 20:10 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jun 18, 2015 at 3:08 PM, Rob Herring <robh@kernel.org> wrote:
> On Thu, Jun 18, 2015 at 11:59 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>> On Tue, Jun 09, 2015 at 01:26:36PM -0500, Rob Herring wrote:
>>> set_irq_flags is ARM specific with custom flags which have genirq
>>> equivalents. Convert drivers to use the genirq interfaces directly, so we
>>> can kill off set_irq_flags. The translation of flags is as follows:
>>>
>>> IRQF_VALID -> !IRQ_NOREQUEST
>>> IRQF_PROBE -> !IRQ_NOPROBE
>>> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>>>
>>> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
>>> and setting IRQ_NOREQUEST already, so there is no need to do this in
>>> .map() functions and we can simply remove the set_irq_flags calls. Some
>>> users also set IRQ_NOPROBE and this has been maintained although it is not
>>> clear that is really needed. There appears to be a great deal of blind
>>> copy and paste of this code.
>>>
>>> Signed-off-by: Rob Herring <robh@kernel.org>
>>> Cc: Kishon Vijay Abraham I <kishon@ti.com>
>>> Cc: Bjorn Helgaas <bhelgaas@google.com>
>>> Cc: Murali Karicheri <m-karicheri2@ti.com>
>>> Cc: Thierry Reding <thierry.reding@gmail.com>
>>> Cc: Stephen Warren <swarren@wwwdotorg.org>
>>> Cc: Alexandre Courbot <gnurou@gmail.com>
>>> Cc: Jingoo Han <jingoohan1@gmail.com>
>>> Cc: Pratyush Anand <pratyush.anand@gmail.com>
>>> Cc: Simon Horman <horms@verge.net.au>
>>> Cc: Michal Simek <michal.simek@xilinx.com>
>>> Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
>>> Cc: linux-omap@vger.kernel.org
>>> Cc: linux-pci@vger.kernel.org
>>> Cc: linux-arm-kernel@lists.infradead.org
>>> Cc: linux-tegra@vger.kernel.org
>>> Cc: linux-sh@vger.kernel.org
>>
>> This is the only part of the series on linux-pci, so I assume this will be
>> merged by somebody else along with the rest.
>
> I copied you on the intro, but all the lists and all the maintainers
> was too long to cc. Being late in the cycle I didn't really intend for
> this to be for 4.2, but you can pick up this patch if you want to as
> it doesn't have any dependencies. If you don't, then I will submit the
> whole series for 4.3.

OK, why don't you just include this with the rest of the series, since
I assume the whole series is related even if there's no actual
dependency.

Bjorn

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

* Re: [PATCH 10/15] PCI: kill off set_irq_flags usage
@ 2015-06-18 20:10         ` Bjorn Helgaas
  0 siblings, 0 replies; 112+ messages in thread
From: Bjorn Helgaas @ 2015-06-18 20:10 UTC (permalink / raw)
  To: Rob Herring
  Cc: Russell King, linux-arm-kernel, linux-kernel, arm,
	Kishon Vijay Abraham I, Murali Karicheri, Thierry Reding,
	Stephen Warren, Alexandre Courbot, Jingoo Han, Pratyush Anand,
	Simon Horman, Michal Simek, Sören Brinkmann, linux-omap,
	linux-pci, linux-tegra, SH-Linux

On Thu, Jun 18, 2015 at 3:08 PM, Rob Herring <robh@kernel.org> wrote:
> On Thu, Jun 18, 2015 at 11:59 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>> On Tue, Jun 09, 2015 at 01:26:36PM -0500, Rob Herring wrote:
>>> set_irq_flags is ARM specific with custom flags which have genirq
>>> equivalents. Convert drivers to use the genirq interfaces directly, so we
>>> can kill off set_irq_flags. The translation of flags is as follows:
>>>
>>> IRQF_VALID -> !IRQ_NOREQUEST
>>> IRQF_PROBE -> !IRQ_NOPROBE
>>> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>>>
>>> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
>>> and setting IRQ_NOREQUEST already, so there is no need to do this in
>>> .map() functions and we can simply remove the set_irq_flags calls. Some
>>> users also set IRQ_NOPROBE and this has been maintained although it is not
>>> clear that is really needed. There appears to be a great deal of blind
>>> copy and paste of this code.
>>>
>>> Signed-off-by: Rob Herring <robh@kernel.org>
>>> Cc: Kishon Vijay Abraham I <kishon@ti.com>
>>> Cc: Bjorn Helgaas <bhelgaas@google.com>
>>> Cc: Murali Karicheri <m-karicheri2@ti.com>
>>> Cc: Thierry Reding <thierry.reding@gmail.com>
>>> Cc: Stephen Warren <swarren@wwwdotorg.org>
>>> Cc: Alexandre Courbot <gnurou@gmail.com>
>>> Cc: Jingoo Han <jingoohan1@gmail.com>
>>> Cc: Pratyush Anand <pratyush.anand@gmail.com>
>>> Cc: Simon Horman <horms@verge.net.au>
>>> Cc: Michal Simek <michal.simek@xilinx.com>
>>> Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
>>> Cc: linux-omap@vger.kernel.org
>>> Cc: linux-pci@vger.kernel.org
>>> Cc: linux-arm-kernel@lists.infradead.org
>>> Cc: linux-tegra@vger.kernel.org
>>> Cc: linux-sh@vger.kernel.org
>>
>> This is the only part of the series on linux-pci, so I assume this will be
>> merged by somebody else along with the rest.
>
> I copied you on the intro, but all the lists and all the maintainers
> was too long to cc. Being late in the cycle I didn't really intend for
> this to be for 4.2, but you can pick up this patch if you want to as
> it doesn't have any dependencies. If you don't, then I will submit the
> whole series for 4.3.

OK, why don't you just include this with the rest of the series, since
I assume the whole series is related even if there's no actual
dependency.

Bjorn

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

* [PATCH 10/15] PCI: kill off set_irq_flags usage
@ 2015-06-18 20:10         ` Bjorn Helgaas
  0 siblings, 0 replies; 112+ messages in thread
From: Bjorn Helgaas @ 2015-06-18 20:10 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jun 18, 2015 at 3:08 PM, Rob Herring <robh@kernel.org> wrote:
> On Thu, Jun 18, 2015 at 11:59 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>> On Tue, Jun 09, 2015 at 01:26:36PM -0500, Rob Herring wrote:
>>> set_irq_flags is ARM specific with custom flags which have genirq
>>> equivalents. Convert drivers to use the genirq interfaces directly, so we
>>> can kill off set_irq_flags. The translation of flags is as follows:
>>>
>>> IRQF_VALID -> !IRQ_NOREQUEST
>>> IRQF_PROBE -> !IRQ_NOPROBE
>>> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>>>
>>> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
>>> and setting IRQ_NOREQUEST already, so there is no need to do this in
>>> .map() functions and we can simply remove the set_irq_flags calls. Some
>>> users also set IRQ_NOPROBE and this has been maintained although it is not
>>> clear that is really needed. There appears to be a great deal of blind
>>> copy and paste of this code.
>>>
>>> Signed-off-by: Rob Herring <robh@kernel.org>
>>> Cc: Kishon Vijay Abraham I <kishon@ti.com>
>>> Cc: Bjorn Helgaas <bhelgaas@google.com>
>>> Cc: Murali Karicheri <m-karicheri2@ti.com>
>>> Cc: Thierry Reding <thierry.reding@gmail.com>
>>> Cc: Stephen Warren <swarren@wwwdotorg.org>
>>> Cc: Alexandre Courbot <gnurou@gmail.com>
>>> Cc: Jingoo Han <jingoohan1@gmail.com>
>>> Cc: Pratyush Anand <pratyush.anand@gmail.com>
>>> Cc: Simon Horman <horms@verge.net.au>
>>> Cc: Michal Simek <michal.simek@xilinx.com>
>>> Cc: "S?ren Brinkmann" <soren.brinkmann@xilinx.com>
>>> Cc: linux-omap at vger.kernel.org
>>> Cc: linux-pci at vger.kernel.org
>>> Cc: linux-arm-kernel at lists.infradead.org
>>> Cc: linux-tegra at vger.kernel.org
>>> Cc: linux-sh at vger.kernel.org
>>
>> This is the only part of the series on linux-pci, so I assume this will be
>> merged by somebody else along with the rest.
>
> I copied you on the intro, but all the lists and all the maintainers
> was too long to cc. Being late in the cycle I didn't really intend for
> this to be for 4.2, but you can pick up this patch if you want to as
> it doesn't have any dependencies. If you don't, then I will submit the
> whole series for 4.3.

OK, why don't you just include this with the rest of the series, since
I assume the whole series is related even if there's no actual
dependency.

Bjorn

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

* Re: [PATCH 12/15] SH: kill off set_irq_flags usage
  2015-06-09 18:26   ` Rob Herring
  (?)
@ 2015-07-07  0:53     ` Simon Horman
  -1 siblings, 0 replies; 112+ messages in thread
From: Simon Horman @ 2015-07-07  0:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jun 09, 2015 at 01:26:38PM -0500, Rob Herring wrote:
> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
> 
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> 
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Simon Horman <horms@verge.net.au>
> Cc: Magnus Damm <magnus.damm@gmail.com>
> Cc: linux-sh@vger.kernel.org

I am trusting the description above coupled with the comments in
the original code (that this patch removes). Assuming those ducks are
aligned:

Acked-by: Simon Horman <horms+renesas@verge.net.au>

> ---
>  drivers/sh/intc/internals.h | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
> index 7dff08e..897ffb1 100644
> --- a/drivers/sh/intc/internals.h
> +++ b/drivers/sh/intc/internals.h
> @@ -99,15 +99,7 @@ static inline struct intc_desc_int *get_intc_desc(unsigned int irq)
>   */
>  static inline void activate_irq(int irq)
>  {
> -#ifdef CONFIG_ARM
> -	/* ARM requires an extra step to clear IRQ_NOREQUEST, which it
> -	 * sets on behalf of every irq_chip.  Also sets IRQ_NOPROBE.
> -	 */
> -	set_irq_flags(irq, IRQF_VALID);
> -#else
> -	/* same effect on other architectures */
> -	irq_set_noprobe(irq);
> -#endif
> +	irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
>  }
>  
>  static inline int intc_handle_int_cmp(const void *a, const void *b)
> -- 
> 2.1.0
> 

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

* Re: [PATCH 12/15] SH: kill off set_irq_flags usage
@ 2015-07-07  0:53     ` Simon Horman
  0 siblings, 0 replies; 112+ messages in thread
From: Simon Horman @ 2015-07-07  0:53 UTC (permalink / raw)
  To: Rob Herring
  Cc: Russell King, linux-arm-kernel, linux-kernel, arm, Magnus Damm, linux-sh

On Tue, Jun 09, 2015 at 01:26:38PM -0500, Rob Herring wrote:
> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
> 
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> 
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Simon Horman <horms@verge.net.au>
> Cc: Magnus Damm <magnus.damm@gmail.com>
> Cc: linux-sh@vger.kernel.org

I am trusting the description above coupled with the comments in
the original code (that this patch removes). Assuming those ducks are
aligned:

Acked-by: Simon Horman <horms+renesas@verge.net.au>

> ---
>  drivers/sh/intc/internals.h | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
> index 7dff08e..897ffb1 100644
> --- a/drivers/sh/intc/internals.h
> +++ b/drivers/sh/intc/internals.h
> @@ -99,15 +99,7 @@ static inline struct intc_desc_int *get_intc_desc(unsigned int irq)
>   */
>  static inline void activate_irq(int irq)
>  {
> -#ifdef CONFIG_ARM
> -	/* ARM requires an extra step to clear IRQ_NOREQUEST, which it
> -	 * sets on behalf of every irq_chip.  Also sets IRQ_NOPROBE.
> -	 */
> -	set_irq_flags(irq, IRQF_VALID);
> -#else
> -	/* same effect on other architectures */
> -	irq_set_noprobe(irq);
> -#endif
> +	irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
>  }
>  
>  static inline int intc_handle_int_cmp(const void *a, const void *b)
> -- 
> 2.1.0
> 

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

* [PATCH 12/15] SH: kill off set_irq_flags usage
@ 2015-07-07  0:53     ` Simon Horman
  0 siblings, 0 replies; 112+ messages in thread
From: Simon Horman @ 2015-07-07  0:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jun 09, 2015 at 01:26:38PM -0500, Rob Herring wrote:
> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
> 
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> 
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Simon Horman <horms@verge.net.au>
> Cc: Magnus Damm <magnus.damm@gmail.com>
> Cc: linux-sh at vger.kernel.org

I am trusting the description above coupled with the comments in
the original code (that this patch removes). Assuming those ducks are
aligned:

Acked-by: Simon Horman <horms+renesas@verge.net.au>

> ---
>  drivers/sh/intc/internals.h | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
> index 7dff08e..897ffb1 100644
> --- a/drivers/sh/intc/internals.h
> +++ b/drivers/sh/intc/internals.h
> @@ -99,15 +99,7 @@ static inline struct intc_desc_int *get_intc_desc(unsigned int irq)
>   */
>  static inline void activate_irq(int irq)
>  {
> -#ifdef CONFIG_ARM
> -	/* ARM requires an extra step to clear IRQ_NOREQUEST, which it
> -	 * sets on behalf of every irq_chip.  Also sets IRQ_NOPROBE.
> -	 */
> -	set_irq_flags(irq, IRQF_VALID);
> -#else
> -	/* same effect on other architectures */
> -	irq_set_noprobe(irq);
> -#endif
> +	irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
>  }
>  
>  static inline int intc_handle_int_cmp(const void *a, const void *b)
> -- 
> 2.1.0
> 

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

* Re: [PATCH 12/15] SH: kill off set_irq_flags usage
  2015-07-07  0:53     ` Simon Horman
  (?)
@ 2015-07-07  1:55       ` Simon Horman
  -1 siblings, 0 replies; 112+ messages in thread
From: Simon Horman @ 2015-07-07  1:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jul 07, 2015 at 09:53:39AM +0900, Simon Horman wrote:
> On Tue, Jun 09, 2015 at 01:26:38PM -0500, Rob Herring wrote:
> > set_irq_flags is ARM specific with custom flags which have genirq
> > equivalents. Convert drivers to use the genirq interfaces directly, so we
> > can kill off set_irq_flags. The translation of flags is as follows:
> > 
> > IRQF_VALID -> !IRQ_NOREQUEST
> > IRQF_PROBE -> !IRQ_NOPROBE
> > IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> > 
> > For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> > and setting IRQ_NOREQUEST already, so there is no need to do this in
> > .map() functions and we can simply remove the set_irq_flags calls. Some
> > users also set IRQ_NOPROBE and this has been maintained although it is not
> > clear that is really needed. There appears to be a great deal of blind
> > copy and paste of this code.
> > 
> > Signed-off-by: Rob Herring <robh@kernel.org>
> > Cc: Simon Horman <horms@verge.net.au>
> > Cc: Magnus Damm <magnus.damm@gmail.com>
> > Cc: linux-sh@vger.kernel.org
> 
> I am trusting the description above coupled with the comments in
> the original code (that this patch removes). Assuming those ducks are
> aligned:
> 
> Acked-by: Simon Horman <horms+renesas@verge.net.au>

As I usually take patches for drivers/sh/ (there have not been many of late)
please let me know if you would like me to pick up this change.

Also, a very minor nit, the prefix for patches to this file is usually
'sh:' rather than 'SH:'.

> 
> > ---
> >  drivers/sh/intc/internals.h | 10 +---------
> >  1 file changed, 1 insertion(+), 9 deletions(-)
> > 
> > diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
> > index 7dff08e..897ffb1 100644
> > --- a/drivers/sh/intc/internals.h
> > +++ b/drivers/sh/intc/internals.h
> > @@ -99,15 +99,7 @@ static inline struct intc_desc_int *get_intc_desc(unsigned int irq)
> >   */
> >  static inline void activate_irq(int irq)
> >  {
> > -#ifdef CONFIG_ARM
> > -	/* ARM requires an extra step to clear IRQ_NOREQUEST, which it
> > -	 * sets on behalf of every irq_chip.  Also sets IRQ_NOPROBE.
> > -	 */
> > -	set_irq_flags(irq, IRQF_VALID);
> > -#else
> > -	/* same effect on other architectures */
> > -	irq_set_noprobe(irq);
> > -#endif
> > +	irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
> >  }
> >  
> >  static inline int intc_handle_int_cmp(const void *a, const void *b)
> > -- 
> > 2.1.0
> > 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [PATCH 12/15] SH: kill off set_irq_flags usage
@ 2015-07-07  1:55       ` Simon Horman
  0 siblings, 0 replies; 112+ messages in thread
From: Simon Horman @ 2015-07-07  1:55 UTC (permalink / raw)
  To: Rob Herring
  Cc: Russell King, linux-arm-kernel, linux-kernel, arm, Magnus Damm, linux-sh

On Tue, Jul 07, 2015 at 09:53:39AM +0900, Simon Horman wrote:
> On Tue, Jun 09, 2015 at 01:26:38PM -0500, Rob Herring wrote:
> > set_irq_flags is ARM specific with custom flags which have genirq
> > equivalents. Convert drivers to use the genirq interfaces directly, so we
> > can kill off set_irq_flags. The translation of flags is as follows:
> > 
> > IRQF_VALID -> !IRQ_NOREQUEST
> > IRQF_PROBE -> !IRQ_NOPROBE
> > IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> > 
> > For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> > and setting IRQ_NOREQUEST already, so there is no need to do this in
> > .map() functions and we can simply remove the set_irq_flags calls. Some
> > users also set IRQ_NOPROBE and this has been maintained although it is not
> > clear that is really needed. There appears to be a great deal of blind
> > copy and paste of this code.
> > 
> > Signed-off-by: Rob Herring <robh@kernel.org>
> > Cc: Simon Horman <horms@verge.net.au>
> > Cc: Magnus Damm <magnus.damm@gmail.com>
> > Cc: linux-sh@vger.kernel.org
> 
> I am trusting the description above coupled with the comments in
> the original code (that this patch removes). Assuming those ducks are
> aligned:
> 
> Acked-by: Simon Horman <horms+renesas@verge.net.au>

As I usually take patches for drivers/sh/ (there have not been many of late)
please let me know if you would like me to pick up this change.

Also, a very minor nit, the prefix for patches to this file is usually
'sh:' rather than 'SH:'.

> 
> > ---
> >  drivers/sh/intc/internals.h | 10 +---------
> >  1 file changed, 1 insertion(+), 9 deletions(-)
> > 
> > diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
> > index 7dff08e..897ffb1 100644
> > --- a/drivers/sh/intc/internals.h
> > +++ b/drivers/sh/intc/internals.h
> > @@ -99,15 +99,7 @@ static inline struct intc_desc_int *get_intc_desc(unsigned int irq)
> >   */
> >  static inline void activate_irq(int irq)
> >  {
> > -#ifdef CONFIG_ARM
> > -	/* ARM requires an extra step to clear IRQ_NOREQUEST, which it
> > -	 * sets on behalf of every irq_chip.  Also sets IRQ_NOPROBE.
> > -	 */
> > -	set_irq_flags(irq, IRQF_VALID);
> > -#else
> > -	/* same effect on other architectures */
> > -	irq_set_noprobe(irq);
> > -#endif
> > +	irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
> >  }
> >  
> >  static inline int intc_handle_int_cmp(const void *a, const void *b)
> > -- 
> > 2.1.0
> > 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* [PATCH 12/15] SH: kill off set_irq_flags usage
@ 2015-07-07  1:55       ` Simon Horman
  0 siblings, 0 replies; 112+ messages in thread
From: Simon Horman @ 2015-07-07  1:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jul 07, 2015 at 09:53:39AM +0900, Simon Horman wrote:
> On Tue, Jun 09, 2015 at 01:26:38PM -0500, Rob Herring wrote:
> > set_irq_flags is ARM specific with custom flags which have genirq
> > equivalents. Convert drivers to use the genirq interfaces directly, so we
> > can kill off set_irq_flags. The translation of flags is as follows:
> > 
> > IRQF_VALID -> !IRQ_NOREQUEST
> > IRQF_PROBE -> !IRQ_NOPROBE
> > IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> > 
> > For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> > and setting IRQ_NOREQUEST already, so there is no need to do this in
> > .map() functions and we can simply remove the set_irq_flags calls. Some
> > users also set IRQ_NOPROBE and this has been maintained although it is not
> > clear that is really needed. There appears to be a great deal of blind
> > copy and paste of this code.
> > 
> > Signed-off-by: Rob Herring <robh@kernel.org>
> > Cc: Simon Horman <horms@verge.net.au>
> > Cc: Magnus Damm <magnus.damm@gmail.com>
> > Cc: linux-sh at vger.kernel.org
> 
> I am trusting the description above coupled with the comments in
> the original code (that this patch removes). Assuming those ducks are
> aligned:
> 
> Acked-by: Simon Horman <horms+renesas@verge.net.au>

As I usually take patches for drivers/sh/ (there have not been many of late)
please let me know if you would like me to pick up this change.

Also, a very minor nit, the prefix for patches to this file is usually
'sh:' rather than 'SH:'.

> 
> > ---
> >  drivers/sh/intc/internals.h | 10 +---------
> >  1 file changed, 1 insertion(+), 9 deletions(-)
> > 
> > diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
> > index 7dff08e..897ffb1 100644
> > --- a/drivers/sh/intc/internals.h
> > +++ b/drivers/sh/intc/internals.h
> > @@ -99,15 +99,7 @@ static inline struct intc_desc_int *get_intc_desc(unsigned int irq)
> >   */
> >  static inline void activate_irq(int irq)
> >  {
> > -#ifdef CONFIG_ARM
> > -	/* ARM requires an extra step to clear IRQ_NOREQUEST, which it
> > -	 * sets on behalf of every irq_chip.  Also sets IRQ_NOPROBE.
> > -	 */
> > -	set_irq_flags(irq, IRQF_VALID);
> > -#else
> > -	/* same effect on other architectures */
> > -	irq_set_noprobe(irq);
> > -#endif
> > +	irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
> >  }
> >  
> >  static inline int intc_handle_int_cmp(const void *a, const void *b)
> > -- 
> > 2.1.0
> > 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [PATCH 12/15] SH: kill off set_irq_flags usage
  2015-07-07  1:55       ` Simon Horman
  (?)
@ 2015-07-07 14:38         ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-07-07 14:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 6, 2015 at 8:55 PM, Simon Horman <horms@verge.net.au> wrote:
> On Tue, Jul 07, 2015 at 09:53:39AM +0900, Simon Horman wrote:
>> On Tue, Jun 09, 2015 at 01:26:38PM -0500, Rob Herring wrote:
>> > set_irq_flags is ARM specific with custom flags which have genirq
>> > equivalents. Convert drivers to use the genirq interfaces directly, so we
>> > can kill off set_irq_flags. The translation of flags is as follows:
>> >
>> > IRQF_VALID -> !IRQ_NOREQUEST
>> > IRQF_PROBE -> !IRQ_NOPROBE
>> > IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>> >
>> > For IRQs managed by an irqdomain, the irqdomain core code handles clearing
>> > and setting IRQ_NOREQUEST already, so there is no need to do this in
>> > .map() functions and we can simply remove the set_irq_flags calls. Some
>> > users also set IRQ_NOPROBE and this has been maintained although it is not
>> > clear that is really needed. There appears to be a great deal of blind
>> > copy and paste of this code.
>> >
>> > Signed-off-by: Rob Herring <robh@kernel.org>
>> > Cc: Simon Horman <horms@verge.net.au>
>> > Cc: Magnus Damm <magnus.damm@gmail.com>
>> > Cc: linux-sh@vger.kernel.org
>>
>> I am trusting the description above coupled with the comments in
>> the original code (that this patch removes). Assuming those ducks are
>> aligned:
>>
>> Acked-by: Simon Horman <horms+renesas@verge.net.au>
>
> As I usually take patches for drivers/sh/ (there have not been many of late)
> please let me know if you would like me to pick up this change.

This is a dependency for removing set_irq_flags from ARM, so I plan to
send the whole series to arm-soc.

> Also, a very minor nit, the prefix for patches to this file is usually
> 'sh:' rather than 'SH:'.

Okay, will fix-up.

Rob

>
>>
>> > ---
>> >  drivers/sh/intc/internals.h | 10 +---------
>> >  1 file changed, 1 insertion(+), 9 deletions(-)
>> >
>> > diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
>> > index 7dff08e..897ffb1 100644
>> > --- a/drivers/sh/intc/internals.h
>> > +++ b/drivers/sh/intc/internals.h
>> > @@ -99,15 +99,7 @@ static inline struct intc_desc_int *get_intc_desc(unsigned int irq)
>> >   */
>> >  static inline void activate_irq(int irq)
>> >  {
>> > -#ifdef CONFIG_ARM
>> > -   /* ARM requires an extra step to clear IRQ_NOREQUEST, which it
>> > -    * sets on behalf of every irq_chip.  Also sets IRQ_NOPROBE.
>> > -    */
>> > -   set_irq_flags(irq, IRQF_VALID);
>> > -#else
>> > -   /* same effect on other architectures */
>> > -   irq_set_noprobe(irq);
>> > -#endif
>> > +   irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
>> >  }
>> >
>> >  static inline int intc_handle_int_cmp(const void *a, const void *b)
>> > --
>> > 2.1.0
>> >
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>

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

* Re: [PATCH 12/15] SH: kill off set_irq_flags usage
@ 2015-07-07 14:38         ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-07-07 14:38 UTC (permalink / raw)
  To: Simon Horman
  Cc: Russell King, linux-arm-kernel, linux-kernel, arm, Magnus Damm, SH-Linux

On Mon, Jul 6, 2015 at 8:55 PM, Simon Horman <horms@verge.net.au> wrote:
> On Tue, Jul 07, 2015 at 09:53:39AM +0900, Simon Horman wrote:
>> On Tue, Jun 09, 2015 at 01:26:38PM -0500, Rob Herring wrote:
>> > set_irq_flags is ARM specific with custom flags which have genirq
>> > equivalents. Convert drivers to use the genirq interfaces directly, so we
>> > can kill off set_irq_flags. The translation of flags is as follows:
>> >
>> > IRQF_VALID -> !IRQ_NOREQUEST
>> > IRQF_PROBE -> !IRQ_NOPROBE
>> > IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>> >
>> > For IRQs managed by an irqdomain, the irqdomain core code handles clearing
>> > and setting IRQ_NOREQUEST already, so there is no need to do this in
>> > .map() functions and we can simply remove the set_irq_flags calls. Some
>> > users also set IRQ_NOPROBE and this has been maintained although it is not
>> > clear that is really needed. There appears to be a great deal of blind
>> > copy and paste of this code.
>> >
>> > Signed-off-by: Rob Herring <robh@kernel.org>
>> > Cc: Simon Horman <horms@verge.net.au>
>> > Cc: Magnus Damm <magnus.damm@gmail.com>
>> > Cc: linux-sh@vger.kernel.org
>>
>> I am trusting the description above coupled with the comments in
>> the original code (that this patch removes). Assuming those ducks are
>> aligned:
>>
>> Acked-by: Simon Horman <horms+renesas@verge.net.au>
>
> As I usually take patches for drivers/sh/ (there have not been many of late)
> please let me know if you would like me to pick up this change.

This is a dependency for removing set_irq_flags from ARM, so I plan to
send the whole series to arm-soc.

> Also, a very minor nit, the prefix for patches to this file is usually
> 'sh:' rather than 'SH:'.

Okay, will fix-up.

Rob

>
>>
>> > ---
>> >  drivers/sh/intc/internals.h | 10 +---------
>> >  1 file changed, 1 insertion(+), 9 deletions(-)
>> >
>> > diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
>> > index 7dff08e..897ffb1 100644
>> > --- a/drivers/sh/intc/internals.h
>> > +++ b/drivers/sh/intc/internals.h
>> > @@ -99,15 +99,7 @@ static inline struct intc_desc_int *get_intc_desc(unsigned int irq)
>> >   */
>> >  static inline void activate_irq(int irq)
>> >  {
>> > -#ifdef CONFIG_ARM
>> > -   /* ARM requires an extra step to clear IRQ_NOREQUEST, which it
>> > -    * sets on behalf of every irq_chip.  Also sets IRQ_NOPROBE.
>> > -    */
>> > -   set_irq_flags(irq, IRQF_VALID);
>> > -#else
>> > -   /* same effect on other architectures */
>> > -   irq_set_noprobe(irq);
>> > -#endif
>> > +   irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
>> >  }
>> >
>> >  static inline int intc_handle_int_cmp(const void *a, const void *b)
>> > --
>> > 2.1.0
>> >
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>

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

* [PATCH 12/15] SH: kill off set_irq_flags usage
@ 2015-07-07 14:38         ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2015-07-07 14:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 6, 2015 at 8:55 PM, Simon Horman <horms@verge.net.au> wrote:
> On Tue, Jul 07, 2015 at 09:53:39AM +0900, Simon Horman wrote:
>> On Tue, Jun 09, 2015 at 01:26:38PM -0500, Rob Herring wrote:
>> > set_irq_flags is ARM specific with custom flags which have genirq
>> > equivalents. Convert drivers to use the genirq interfaces directly, so we
>> > can kill off set_irq_flags. The translation of flags is as follows:
>> >
>> > IRQF_VALID -> !IRQ_NOREQUEST
>> > IRQF_PROBE -> !IRQ_NOPROBE
>> > IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>> >
>> > For IRQs managed by an irqdomain, the irqdomain core code handles clearing
>> > and setting IRQ_NOREQUEST already, so there is no need to do this in
>> > .map() functions and we can simply remove the set_irq_flags calls. Some
>> > users also set IRQ_NOPROBE and this has been maintained although it is not
>> > clear that is really needed. There appears to be a great deal of blind
>> > copy and paste of this code.
>> >
>> > Signed-off-by: Rob Herring <robh@kernel.org>
>> > Cc: Simon Horman <horms@verge.net.au>
>> > Cc: Magnus Damm <magnus.damm@gmail.com>
>> > Cc: linux-sh at vger.kernel.org
>>
>> I am trusting the description above coupled with the comments in
>> the original code (that this patch removes). Assuming those ducks are
>> aligned:
>>
>> Acked-by: Simon Horman <horms+renesas@verge.net.au>
>
> As I usually take patches for drivers/sh/ (there have not been many of late)
> please let me know if you would like me to pick up this change.

This is a dependency for removing set_irq_flags from ARM, so I plan to
send the whole series to arm-soc.

> Also, a very minor nit, the prefix for patches to this file is usually
> 'sh:' rather than 'SH:'.

Okay, will fix-up.

Rob

>
>>
>> > ---
>> >  drivers/sh/intc/internals.h | 10 +---------
>> >  1 file changed, 1 insertion(+), 9 deletions(-)
>> >
>> > diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
>> > index 7dff08e..897ffb1 100644
>> > --- a/drivers/sh/intc/internals.h
>> > +++ b/drivers/sh/intc/internals.h
>> > @@ -99,15 +99,7 @@ static inline struct intc_desc_int *get_intc_desc(unsigned int irq)
>> >   */
>> >  static inline void activate_irq(int irq)
>> >  {
>> > -#ifdef CONFIG_ARM
>> > -   /* ARM requires an extra step to clear IRQ_NOREQUEST, which it
>> > -    * sets on behalf of every irq_chip.  Also sets IRQ_NOPROBE.
>> > -    */
>> > -   set_irq_flags(irq, IRQF_VALID);
>> > -#else
>> > -   /* same effect on other architectures */
>> > -   irq_set_noprobe(irq);
>> > -#endif
>> > +   irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
>> >  }
>> >
>> >  static inline int intc_handle_int_cmp(const void *a, const void *b)
>> > --
>> > 2.1.0
>> >
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
>> the body of a message to majordomo at vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>

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

* Re: [PATCH 12/15] SH: kill off set_irq_flags usage
  2015-07-07 14:38         ` Rob Herring
  (?)
@ 2015-07-08  1:04           ` Simon Horman
  -1 siblings, 0 replies; 112+ messages in thread
From: Simon Horman @ 2015-07-08  1:04 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jul 07, 2015 at 09:38:53AM -0500, Rob Herring wrote:
> On Mon, Jul 6, 2015 at 8:55 PM, Simon Horman <horms@verge.net.au> wrote:
> > On Tue, Jul 07, 2015 at 09:53:39AM +0900, Simon Horman wrote:
> >> On Tue, Jun 09, 2015 at 01:26:38PM -0500, Rob Herring wrote:
> >> > set_irq_flags is ARM specific with custom flags which have genirq
> >> > equivalents. Convert drivers to use the genirq interfaces directly, so we
> >> > can kill off set_irq_flags. The translation of flags is as follows:
> >> >
> >> > IRQF_VALID -> !IRQ_NOREQUEST
> >> > IRQF_PROBE -> !IRQ_NOPROBE
> >> > IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> >> >
> >> > For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> >> > and setting IRQ_NOREQUEST already, so there is no need to do this in
> >> > .map() functions and we can simply remove the set_irq_flags calls. Some
> >> > users also set IRQ_NOPROBE and this has been maintained although it is not
> >> > clear that is really needed. There appears to be a great deal of blind
> >> > copy and paste of this code.
> >> >
> >> > Signed-off-by: Rob Herring <robh@kernel.org>
> >> > Cc: Simon Horman <horms@verge.net.au>
> >> > Cc: Magnus Damm <magnus.damm@gmail.com>
> >> > Cc: linux-sh@vger.kernel.org
> >>
> >> I am trusting the description above coupled with the comments in
> >> the original code (that this patch removes). Assuming those ducks are
> >> aligned:
> >>
> >> Acked-by: Simon Horman <horms+renesas@verge.net.au>
> >
> > As I usually take patches for drivers/sh/ (there have not been many of late)
> > please let me know if you would like me to pick up this change.
> 
> This is a dependency for removing set_irq_flags from ARM, so I plan to
> send the whole series to arm-soc.

Thanks, that is fine by me.

> > Also, a very minor nit, the prefix for patches to this file is usually
> > 'sh:' rather than 'SH:'.
> 
> Okay, will fix-up.
> 
> Rob
> 
> >
> >>
> >> > ---
> >> >  drivers/sh/intc/internals.h | 10 +---------
> >> >  1 file changed, 1 insertion(+), 9 deletions(-)
> >> >
> >> > diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
> >> > index 7dff08e..897ffb1 100644
> >> > --- a/drivers/sh/intc/internals.h
> >> > +++ b/drivers/sh/intc/internals.h
> >> > @@ -99,15 +99,7 @@ static inline struct intc_desc_int *get_intc_desc(unsigned int irq)
> >> >   */
> >> >  static inline void activate_irq(int irq)
> >> >  {
> >> > -#ifdef CONFIG_ARM
> >> > -   /* ARM requires an extra step to clear IRQ_NOREQUEST, which it
> >> > -    * sets on behalf of every irq_chip.  Also sets IRQ_NOPROBE.
> >> > -    */
> >> > -   set_irq_flags(irq, IRQF_VALID);
> >> > -#else
> >> > -   /* same effect on other architectures */
> >> > -   irq_set_noprobe(irq);
> >> > -#endif
> >> > +   irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
> >> >  }
> >> >
> >> >  static inline int intc_handle_int_cmp(const void *a, const void *b)
> >> > --
> >> > 2.1.0
> >> >
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> >> the body of a message to majordomo@vger.kernel.org
> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >>
> 

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

* Re: [PATCH 12/15] SH: kill off set_irq_flags usage
@ 2015-07-08  1:04           ` Simon Horman
  0 siblings, 0 replies; 112+ messages in thread
From: Simon Horman @ 2015-07-08  1:04 UTC (permalink / raw)
  To: Rob Herring
  Cc: Russell King, linux-arm-kernel, linux-kernel, arm, Magnus Damm, SH-Linux

On Tue, Jul 07, 2015 at 09:38:53AM -0500, Rob Herring wrote:
> On Mon, Jul 6, 2015 at 8:55 PM, Simon Horman <horms@verge.net.au> wrote:
> > On Tue, Jul 07, 2015 at 09:53:39AM +0900, Simon Horman wrote:
> >> On Tue, Jun 09, 2015 at 01:26:38PM -0500, Rob Herring wrote:
> >> > set_irq_flags is ARM specific with custom flags which have genirq
> >> > equivalents. Convert drivers to use the genirq interfaces directly, so we
> >> > can kill off set_irq_flags. The translation of flags is as follows:
> >> >
> >> > IRQF_VALID -> !IRQ_NOREQUEST
> >> > IRQF_PROBE -> !IRQ_NOPROBE
> >> > IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> >> >
> >> > For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> >> > and setting IRQ_NOREQUEST already, so there is no need to do this in
> >> > .map() functions and we can simply remove the set_irq_flags calls. Some
> >> > users also set IRQ_NOPROBE and this has been maintained although it is not
> >> > clear that is really needed. There appears to be a great deal of blind
> >> > copy and paste of this code.
> >> >
> >> > Signed-off-by: Rob Herring <robh@kernel.org>
> >> > Cc: Simon Horman <horms@verge.net.au>
> >> > Cc: Magnus Damm <magnus.damm@gmail.com>
> >> > Cc: linux-sh@vger.kernel.org
> >>
> >> I am trusting the description above coupled with the comments in
> >> the original code (that this patch removes). Assuming those ducks are
> >> aligned:
> >>
> >> Acked-by: Simon Horman <horms+renesas@verge.net.au>
> >
> > As I usually take patches for drivers/sh/ (there have not been many of late)
> > please let me know if you would like me to pick up this change.
> 
> This is a dependency for removing set_irq_flags from ARM, so I plan to
> send the whole series to arm-soc.

Thanks, that is fine by me.

> > Also, a very minor nit, the prefix for patches to this file is usually
> > 'sh:' rather than 'SH:'.
> 
> Okay, will fix-up.
> 
> Rob
> 
> >
> >>
> >> > ---
> >> >  drivers/sh/intc/internals.h | 10 +---------
> >> >  1 file changed, 1 insertion(+), 9 deletions(-)
> >> >
> >> > diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
> >> > index 7dff08e..897ffb1 100644
> >> > --- a/drivers/sh/intc/internals.h
> >> > +++ b/drivers/sh/intc/internals.h
> >> > @@ -99,15 +99,7 @@ static inline struct intc_desc_int *get_intc_desc(unsigned int irq)
> >> >   */
> >> >  static inline void activate_irq(int irq)
> >> >  {
> >> > -#ifdef CONFIG_ARM
> >> > -   /* ARM requires an extra step to clear IRQ_NOREQUEST, which it
> >> > -    * sets on behalf of every irq_chip.  Also sets IRQ_NOPROBE.
> >> > -    */
> >> > -   set_irq_flags(irq, IRQF_VALID);
> >> > -#else
> >> > -   /* same effect on other architectures */
> >> > -   irq_set_noprobe(irq);
> >> > -#endif
> >> > +   irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
> >> >  }
> >> >
> >> >  static inline int intc_handle_int_cmp(const void *a, const void *b)
> >> > --
> >> > 2.1.0
> >> >
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> >> the body of a message to majordomo@vger.kernel.org
> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >>
> 

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

* [PATCH 12/15] SH: kill off set_irq_flags usage
@ 2015-07-08  1:04           ` Simon Horman
  0 siblings, 0 replies; 112+ messages in thread
From: Simon Horman @ 2015-07-08  1:04 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jul 07, 2015 at 09:38:53AM -0500, Rob Herring wrote:
> On Mon, Jul 6, 2015 at 8:55 PM, Simon Horman <horms@verge.net.au> wrote:
> > On Tue, Jul 07, 2015 at 09:53:39AM +0900, Simon Horman wrote:
> >> On Tue, Jun 09, 2015 at 01:26:38PM -0500, Rob Herring wrote:
> >> > set_irq_flags is ARM specific with custom flags which have genirq
> >> > equivalents. Convert drivers to use the genirq interfaces directly, so we
> >> > can kill off set_irq_flags. The translation of flags is as follows:
> >> >
> >> > IRQF_VALID -> !IRQ_NOREQUEST
> >> > IRQF_PROBE -> !IRQ_NOPROBE
> >> > IRQF_NOAUTOEN -> IRQ_NOAUTOEN
> >> >
> >> > For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> >> > and setting IRQ_NOREQUEST already, so there is no need to do this in
> >> > .map() functions and we can simply remove the set_irq_flags calls. Some
> >> > users also set IRQ_NOPROBE and this has been maintained although it is not
> >> > clear that is really needed. There appears to be a great deal of blind
> >> > copy and paste of this code.
> >> >
> >> > Signed-off-by: Rob Herring <robh@kernel.org>
> >> > Cc: Simon Horman <horms@verge.net.au>
> >> > Cc: Magnus Damm <magnus.damm@gmail.com>
> >> > Cc: linux-sh at vger.kernel.org
> >>
> >> I am trusting the description above coupled with the comments in
> >> the original code (that this patch removes). Assuming those ducks are
> >> aligned:
> >>
> >> Acked-by: Simon Horman <horms+renesas@verge.net.au>
> >
> > As I usually take patches for drivers/sh/ (there have not been many of late)
> > please let me know if you would like me to pick up this change.
> 
> This is a dependency for removing set_irq_flags from ARM, so I plan to
> send the whole series to arm-soc.

Thanks, that is fine by me.

> > Also, a very minor nit, the prefix for patches to this file is usually
> > 'sh:' rather than 'SH:'.
> 
> Okay, will fix-up.
> 
> Rob
> 
> >
> >>
> >> > ---
> >> >  drivers/sh/intc/internals.h | 10 +---------
> >> >  1 file changed, 1 insertion(+), 9 deletions(-)
> >> >
> >> > diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
> >> > index 7dff08e..897ffb1 100644
> >> > --- a/drivers/sh/intc/internals.h
> >> > +++ b/drivers/sh/intc/internals.h
> >> > @@ -99,15 +99,7 @@ static inline struct intc_desc_int *get_intc_desc(unsigned int irq)
> >> >   */
> >> >  static inline void activate_irq(int irq)
> >> >  {
> >> > -#ifdef CONFIG_ARM
> >> > -   /* ARM requires an extra step to clear IRQ_NOREQUEST, which it
> >> > -    * sets on behalf of every irq_chip.  Also sets IRQ_NOPROBE.
> >> > -    */
> >> > -   set_irq_flags(irq, IRQF_VALID);
> >> > -#else
> >> > -   /* same effect on other architectures */
> >> > -   irq_set_noprobe(irq);
> >> > -#endif
> >> > +   irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
> >> >  }
> >> >
> >> >  static inline int intc_handle_int_cmp(const void *a, const void *b)
> >> > --
> >> > 2.1.0
> >> >
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> >> the body of a message to majordomo at vger.kernel.org
> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >>
> 

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

end of thread, other threads:[~2015-07-08  1:04 UTC | newest]

Thread overview: 112+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-09 18:26 [PATCH 00/15] Kill off set_irq_flags Rob Herring
2015-06-09 18:26 ` Rob Herring
2015-06-09 18:26 ` [PATCH 01/15] ARM: kill off set_irq_flags usage Rob Herring
2015-06-09 18:26   ` Rob Herring
2015-06-09 18:26   ` Rob Herring
2015-06-12  9:30   ` Krzysztof Kozlowski
2015-06-12  9:30     ` Krzysztof Kozlowski
2015-06-12 14:05   ` Hans Ulli Kroll
2015-06-12 14:05     ` Hans Ulli Kroll
2015-06-12 14:05     ` Hans Ulli Kroll
2015-06-12 14:35     ` Rob Herring
2015-06-12 14:35       ` Rob Herring
2015-06-12 14:35       ` Rob Herring
2015-06-12 16:23       ` Hans Ulli Kroll
2015-06-12 16:23         ` Hans Ulli Kroll
2015-06-12 16:23         ` Hans Ulli Kroll
2015-06-13 11:32   ` Wan ZongShun
2015-06-13 11:32     ` Wan ZongShun
2015-06-13 11:32     ` Wan ZongShun
2015-06-09 18:26 ` [PATCH 02/15] regmap: " Rob Herring
2015-06-09 18:26   ` Rob Herring
2015-06-09 19:12   ` Mark Brown
2015-06-09 19:12     ` Mark Brown
2015-06-09 21:27     ` Russell King - ARM Linux
2015-06-09 21:27       ` Russell King - ARM Linux
2015-06-09 23:20       ` Mark Brown
2015-06-09 23:20         ` Mark Brown
2015-06-09 18:26 ` [PATCH 03/15] clk: " Rob Herring
2015-06-09 18:26   ` Rob Herring
2015-06-09 18:44   ` Boris Brezillon
2015-06-09 18:44     ` Boris Brezillon
2015-06-09 18:52   ` Stephen Boyd
2015-06-09 18:52     ` Stephen Boyd
2015-06-09 18:26 ` [PATCH 04/15] dma: " Rob Herring
2015-06-09 18:26   ` Rob Herring
2015-06-09 18:26 ` [PATCH 05/15] gpio: " Rob Herring
2015-06-09 18:26   ` Rob Herring
     [not found]   ` <1433874401-27161-6-git-send-email-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2015-06-10 12:43     ` Linus Walleij
2015-06-10 12:43       ` Linus Walleij
2015-06-10 12:43       ` Linus Walleij
2015-06-09 18:26 ` [PATCH 06/15] gpu/drm: " Rob Herring
2015-06-09 18:26   ` Rob Herring
2015-06-09 18:26 ` [PATCH 07/15] irqchip: " Rob Herring
2015-06-09 18:26   ` Rob Herring
2015-06-10 17:13   ` Rob Herring
2015-06-10 17:13     ` Rob Herring
2015-06-10 17:13     ` Rob Herring
2015-06-09 18:26 ` [PATCH 08/15] memory: " Rob Herring
2015-06-09 18:26   ` Rob Herring
2015-06-09 18:26   ` Rob Herring
2015-06-11 12:18   ` Roger Quadros
2015-06-11 12:18     ` Roger Quadros
2015-06-11 12:18     ` Roger Quadros
2015-06-11 13:17     ` Rob Herring
2015-06-11 13:17       ` Rob Herring
2015-06-11 13:17       ` Rob Herring
2015-06-11 14:00       ` Roger Quadros
2015-06-11 14:00         ` Roger Quadros
2015-06-11 14:00         ` Roger Quadros
2015-06-09 18:26 ` [PATCH 09/15] mfd: " Rob Herring
2015-06-09 18:26   ` Rob Herring
2015-06-10 12:43   ` Linus Walleij
2015-06-10 12:43     ` Linus Walleij
2015-06-10 12:43     ` Linus Walleij
2015-06-11  8:51   ` Lee Jones
2015-06-11  8:51     ` Lee Jones
2015-06-09 18:26 ` [PATCH 10/15] PCI: " Rob Herring
2015-06-09 18:26   ` Rob Herring
2015-06-09 18:26   ` Rob Herring
2015-06-18 16:59   ` Bjorn Helgaas
2015-06-18 16:59     ` Bjorn Helgaas
2015-06-18 16:59     ` Bjorn Helgaas
2015-06-18 20:08     ` Rob Herring
2015-06-18 20:08       ` Rob Herring
2015-06-18 20:08       ` Rob Herring
2015-06-18 20:10       ` Bjorn Helgaas
2015-06-18 20:10         ` Bjorn Helgaas
2015-06-18 20:10         ` Bjorn Helgaas
2015-06-09 18:26 ` [PATCH 11/15] pinctrl: " Rob Herring
2015-06-09 18:26   ` Rob Herring
2015-06-10 12:42   ` Linus Walleij
2015-06-10 12:42     ` Linus Walleij
2015-06-10 12:42     ` Linus Walleij
2015-06-09 18:26 ` [PATCH 12/15] SH: " Rob Herring
2015-06-09 18:26   ` Rob Herring
2015-06-09 18:26   ` Rob Herring
2015-07-07  0:53   ` Simon Horman
2015-07-07  0:53     ` Simon Horman
2015-07-07  0:53     ` Simon Horman
2015-07-07  1:55     ` Simon Horman
2015-07-07  1:55       ` Simon Horman
2015-07-07  1:55       ` Simon Horman
2015-07-07 14:38       ` Rob Herring
2015-07-07 14:38         ` Rob Herring
2015-07-07 14:38         ` Rob Herring
2015-07-08  1:04         ` Simon Horman
2015-07-08  1:04           ` Simon Horman
2015-07-08  1:04           ` Simon Horman
2015-06-09 18:26 ` [PATCH 13/15] tty/serial: " Rob Herring
2015-06-09 18:26   ` Rob Herring
2015-06-09 18:26 ` [PATCH 14/15] ARM: remove ununsed set_irq_flags Rob Herring
2015-06-09 18:26   ` Rob Herring
2015-06-09 18:26 ` [PATCH 15/15] arm64: " Rob Herring
2015-06-09 18:26   ` Rob Herring
2015-06-10 16:56   ` Catalin Marinas
2015-06-10 16:56     ` Catalin Marinas
2015-06-09 20:28 ` [PATCH 00/15] Kill off set_irq_flags Russell King - ARM Linux
2015-06-09 20:28   ` Russell King - ARM Linux
2015-06-09 21:23   ` Rob Herring
2015-06-09 21:23     ` Rob Herring
2015-06-10 23:32     ` Kevin Hilman
2015-06-10 23:32       ` Kevin Hilman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.