Kill off set_irq_flags
Subsystems (53)
cover Kill off set_irq_flags
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(-)
Signature · 1 line
2.1.0
PATCH 1/15 ARM: kill off set_irq_flags usage
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_NOREQUESTIRQF_PROBE -> !IRQ_NOPROBEIRQF_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.
--- 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(-)
arch/arm/common/it8152.c +1 -1
@@ -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 ); } }
arch/arm/common/locomo.c +1 -1
@@ -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 ); } }
arch/arm/common/sa1111.c +2 -2
@@ -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 ); }/*
arch/arm/mach-davinci/cp_intc.c +1 -1
@@ -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 ; }
arch/arm/mach-dove/irq.c +1 -1
@@ -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); }
arch/arm/mach-ebsa110/core.c +1 -1
@@ -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 ); } }
arch/arm/mach-footbridge/common.c +1 -1
@@ -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 ); } }
arch/arm/mach-footbridge/isa-irq.c +4 -4
@@ -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 ); } }
arch/arm/mach-gemini/gpio.c +1 -1
@@ -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);
arch/arm/mach-gemini/irq.c +1 -1
@@ -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 */
arch/arm/mach-imx/3ds_debugboard.c +1 -1
@@ -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);
arch/arm/mach-imx/mach-mx31ads.c +1 -1
@@ -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 );
arch/arm/mach-iop13xx/irq.c +1 -1
@@ -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 ();
arch/arm/mach-iop32x/irq.c +1 -1
@@ -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 ); } }
arch/arm/mach-iop33x/irq.c +1 -1
@@ -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 ); } }
arch/arm/mach-ixp4xx/common.c +1 -1
@@ -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 ); } }
arch/arm/mach-ks8695/irq.c +1 -1
@@ -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 ); } }
arch/arm/mach-lpc32xx/irq.c +1 -1
@@ -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 */
arch/arm/mach-netx/generic.c +1 -1
@@ -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 );
arch/arm/mach-omap1/fpga.c +1 -1
@@ -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 ); }/*
arch/arm/mach-omap1/irq.c +1 -1
@@ -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 ); } }
arch/arm/mach-pxa/balloon3.c +1 -1
@@ -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);
arch/arm/mach-pxa/irq.c +0 -1
@@ -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 ; }
arch/arm/mach-pxa/lpd270.c +1 -1
@@ -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 );
arch/arm/mach-pxa/pcm990-baseboard.c +1 -1
@@ -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 */
arch/arm/mach-pxa/pxa3xx.c +1 -1
@@ -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;
arch/arm/mach-pxa/viper.c +1 -1
@@ -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),
arch/arm/mach-pxa/zeus.c +1 -1
@@ -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 );
arch/arm/mach-rpc/ecard.c +1 -1
@@ -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
arch/arm/mach-rpc/irq.c +8 -8
@@ -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 ; } }
arch/arm/mach-s3c24xx/bast-irq.c +1 -1
@@ -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 ); } }
arch/arm/mach-s3c64xx/common.c +1 -1
@@ -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);
arch/arm/mach-sa1100/irq.c +0 -1
@@ -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 ; }
arch/arm/mach-sa1100/neponset.c +2 -2
@@ -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 );
arch/arm/mach-w90x900/irq.c +1 -1
@@ -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 ); } }
Signature · 1 line
2.1.0
Re: [PATCH 01/15] ARM: kill off set_irq_flags usage
Quoted 70 lines · Rob Herring
set_irq_flagsis ARM specific with custom flags which have genirq equivalents. Convert drivers to use the genirq interfaces directly, so we can kill offset_irq_flags. The translation of flags is as follows:
IRQF_VALID-> !IRQ_NOREQUESTIRQF_PROBE-> !IRQ_NOPROBEIRQF_NOAUTOEN->IRQ_NOAUTOENFor IRQs managed by an irqdomain, the irqdomain core code handles clearing and setting
IRQ_NOREQUESTalready, so there is no need to do this in .map() functions and we can simply remove theset_irq_flagscalls. Some users also setIRQ_NOPROBEand 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 <[email protected]>Cc Russell King <[email protected]>Cc Sekhar Nori <[email protected]>Cc Kevin Hilman <[email protected]>Cc Jason Cooper <[email protected]>Cc Andrew Lunn <[email protected]>Cc Sebastian Hesselbarth <[email protected]>Cc Gregory Clement <[email protected]>Cc Hans Ulli Kroll <[email protected]>Cc Shawn Guo <[email protected]>Cc Sascha Hauer <[email protected]>Cc Imre Kaloz <[email protected]>Cc Krzysztof Halasa <[email protected]>Cc Greg Ungerer <[email protected]>Cc Roland Stigge <[email protected]>Cc Tony Lindgren <[email protected]>Cc Daniel Mack <[email protected]>Cc Haojian Zhuang <[email protected]>Cc Robert Jarzmik <[email protected]>Cc Simtec Linux Team <[email protected]>Cc Kukjin Kim <[email protected]>Cc Krzysztof Kozlowski <[email protected]>Cc Wan ZongShun <[email protected]>Cc linux-arm-kernel at lists.infradead.orgCc linux-omap at vger.kernel.orgCc 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 +-
Quoted 8 lines
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:
Best regards,
Krzysztof
Hans Ulli Kroll
maintainerRe: [PATCH 01/15] ARM: kill off set_irq_flags usage
In reply to Rob HerringQuoted 8 lines · Rob Herring
set_irq_flagsis ARM specific with custom flags which have genirq equivalents. Convert drivers to use the genirq interfaces directly, so we can kill offset_irq_flags. The translation of flags is as follows:
IRQF_VALID-> !IRQ_NOREQUESTIRQF_PROBE-> !IRQ_NOPROBEIRQF_NOAUTOEN->IRQ_NOAUTOEN
Quoted 7 lines
For IRQs managed by an irqdomain, the irqdomain core code handles clearing and setting
IRQ_NOREQUESTalready, so there is no need to do this in .map() functions and we can simply remove theset_irq_flagscalls. Some users also setIRQ_NOPROBEand 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
y
Re: [PATCH 01/15] ARM: kill off set_irq_flags usage
Quoted 20 lines · Hans Ulli Kroll
Quoted 8 lines · Rob Herring
set_irq_flagsis ARM specific with custom flags which have genirq equivalents. Convert drivers to use the genirq interfaces directly, so we can kill offset_irq_flags. The translation of flags is as follows:
IRQF_VALID-> !IRQ_NOREQUESTIRQF_PROBE-> !IRQ_NOPROBEIRQF_NOAUTOEN->IRQ_NOAUTOENQuoted 7 lines
For IRQs managed by an irqdomain, the irqdomain core code handles clearing and setting
IRQ_NOREQUESTalready, so there is no need to do this in .map() functions and we can simply remove theset_irq_flagscalls. Some users also setIRQ_NOPROBEand 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.
Quoted 2 lines
for mach-gemini
Signed-off-by Hans Ulli Kroll <[email protected]>
You mean acked-by, right?
Rob
Re: [PATCH 01/15] ARM: kill off set_irq_flags usage
Quoted 22 lines · Rob Herring
Quoted 20 lines · Hans Ulli Kroll
Quoted 15 lines · Rob Herring
set_irq_flagsis ARM specific with custom flags which have genirq equivalents. Convert drivers to use the genirq interfaces directly, so we can kill offset_irq_flags. The translation of flags is as follows:
IRQF_VALID-> !IRQ_NOREQUESTIRQF_PROBE-> !IRQ_NOPROBEIRQF_NOAUTOEN->IRQ_NOAUTOENFor IRQs managed by an irqdomain, the irqdomain core code handles clearing and setting
IRQ_NOREQUESTalready, so there is no need to do this in .map() functions and we can simply remove theset_irq_flagscalls. Some users also setIRQ_NOPROBEand 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.
Quoted 7 lines
Quoted 2 lines
for mach-gemini
Signed-off-by Hans Ulli Kroll <[email protected]>You mean acked-by, right?
Rob
Yeah
Ulli
Re: [PATCH 01/15] ARM: kill off set_irq_flags usage
In reply to Rob Herring2015-06-10 2:26 GMT+08:00 Rob Herring <[email protected]>:
Quoted 8 lines
set_irq_flagsis ARM specific with custom flags which have genirq equivalents. Convert drivers to use the genirq interfaces directly, so we can kill offset_irq_flags. The translation of flags is as follows:
IRQF_VALID-> !IRQ_NOREQUESTIRQF_PROBE-> !IRQ_NOPROBEIRQF_NOAUTOEN->IRQ_NOAUTOEN
Quoted 10 lines
For IRQs managed by an irqdomain, the irqdomain core code handles clearing and setting
IRQ_NOREQUESTalready, so there is no need to do this in .map() functions and we can simply remove theset_irq_flagscalls. Some users also setIRQ_NOPROBEand 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 <[email protected]>
Cc: Simtec Linux Team <[email protected]>
Cc: Kukjin Kim <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Wan ZongShun <[email protected]>
For Nuvoton W90x900
Quoted 14 lines
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-omap at vger.kernel.org
+++b/arch/arm/mach-w90x900/irq.carch/arm/mach-w90x900/irq.c +1
-2@@ -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
Signature · 3 lines
--- Vincent Wan(Zongshun) www.mcuos.com
PATCH 2/15 regmap: kill off set_irq_flags usage
In reply to Rob Herringset_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_NOREQUESTIRQF_PROBE -> !IRQ_NOPROBEIRQF_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.
--- drivers/base/regmap/regmap-irq.c | 7 ------- 1 file changed, 7 deletions(-)
drivers/base/regmap/regmap-irq.c +0 -7
@@ -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 ; }
Signature · 1 line
2.1.0
Mark Brown
maintainerRe: [PATCH 02/15] regmap: kill off set_irq_flags usage
Quoted 2 lines · Rob Herring
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>
Re: [PATCH 02/15] regmap: kill off set_irq_flags usage
Quoted 10 lines · Mark Brown
Quoted 2 lines · Rob Herring
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.
Signature · 2 lines
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net.
Mark Brown
maintainerRe: [PATCH 02/15] regmap: kill off set_irq_flags usage
Quoted 4 lines · Russell King - ARM Linux
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.
Quoted 4 lines
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>
PATCH 3/15 clk: kill off set_irq_flags usage
In reply to Rob Herringset_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_NOREQUESTIRQF_PROBE -> !IRQ_NOPROBEIRQF_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.
--- drivers/clk/at91/pmc.c | 1 - 1 file changed, 1 deletion(-)
drivers/clk/at91/pmc.c +0 -1
@@ -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 ;
Signature · 1 line
2.1.0
Re: [PATCH 03/15] clk: kill off set_irq_flags usage
Quoted 8 lines · On Tue, 9 Jun 2015 13:26:29 -0500 Rob Herring <[email protected]> wrote:
set_irq_flagsis ARM specific with custom flags which have genirq equivalents. Convert drivers to use the genirq interfaces directly, so we can kill offset_irq_flags. The translation of flags is as follows:
IRQF_VALID-> !IRQ_NOREQUESTIRQF_PROBE-> !IRQ_NOPROBEIRQF_NOAUTOEN->IRQ_NOAUTOEN
Quoted 8 lines
For IRQs managed by an irqdomain, the irqdomain core code handles clearing and setting
IRQ_NOREQUESTalready, so there is no need to do this in .map() functions and we can simply remove theset_irq_flagscalls. Some users also setIRQ_NOPROBEand 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 <[email protected]>
Quoted 20 lines
Cc Boris Brezillon <[email protected]>Cc Mike Turquette <[email protected]>Cc Stephen Boyd <[email protected]>Cc linux-clk at vger.kernel.org--- drivers/clk/at91/pmc.c | 1 - 1 file changed, 1 deletion(-)drivers/clk/at91/pmc.c +0
-1@@ -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 ;
Signature · 3 lines
Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
Re: [PATCH 03/15] clk: kill off set_irq_flags usage
In reply to Rob HerringQuoted 15 lines · Rob Herring
set_irq_flagsis ARM specific with custom flags which have genirq equivalents. Convert drivers to use the genirq interfaces directly, so we can kill offset_irq_flags. The translation of flags is as follows:
IRQF_VALID-> !IRQ_NOREQUESTIRQF_PROBE-> !IRQ_NOPROBEIRQF_NOAUTOEN->IRQ_NOAUTOENFor IRQs managed by an irqdomain, the irqdomain core code handles clearing and setting
IRQ_NOREQUESTalready, so there is no need to do this in .map() functions and we can simply remove theset_irq_flagscalls. Some users also setIRQ_NOPROBEand 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.
Quoted 6 lines
Signed-off-by Rob Herring <[email protected]>Cc Boris Brezillon <[email protected]>Cc Mike Turquette <[email protected]>Cc Stephen Boyd <[email protected]>Cc linux-clk at vger.kernel.org---
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH 4/15 dma: kill off set_irq_flags usage
In reply to Rob Herringset_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_NOREQUESTIRQF_PROBE -> !IRQ_NOPROBEIRQF_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.
--- drivers/dma/ipu/ipu_irq.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/dma/ipu/ipu_irq.c +2 -6
@@ -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 ); }
Signature · 1 line
2.1.0
PATCH 5/15 gpio: kill off set_irq_flags usage
In reply to Rob Herringset_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_NOREQUESTIRQF_PROBE -> !IRQ_NOPROBEIRQF_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.
--- 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(-)
drivers/gpio/gpio-adp5588.c +1 -9
@@ -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,
drivers/gpio/gpio-bcm-kona.c +0 -15
@@ -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);
drivers/gpio/gpio-davinci.c +0 -1
@@ -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 ; }
drivers/gpio/gpio-em.c +0 -1
@@ -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 ; }
drivers/gpio/gpio-ep93xx.c +1 -1
@@ -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,
drivers/gpio/gpio-grgpio.c +0 -8
@@ -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 );
drivers/gpio/gpio-mcp23s08.c +0 -4
@@ -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 ; }
drivers/gpio/gpio-msm-v2.c +0 -1
@@ -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 ; }
drivers/gpio/gpio-pxa.c +4 -4
@@ -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 ); } }
drivers/gpio/gpio-sa1100.c +1 -1
@@ -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 ; }
drivers/gpio/gpio-sta2x11.c +1 -1
@@ -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; }
drivers/gpio/gpio-tegra.c +0 -1
@@ -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++) {
drivers/gpio/gpio-timberdale.c +1 -3
@@ -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);
drivers/gpio/gpiolib.c +1 -7
@@ -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 );
Signature · 1 line
2.1.0
Re: [PATCH 05/15] gpio: kill off set_irq_flags usage
Quoted 15 lines · Rob Herring
set_irq_flagsis ARM specific with custom flags which have genirq equivalents. Convert drivers to use the genirq interfaces directly, so we can kill offset_irq_flags. The translation of flags is as follows:
IRQF_VALID-> !IRQ_NOREQUESTIRQF_PROBE-> !IRQ_NOPROBEIRQF_NOAUTOEN->IRQ_NOAUTOENFor IRQs managed by an irqdomain, the irqdomain core code handles clearing and setting
IRQ_NOREQUESTalready, so there is no need to do this in .map() functions and we can simply remove theset_irq_flagscalls. Some users also setIRQ_NOPROBEand 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.
Quoted 10 lines
Signed-off-by Rob Herring <[email protected]>Cc Michael Hennerich <[email protected]>Cc Linus Walleij <[email protected]>Cc Alexandre Courbot <[email protected]>Cc Ray Jui <[email protected]>Cc Stephen Warren <[email protected]>Cc Thierry Reding <[email protected]>Cc linux-gpio at vger.kernel.orgCc bcm-kernel-feedback-list at broadcom.comCc linux-tegra at vger.kernel.org
Yours,
Linus Walleij
PATCH 6/15 gpu/drm: kill off set_irq_flags usage
In reply to Rob Herringset_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_NOREQUESTIRQF_PROBE -> !IRQ_NOPROBEIRQF_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.
--- 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(-)
drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c +0 -1
@@ -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 ; }
drivers/gpu/ipu-v3/ipu-common.c +1 -2
@@ -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);
Signature · 1 line
2.1.0
PATCH 7/15 irqchip: kill off set_irq_flags usage
In reply to Rob Herringset_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_NOREQUESTIRQF_PROBE -> !IRQ_NOPROBEIRQF_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.
--- 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(-)
drivers/irqchip/exynos-combiner.c +1 -1
@@ -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 ; }
drivers/irqchip/irq-armada-370-xp.c +1 -2
@@ -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 ; }
drivers/irqchip/irq-bcm2835.c +1 -1
@@ -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); } }
drivers/irqchip/irq-clps711x.c +3 -3
@@ -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 ; }
drivers/irqchip/irq-gic-v3.c +2 -3
@@ -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 ;
drivers/irqchip/irq-gic.c +2 -2
@@ -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 ; }
drivers/irqchip/irq-hip04.c +2 -2
@@ -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 ;
drivers/irqchip/irq-keystone.c +1 -1
@@ -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 ; }
drivers/irqchip/irq-mmp.c +0 -3
@@ -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);
drivers/irqchip/irq-mxs.c +0 -1
@@ -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 ; }
drivers/irqchip/irq-renesas-intc-irqpin.c +0 -1
@@ -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 ; }
drivers/irqchip/irq-renesas-irqc.c +0 -1
@@ -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 ; }
drivers/irqchip/irq-s3c24xx.c +2 -12
@@ -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 ; }
drivers/irqchip/irq-sun4i.c +1 -1
@@ -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 ; }
drivers/irqchip/irq-versatile-fpga.c +1 -1
@@ -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 ; }
drivers/irqchip/irq-vic.c +1 -1
@@ -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 ; }
drivers/irqchip/irq-vt8500.c +0 -1
@@ -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 ; }
drivers/irqchip/spear-shirq.c +0 -1
@@ -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); } }
Signature · 1 line
2.1.0
Re: [PATCH 07/15] irqchip: kill off set_irq_flags usage
Quoted 14 lines · Rob Herring
set_irq_flagsis ARM specific with custom flags which have genirq equivalents. Convert drivers to use the genirq interfaces directly, so we can kill offset_irq_flags. The translation of flags is as follows:
IRQF_VALID-> !IRQ_NOREQUESTIRQF_PROBE-> !IRQ_NOPROBEIRQF_NOAUTOEN->IRQ_NOAUTOENFor IRQs managed by an irqdomain, the irqdomain core code handles clearing and setting
IRQ_NOREQUESTalready, so there is no need to do this in .map() functions and we can simply remove theset_irq_flagscalls. Some users also setIRQ_NOPROBEand 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.
[...]
Quoted 22 lines
drivers/irqchip/irq-clps711x.c +2
-2@@ -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; }
drivers/irqchip/irq-clps711x.c static int __init clps711x_intc_irq_map(struct irq_domain *h, unsigned int virq, · line 153
Quoted 5 lines
drivers/irqchip/irq-clps711x.c +1
-1@@ -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:
drivers/irqchip/irq-clps711x.c +0 -0
@@ -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;
}
PATCH 8/15 memory: kill off set_irq_flags usage
In reply to Rob Herringset_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_NOREQUESTIRQF_PROBE -> !IRQ_NOPROBEIRQF_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.
--- drivers/memory/omap-gpmc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/memory/omap-gpmc.c +2 -3
@@ -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 );
Signature · 1 line
2.1.0
Re: [PATCH 08/15] memory: kill off set_irq_flags usage
Rob,
Quoted 28 lines · On Tue, 9 Jun 2015 13:26:34 -0500 Rob Herring <[email protected]> wrote:
set_irq_flagsis ARM specific with custom flags which have genirq equivalents. Convert drivers to use the genirq interfaces directly, so we can kill offset_irq_flags. The translation of flags is as follows:
IRQF_VALID-> !IRQ_NOREQUESTIRQF_PROBE-> !IRQ_NOPROBEIRQF_NOAUTOEN->IRQ_NOAUTOENFor IRQs managed by an irqdomain, the irqdomain core code handles clearing and setting
IRQ_NOREQUESTalready, so there is no need to do this in .map() functions and we can simply remove theset_irq_flagscalls. Some users also setIRQ_NOPROBEand 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 <[email protected]>Cc Roger Quadros <[email protected]>Cc Tony Lindgren <[email protected]>Cc linux-omap at vger.kernel.org--- drivers/memory/omap-gpmc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/memory/omap-gpmc.c +0
-0
drivers/memory/omap-gpmc.c static int gpmc_setup_irq(void) · line 1180
Quoted 7 lines
drivers/memory/omap-gpmc.c +2
-2@@ -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);
?
drivers/memory/omap-gpmc.c static int gpmc_free_irq(void) · line 1205
Quoted 11 lines
drivers/memory/omap-gpmc.c +0
-1}/* 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
Re: [PATCH 08/15] memory: kill off set_irq_flags usage
Quoted 42 lines · Roger Quadros
Rob,
Quoted 28 lines · On Tue, 9 Jun 2015 13:26:34 -0500 Rob Herring <[email protected]> wrote:
set_irq_flagsis ARM specific with custom flags which have genirq equivalents. Convert drivers to use the genirq interfaces directly, so we can kill offset_irq_flags. The translation of flags is as follows:
IRQF_VALID-> !IRQ_NOREQUESTIRQF_PROBE-> !IRQ_NOPROBEIRQF_NOAUTOEN->IRQ_NOAUTOENFor IRQs managed by an irqdomain, the irqdomain core code handles clearing and setting
IRQ_NOREQUESTalready, so there is no need to do this in .map() functions and we can simply remove theset_irq_flagscalls. Some users also setIRQ_NOPROBEand 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 <[email protected]>Cc Roger Quadros <[email protected]>Cc Tony Lindgren <[email protected]>Cc linux-omap at vger.kernel.org--- drivers/memory/omap-gpmc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/memory/omap-gpmc.c +0
-0drivers/memory/omap-gpmc.c static int gpmc_setup_irq(void) · line 1180
Quoted 7 lines
drivers/memory/omap-gpmc.c +2
-2@@ -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
Quoted 3 lines
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
Roger Quadros
Acked-byRe: [PATCH 08/15] memory: kill off set_irq_flags usage
Quoted 47 lines · On Thu, 11 Jun 2015 08:17:45 -0500 Rob Herring <[email protected]> wrote:
Quoted 42 lines · Roger Quadros
Rob,
Quoted 28 lines · On Tue, 9 Jun 2015 13:26:34 -0500 Rob Herring <[email protected]> wrote:
set_irq_flagsis ARM specific with custom flags which have genirq equivalents. Convert drivers to use the genirq interfaces directly, so we can kill offset_irq_flags. The translation of flags is as follows:
IRQF_VALID-> !IRQ_NOREQUESTIRQF_PROBE-> !IRQ_NOPROBEIRQF_NOAUTOEN->IRQ_NOAUTOENFor IRQs managed by an irqdomain, the irqdomain core code handles clearing and setting
IRQ_NOREQUESTalready, so there is no need to do this in .map() functions and we can simply remove theset_irq_flagscalls. Some users also setIRQ_NOPROBEand 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 <[email protected]>Cc Roger Quadros <[email protected]>Cc Tony Lindgren <[email protected]>Cc linux-omap at vger.kernel.org--- drivers/memory/omap-gpmc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/memory/omap-gpmc.c +0
-0drivers/memory/omap-gpmc.c static int gpmc_setup_irq(void) · line 1180
Quoted 7 lines
drivers/memory/omap-gpmc.c +2
-2@@ -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
Quoted 3 lines
irq_modify_status(gpmc_client_irq[i].irq, IRQ_NOREQUEST, IRQ_NOAUTOEN | IRQ_NOPROBE);?
Quoted 1 line
Only if this needs to work on !ARM. The default for ARM is
IRQ_NOPROBEset.
OK. In that case.
cheers,
-roger
PATCH 9/15 mfd: kill off set_irq_flags usage
In reply to Rob Herringset_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_NOREQUESTIRQF_PROBE -> !IRQ_NOPROBEIRQF_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.
--- 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(-)
drivers/mfd/88pm860x-core.c +0 -4
@@ -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 ; }
drivers/mfd/ab8500-core.c +0 -4
@@ -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 ; }
drivers/mfd/arizona-irq.c +0 -7
@@ -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 ; }
drivers/mfd/asic3.c +2 -2
@@ -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 ); }
drivers/mfd/db8500-prcmu.c +0 -1
@@ -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 ; }
drivers/mfd/ezx-pcap.c +1 -5
@@ -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 */
drivers/mfd/htc-egpio.c +2 -2
@@ -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 );
drivers/mfd/htc-i2cpld.c +1 -5
@@ -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;
drivers/mfd/lp8788-irq.c +0 -5
@@ -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 ; }
drivers/mfd/max8925-core.c +1 -4
@@ -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 ; }
drivers/mfd/max8997-irq.c +1 -4
@@ -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 ; }
drivers/mfd/max8998-irq.c +1 -4
@@ -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 ; }
drivers/mfd/mt6397-core.c +0 -4
@@ -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 ; }
drivers/mfd/pm8921-core.c +1 -4
@@ -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 ; }
drivers/mfd/rc5t583-irq.c +1 -3
@@ -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,
drivers/mfd/stmpe.c +0 -7
@@ -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 ); }
drivers/mfd/t7l66xb.c +0 -6
@@ -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 ); }
drivers/mfd/tc3589x.c +0 -7
@@ -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 ); }
drivers/mfd/tc6393xb.c +2 -2
@@ -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 ); }
drivers/mfd/tps6586x.c +0 -7
@@ -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 ; }
drivers/mfd/tps65912-irq.c +1 -7
@@ -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,
drivers/mfd/twl4030-irq.c +1 -10
@@ -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 ); }/*----------------------------------------------------------------------*/
drivers/mfd/twl6030-irq.c +0 -13
@@ -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 ); }
drivers/mfd/ucb1x00-core.c +1 -1
@@ -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 );
drivers/mfd/wm831x-irq.c +0 -7
@@ -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 ; }
drivers/mfd/wm8350-irq.c +1 -7
@@ -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,
drivers/mfd/wm8994-irq.c +0 -7
@@ -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 ; }
Signature · 1 line
2.1.0
Re: [PATCH 09/15] mfd: kill off set_irq_flags usage
Quoted 15 lines · Rob Herring
set_irq_flagsis ARM specific with custom flags which have genirq equivalents. Convert drivers to use the genirq interfaces directly, so we can kill offset_irq_flags. The translation of flags is as follows:
IRQF_VALID-> !IRQ_NOREQUESTIRQF_PROBE-> !IRQ_NOPROBEIRQF_NOAUTOEN->IRQ_NOAUTOENFor IRQs managed by an irqdomain, the irqdomain core code handles clearing and setting
IRQ_NOREQUESTalready, so there is no need to do this in .map() functions and we can simply remove theset_irq_flagscalls. Some users also setIRQ_NOPROBEand 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.
Quoted 14 lines
Signed-off-by Rob Herring <[email protected]>Cc Samuel Ortiz <[email protected]>Cc Lee Jones <[email protected]>Cc Linus Walleij <[email protected]>Cc Milo Kim <[email protected]>Cc Kumar Gala <[email protected]>Cc Andy Gross <[email protected]>Cc David Brown <[email protected]>Cc Tony Lindgren <[email protected]>Cc linux-arm-kernel at lists.infradead.orgCc patches at opensource.wolfsonmicro.comCc linux-arm-msm at vger.kernel.orgCc linux-soc at vger.kernel.orgCc linux-omap at vger.kernel.org
Yours,
Linus Walleij
Re: [PATCH 09/15] mfd: kill off set_irq_flags usage
In reply to Rob HerringQuoted 50 lines · Rob Herring
set_irq_flagsis ARM specific with custom flags which have genirq equivalents. Convert drivers to use the genirq interfaces directly, so we can kill offset_irq_flags. The translation of flags is as follows:
IRQF_VALID-> !IRQ_NOREQUESTIRQF_PROBE-> !IRQ_NOPROBEIRQF_NOAUTOEN->IRQ_NOAUTOENFor IRQs managed by an irqdomain, the irqdomain core code handles clearing and setting
IRQ_NOREQUESTalready, so there is no need to do this in .map() functions and we can simply remove theset_irq_flagscalls. Some users also setIRQ_NOPROBEand 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 <[email protected]>Cc Samuel Ortiz <[email protected]>Cc Lee Jones <[email protected]>Cc Linus Walleij <[email protected]>Cc Milo Kim <[email protected]>Cc Kumar Gala <[email protected]>Cc Andy Gross <[email protected]>Cc David Brown <[email protected]>Cc Tony Lindgren <[email protected]>Cc linux-arm-kernel at lists.infradead.orgCc patches at opensource.wolfsonmicro.comCc linux-arm-msm at vger.kernel.orgCc linux-soc at vger.kernel.orgCc 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 -------
Quoted 8 lines
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(-)
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH 10/15 PCI: kill off set_irq_flags usage
In reply to Rob Herringset_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_NOREQUESTIRQF_PROBE -> !IRQ_NOPROBEIRQF_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.
--- 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(-)
drivers/pci/host/pci-dra7xx.c +0 -1
@@ -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 ; }
drivers/pci/host/pci-keystone-dw.c +0 -2
@@ -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 ; }
drivers/pci/host/pci-tegra.c +0 -1
@@ -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 ();
drivers/pci/host/pcie-designware.c +0 -1
@@ -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 ; }
drivers/pci/host/pcie-rcar.c +0 -1
@@ -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 ; }
drivers/pci/host/pcie-xilinx.c +0 -2
@@ -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 ; }
Signature · 1 line
2.1.0
Re: [PATCH 10/15] PCI: kill off set_irq_flags usage
Quoted 24 lines · Rob Herring
set_irq_flagsis ARM specific with custom flags which have genirq equivalents. Convert drivers to use the genirq interfaces directly, so we can kill offset_irq_flags. The translation of flags is as follows:
IRQF_VALID-> !IRQ_NOREQUESTIRQF_PROBE-> !IRQ_NOPROBEIRQF_NOAUTOEN->IRQ_NOAUTOENFor IRQs managed by an irqdomain, the irqdomain core code handles clearing and setting
IRQ_NOREQUESTalready, so there is no need to do this in .map() functions and we can simply remove theset_irq_flagscalls. Some users also setIRQ_NOPROBEand 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 <[email protected]>Cc Kishon Vijay Abraham I <[email protected]>Cc Bjorn Helgaas <[email protected]>Cc Murali Karicheri <[email protected]>Cc Thierry Reding <[email protected]>Cc Stephen Warren <[email protected]>Cc Alexandre Courbot <[email protected]>Cc Jingoo Han <[email protected]>Cc Pratyush Anand <[email protected]>
Quoted 8 lines
Cc Simon Horman <[email protected]>Cc Michal Simek <[email protected]>Cc "S?ren Brinkmann" <[email protected]>Cc linux-omap at vger.kernel.orgCc linux-pci at vger.kernel.orgCc linux-arm-kernel at lists.infradead.orgCc linux-tegra at vger.kernel.orgCc 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.
Quoted 105 lines
--- 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(-)drivers/pci/host/pci-dra7xx.c +0
-1@@ -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 ; }drivers/pci/host/pci-keystone-dw.c +0
-2@@ -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 ; }drivers/pci/host/pci-tegra.c +0
-1@@ -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 ();drivers/pci/host/pcie-designware.c +0
-1@@ -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 ; }drivers/pci/host/pcie-rcar.c +0
-1@@ -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 ; }drivers/pci/host/pcie-xilinx.c +0
-2@@ -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 ; }Signature · 7 lines
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/
Re: [PATCH 10/15] PCI: kill off set_irq_flags usage
Quoted 34 lines · Bjorn Helgaas
Quoted 24 lines · Rob Herring
set_irq_flagsis ARM specific with custom flags which have genirq equivalents. Convert drivers to use the genirq interfaces directly, so we can kill offset_irq_flags. The translation of flags is as follows:
IRQF_VALID-> !IRQ_NOREQUESTIRQF_PROBE-> !IRQ_NOPROBEIRQF_NOAUTOEN->IRQ_NOAUTOENFor IRQs managed by an irqdomain, the irqdomain core code handles clearing and setting
IRQ_NOREQUESTalready, so there is no need to do this in .map() functions and we can simply remove theset_irq_flagscalls. Some users also setIRQ_NOPROBEand 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 <[email protected]>Cc Kishon Vijay Abraham I <[email protected]>Cc Bjorn Helgaas <[email protected]>Cc Murali Karicheri <[email protected]>Cc Thierry Reding <[email protected]>Cc Stephen Warren <[email protected]>Cc Alexandre Courbot <[email protected]>Cc Jingoo Han <[email protected]>Cc Pratyush Anand <[email protected]>Quoted 8 lines
Cc Simon Horman <[email protected]>Cc Michal Simek <[email protected]>Cc "S?ren Brinkmann" <[email protected]>Cc linux-omap at vger.kernel.orgCc linux-pci at vger.kernel.orgCc linux-arm-kernel at lists.infradead.orgCc linux-tegra at vger.kernel.orgCc linux-sh at vger.kernel.org
Quoted 2 lines
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.
Quoted 1 line
Acked-by Bjorn Helgaas <[email protected]>
Thanks.
Rob
Bjorn Helgaas
maintainerRe: [PATCH 10/15] PCI: kill off set_irq_flags usage
Quoted 35 lines · Rob Herring
Quoted 34 lines · Bjorn Helgaas
Quoted 32 lines · Rob Herring
set_irq_flagsis ARM specific with custom flags which have genirq equivalents. Convert drivers to use the genirq interfaces directly, so we can kill offset_irq_flags. The translation of flags is as follows:
IRQF_VALID-> !IRQ_NOREQUESTIRQF_PROBE-> !IRQ_NOPROBEIRQF_NOAUTOEN->IRQ_NOAUTOENFor IRQs managed by an irqdomain, the irqdomain core code handles clearing and setting
IRQ_NOREQUESTalready, so there is no need to do this in .map() functions and we can simply remove theset_irq_flagscalls. Some users also setIRQ_NOPROBEand 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 <[email protected]>Cc Kishon Vijay Abraham I <[email protected]>Cc Bjorn Helgaas <[email protected]>Cc Murali Karicheri <[email protected]>Cc Thierry Reding <[email protected]>Cc Stephen Warren <[email protected]>Cc Alexandre Courbot <[email protected]>Cc Jingoo Han <[email protected]>Cc Pratyush Anand <[email protected]>Cc Simon Horman <[email protected]>Cc Michal Simek <[email protected]>Cc "S?ren Brinkmann" <[email protected]>Cc linux-omap at vger.kernel.orgCc linux-pci at vger.kernel.orgCc linux-arm-kernel at lists.infradead.orgCc linux-tegra at vger.kernel.orgCc linux-sh at vger.kernel.org
Quoted 8 lines
Quoted 2 lines
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
PATCH 11/15 pinctrl: kill off set_irq_flags usage
In reply to Rob Herringset_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_NOREQUESTIRQF_PROBE -> !IRQ_NOPROBEIRQF_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.
--- 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(-)
drivers/pinctrl/bcm/pinctrl-bcm2835.c +0 -1
@@ -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++) {
drivers/pinctrl/mediatek/pinctrl-mtk-common.c +0 -2
@@ -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:
drivers/pinctrl/pinctrl-single.c +0 -5
@@ -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 ; }
drivers/pinctrl/samsung/pinctrl-exynos.c +0 -1
@@ -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 ; }
drivers/pinctrl/samsung/pinctrl-exynos5440.c +0 -1
@@ -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 ; }
drivers/pinctrl/samsung/pinctrl-s3c24xx.c +0 -2
@@ -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 ; }
drivers/pinctrl/samsung/pinctrl-s3c64xx.c +0 -2
@@ -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 ; }
Signature · 1 line
2.1.0
Re: [PATCH 11/15] pinctrl: kill off set_irq_flags usage
Quoted 15 lines · Rob Herring
set_irq_flagsis ARM specific with custom flags which have genirq equivalents. Convert drivers to use the genirq interfaces directly, so we can kill offset_irq_flags. The translation of flags is as follows:
IRQF_VALID-> !IRQ_NOREQUESTIRQF_PROBE-> !IRQ_NOPROBEIRQF_NOAUTOEN->IRQ_NOAUTOENFor IRQs managed by an irqdomain, the irqdomain core code handles clearing and setting
IRQ_NOREQUESTalready, so there is no need to do this in .map() functions and we can simply remove theset_irq_flagscalls. Some users also setIRQ_NOPROBEand 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.
Quoted 14 lines
Signed-off-by Rob Herring <[email protected]>Cc Linus Walleij <[email protected]>Cc Stephen Warren <[email protected]>Cc Lee Jones <[email protected]>Cc Matthias Brugger <[email protected]>Cc Tomasz Figa <[email protected]>Cc Thomas Abraham <[email protected]>Cc Kukjin Kim <[email protected]>Cc Krzysztof Kozlowski <[email protected]>Cc linux-gpio at vger.kernel.orgCc linux-rpi-kernel at lists.infradead.orgCc linux-arm-kernel at lists.infradead.orgCc linux-mediatek at lists.infradead.orgCc linux-samsung-soc at vger.kernel.org
Yours,
Linus Walleij
PATCH 12/15 SH: kill off set_irq_flags usage
In reply to Rob Herringset_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_NOREQUESTIRQF_PROBE -> !IRQ_NOPROBEIRQF_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.
--- drivers/sh/intc/internals.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)
drivers/sh/intc/internals.h +1 -9
@@ -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)
Signature · 1 line
2.1.0
Re: [PATCH 12/15] SH: kill off set_irq_flags usage
Quoted 15 lines · Rob Herring
set_irq_flagsis ARM specific with custom flags which have genirq equivalents. Convert drivers to use the genirq interfaces directly, so we can kill offset_irq_flags. The translation of flags is as follows:
IRQF_VALID-> !IRQ_NOREQUESTIRQF_PROBE-> !IRQ_NOPROBEIRQF_NOAUTOEN->IRQ_NOAUTOENFor IRQs managed by an irqdomain, the irqdomain core code handles clearing and setting
IRQ_NOREQUESTalready, so there is no need to do this in .map() functions and we can simply remove theset_irq_flagscalls. Some users also setIRQ_NOPROBEand 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.
Quoted 4 lines
Signed-off-by Rob Herring <[email protected]>Cc Simon Horman <[email protected]>Cc Magnus Damm <[email protected]>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:
Quoted 28 lines
--- drivers/sh/intc/internals.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)drivers/sh/intc/internals.h +1
-9@@ -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)Signature · 1 line
2.1.0
Re: [PATCH 12/15] SH: kill off set_irq_flags usage
Quoted 21 lines · Simon Horman
Quoted 15 lines · Rob Herring
set_irq_flagsis ARM specific with custom flags which have genirq equivalents. Convert drivers to use the genirq interfaces directly, so we can kill offset_irq_flags. The translation of flags is as follows:
IRQF_VALID-> !IRQ_NOREQUESTIRQF_PROBE-> !IRQ_NOPROBEIRQF_NOAUTOEN->IRQ_NOAUTOENFor IRQs managed by an irqdomain, the irqdomain core code handles clearing and setting
IRQ_NOREQUESTalready, so there is no need to do this in .map() functions and we can simply remove theset_irq_flagscalls. Some users also setIRQ_NOPROBEand 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.Quoted 4 lines
Signed-off-by Rob Herring <[email protected]>Cc Simon Horman <[email protected]>Cc Magnus Damm <[email protected]>Cc linux-sh at vger.kernel.org
Quoted 5 lines
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 <[email protected]>
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:'.
Quoted 34 lines
Quoted 29 lines
--- drivers/sh/intc/internals.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)drivers/sh/intc/internals.h +1
-9@@ -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)Signature · 1 line
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
Re: [PATCH 12/15] SH: kill off set_irq_flags usage
Quoted 22 lines · Simon Horman
Quoted 21 lines · Simon Horman
Quoted 19 lines · Rob Herring
set_irq_flagsis ARM specific with custom flags which have genirq equivalents. Convert drivers to use the genirq interfaces directly, so we can kill offset_irq_flags. The translation of flags is as follows:
IRQF_VALID-> !IRQ_NOREQUESTIRQF_PROBE-> !IRQ_NOPROBEIRQF_NOAUTOEN->IRQ_NOAUTOENFor IRQs managed by an irqdomain, the irqdomain core code handles clearing and setting
IRQ_NOREQUESTalready, so there is no need to do this in .map() functions and we can simply remove theset_irq_flagscalls. Some users also setIRQ_NOPROBEand 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 <[email protected]>Cc Simon Horman <[email protected]>Cc Magnus Damm <[email protected]>Cc linux-sh at vger.kernel.org
Quoted 8 lines
Quoted 5 lines
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 <[email protected]>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.
Quoted 2 lines
Also, a very minor nit, the prefix for patches to this file is usually 'sh:' rather than 'SH:'.
Okay, will fix-up.
Rob
Quoted 35 lines
Quoted 35 lines
Quoted 28 lines
--- drivers/sh/intc/internals.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)drivers/sh/intc/internals.h +1
-10@@ -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) --Quoted 2 lines
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
Re: [PATCH 12/15] SH: kill off set_irq_flags usage
Quoted 27 lines · Rob Herring
Quoted 26 lines · Simon Horman
Quoted 25 lines · Simon Horman
Quoted 15 lines · Rob Herring
set_irq_flagsis ARM specific with custom flags which have genirq equivalents. Convert drivers to use the genirq interfaces directly, so we can kill offset_irq_flags. The translation of flags is as follows:
IRQF_VALID-> !IRQ_NOREQUESTIRQF_PROBE-> !IRQ_NOPROBEIRQF_NOAUTOEN->IRQ_NOAUTOENFor IRQs managed by an irqdomain, the irqdomain core code handles clearing and setting
IRQ_NOREQUESTalready, so there is no need to do this in .map() functions and we can simply remove theset_irq_flagscalls. Some users also setIRQ_NOPROBEand 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.Quoted 4 lines
Signed-off-by Rob Herring <[email protected]>Cc Simon Horman <[email protected]>Cc Magnus Damm <[email protected]>Cc linux-sh at vger.kernel.orgI am trusting the description above coupled with the comments in the original code (that this patch removes). Assuming those ducks are aligned:
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Acked-by Simon Horman <[email protected]>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_flagsfrom ARM, so I plan to send the whole series to arm-soc.
Thanks, that is fine by me.
Quoted 43 lines
Quoted 2 lines
Also, a very minor nit, the prefix for patches to this file is usually 'sh:' rather than 'SH:'.
Okay, will fix-up.
Rob
Quoted 35 lines
Quoted 35 lines
Quoted 28 lines
--- drivers/sh/intc/internals.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)drivers/sh/intc/internals.h +1
-10@@ -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) --Quoted 2 lines
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
PATCH 13/15 tty/serial: kill off set_irq_flags usage
In reply to Rob Herringset_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_NOREQUESTIRQF_PROBE -> !IRQ_NOPROBEIRQF_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.
--- drivers/tty/serial/serial_ks8695.c | 2 +- drivers/tty/serial/sirfsoc_uart.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/tty/serial/serial_ks8695.c +1 -1
@@ -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 );
drivers/tty/serial/sirfsoc_uart.c +3 -3
@@ -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);
Signature · 1 line
2.1.0
PATCH 14/15 ARM: remove ununsed set_irq_flags
In reply to Rob HerringNow that all users of set_irq_flags and custom flags are converted to genirq functions, the ARM specific set_irq_flags can be removed.
--- arch/arm/include/asm/hw_irq.h | 6 ------ arch/arm/kernel/irq.c | 20 -------------------- 2 files changed, 26 deletions(-)
arch/arm/include/asm/hw_irq.h +0 -6
@@ -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
arch/arm/kernel/irq.c +0 -20
@@ -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;
Signature · 1 line
2.1.0
PATCH 15/15 arm64: remove ununsed set_irq_flags
In reply to Rob HerringNow that all users of set_irq_flags and custom flags are converted to genirq functions, the ARM specific set_irq_flags can be removed.
--- arch/arm64/include/asm/hardirq.h | 5 ----- 1 file changed, 5 deletions(-)
arch/arm64/include/asm/hardirq.h +0 -5
@@ -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 */
Signature · 1 line
2.1.0
Re: [PATCH 15/15] arm64: remove ununsed set_irq_flags
Quoted 10 lines · Rob Herring
Now that all users of
set_irq_flagsand custom flags are converted to genirq functions, the ARM specificset_irq_flagscan be removed.Signed-off-by Rob Herring <[email protected]>Cc Catalin Marinas <[email protected]>Cc Will Deacon <[email protected]>Cc linux-arm-kernel at lists.infradead.org--- arch/arm64/include/asm/hardirq.h | 5 ----- 1 file changed, 5 deletions(-)
Quoted 9 lines · Rob Herring
This series converts all users of ARM specific
set_irq_flagsto use common genirq functions. In many cases where irqdomains are used, theset_irq_flagscalls 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_flagsin 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.
Signature · 2 lines
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net.
Quoted 11 lines · Russell King - ARM Linux
Quoted 9 lines · Rob Herring
This series converts all users of ARM specific
set_irq_flagsto use common genirq functions. In many cases where irqdomains are used, theset_irq_flagscalls 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_flagsin reviews. ;)
Quoted 4 lines
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)
Quoted 2 lines
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
Kevin Hilman
Tested-byQuoted 26 lines · Rob Herring
Quoted 11 lines · Russell King - ARM Linux
Quoted 9 lines · Rob Herring
This series converts all users of ARM specific
set_irq_flagsto use common genirq functions. In many cases where irqdomains are used, theset_irq_flagscalls 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_flagsin reviews. ;)Quoted 4 lines
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_FLAGSwhich I've not changed:#define
ARCH_IRQ_INIT_FLAGS(IRQ_NOREQUEST|IRQ_NOPROBE)Quoted 2 lines
Unless you can prove that this isn't the case, you shouldn't be removing this stuff, especially not from legacy platforms.
Quoted 7 lines
set_irq_flags()only does a translation from custom ARM IRQF_* flags to standard flags and then callsirq_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_FLAGSand 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 :
Kevin
[1] http://kernelci.org/boot/all/job/khilman/kernel/v4.1-rc7-15-g64b9a5c929f7/