* [PATCH v3 RESEND 0/5] Remaining part of kill off set_irq_flags usage @ 2015-08-29 23:01 Rob Herring 2015-08-29 23:01 ` [RESEND PATCH v3 1/5] gpu/drm: " Rob Herring ` (6 more replies) 0 siblings, 7 replies; 12+ messages in thread From: Rob Herring @ 2015-08-29 23:01 UTC (permalink / raw) To: linux-arm-kernel Thomas, As requested, here are the remaining patches for killing off set_irq_flags which have not been picked up. The rest of the series has been picked up and are in -next. Rob Rob Herring (5): gpu/drm: kill off set_irq_flags usage irqchip: kill off set_irq_flags usage sh: kill off set_irq_flags usage ARM: remove ununsed set_irq_flags arm64: remove ununsed set_irq_flags arch/arm/include/asm/hw_irq.h | 6 ------ arch/arm/kernel/irq.c | 20 -------------------- arch/arm64/include/asm/hardirq.h | 5 ----- 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/sh/intc/internals.h | 10 +--------- 24 files changed, 20 insertions(+), 81 deletions(-) -- 2.1.4 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [RESEND PATCH v3 1/5] gpu/drm: kill off set_irq_flags usage 2015-08-29 23:01 [PATCH v3 RESEND 0/5] Remaining part of kill off set_irq_flags usage Rob Herring @ 2015-08-29 23:01 ` Rob Herring 2015-08-29 23:01 ` [RESEND PATCH v3 2/5] irqchip: " Rob Herring ` (5 subsequent siblings) 6 siblings, 0 replies; 12+ messages in thread From: Rob Herring @ 2015-08-29 23:01 UTC (permalink / raw) To: linux-arm-kernel set_irq_flags is ARM specific with custom flags which have genirq equivalents. Convert drivers to use the genirq interfaces directly, so we can kill off set_irq_flags. The translation of flags is as follows: IRQF_VALID -> !IRQ_NOREQUEST IRQF_PROBE -> !IRQ_NOPROBE IRQF_NOAUTOEN -> IRQ_NOAUTOEN For IRQs managed by an irqdomain, the irqdomain core code handles clearing and setting IRQ_NOREQUEST already, so there is no need to do this in .map() functions and we can simply remove the set_irq_flags calls. Some users also modify IRQ_NOPROBE and this has been maintained although it is not clear that is really needed. There appears to be a great deal of blind copy and paste of this code. Signed-off-by: Rob Herring <robh@kernel.org> Cc: David Airlie <airlied@linux.ie> Cc: dri-devel at lists.freedesktop.org --- drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c | 1 - drivers/gpu/ipu-v3/ipu-common.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c index 33bd4c6..9a6a747 100644 --- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c +++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c @@ -165,7 +165,6 @@ static int mdp5_hw_irqdomain_map(struct irq_domain *d, irq_set_chip_and_handler(irq, &mdp5_hw_irq_chip, handle_level_irq); irq_set_chip_data(irq, mdp5_kms); - set_irq_flags(irq, IRQF_VALID); return 0; } diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c index 00f2058..4ac9e05 100644 --- a/drivers/gpu/ipu-v3/ipu-common.c +++ b/drivers/gpu/ipu-v3/ipu-common.c @@ -1099,8 +1099,7 @@ static int ipu_irq_init(struct ipu_soc *ipu) } ret = irq_alloc_domain_generic_chips(ipu->domain, 32, 1, "IPU", - handle_level_irq, 0, - IRQF_VALID, 0); + handle_level_irq, 0, 0, 0); if (ret < 0) { dev_err(ipu->dev, "failed to alloc generic irq chips\n"); irq_domain_remove(ipu->domain); -- 2.1.4 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [RESEND PATCH v3 2/5] irqchip: kill off set_irq_flags usage 2015-08-29 23:01 [PATCH v3 RESEND 0/5] Remaining part of kill off set_irq_flags usage Rob Herring 2015-08-29 23:01 ` [RESEND PATCH v3 1/5] gpu/drm: " Rob Herring @ 2015-08-29 23:01 ` Rob Herring 2015-08-29 23:01 ` [RESEND PATCH v3 3/5] sh: " Rob Herring ` (4 subsequent siblings) 6 siblings, 0 replies; 12+ messages in thread From: Rob Herring @ 2015-08-29 23:01 UTC (permalink / raw) To: linux-arm-kernel set_irq_flags is ARM specific with custom flags which have genirq equivalents. Convert drivers to use the genirq interfaces directly, so we can kill off set_irq_flags. The translation of flags is as follows: IRQF_VALID -> !IRQ_NOREQUEST IRQF_PROBE -> !IRQ_NOPROBE IRQF_NOAUTOEN -> IRQ_NOAUTOEN For IRQs managed by an irqdomain, the irqdomain core code handles clearing and setting IRQ_NOREQUEST already, so there is no need to do this in .map() functions and we can simply remove the set_irq_flags calls. Some users also modify IRQ_NOPROBE and this has been maintained although it is not clear that is really needed. There appears to be a great deal of blind copy and paste of this code. Signed-off-by: Rob Herring <robh@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Jason Cooper <jason@lakedaemon.net> Cc: Kukjin Kim <kgene@kernel.org> Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com> Cc: Stephen Warren <swarren@wwwdotorg.org> Cc: Lee Jones <lee@kernel.org> Cc: Alexander Shiyan <shc_work@mail.ru> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Cc: linux-arm-kernel at lists.infradead.org Cc: linux-samsung-soc at vger.kernel.org Cc: linux-rpi-kernel at lists.infradead.org --- drivers/irqchip/exynos-combiner.c | 2 +- drivers/irqchip/irq-armada-370-xp.c | 3 +-- drivers/irqchip/irq-bcm2835.c | 2 +- drivers/irqchip/irq-clps711x.c | 6 +++--- drivers/irqchip/irq-gic-v3.c | 5 ++--- drivers/irqchip/irq-gic.c | 4 ++-- drivers/irqchip/irq-hip04.c | 4 ++-- drivers/irqchip/irq-keystone.c | 2 +- drivers/irqchip/irq-mmp.c | 3 --- drivers/irqchip/irq-mxs.c | 1 - drivers/irqchip/irq-renesas-intc-irqpin.c | 1 - drivers/irqchip/irq-renesas-irqc.c | 1 - drivers/irqchip/irq-s3c24xx.c | 14 ++------------ drivers/irqchip/irq-sun4i.c | 2 +- drivers/irqchip/irq-versatile-fpga.c | 2 +- drivers/irqchip/irq-vic.c | 2 +- drivers/irqchip/irq-vt8500.c | 1 - drivers/irqchip/spear-shirq.c | 1 - 18 files changed, 18 insertions(+), 38 deletions(-) diff --git a/drivers/irqchip/exynos-combiner.c b/drivers/irqchip/exynos-combiner.c index 5c82e3b..a62cfd3 100644 --- a/drivers/irqchip/exynos-combiner.c +++ b/drivers/irqchip/exynos-combiner.c @@ -165,7 +165,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_probe(irq); return 0; } diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c index 0d3b0fe..017f881 100644 --- a/drivers/irqchip/irq-armada-370-xp.c +++ b/drivers/irqchip/irq-armada-370-xp.c @@ -201,7 +201,6 @@ static int armada_370_xp_msi_map(struct irq_domain *domain, unsigned int virq, { irq_set_chip_and_handler(virq, &armada_370_xp_msi_irq_chip, handle_simple_irq); - set_irq_flags(virq, IRQF_VALID); return 0; } @@ -318,7 +317,7 @@ static int armada_370_xp_mpic_irq_map(struct irq_domain *h, irq_set_chip_and_handler(virq, &armada_370_xp_irq_chip, handle_level_irq); } - set_irq_flags(virq, IRQF_VALID | IRQF_PROBE); + irq_set_probe(virq); return 0; } diff --git a/drivers/irqchip/irq-bcm2835.c b/drivers/irqchip/irq-bcm2835.c index e68c3b6..9c4ba16 100644 --- a/drivers/irqchip/irq-bcm2835.c +++ b/drivers/irqchip/irq-bcm2835.c @@ -165,7 +165,7 @@ static int __init armctrl_of_init(struct device_node *node, BUG_ON(irq <= 0); irq_set_chip_and_handler(irq, &armctrl_chip, handle_level_irq); - set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); + irq_set_probe(irq); } } diff --git a/drivers/irqchip/irq-clps711x.c b/drivers/irqchip/irq-clps711x.c index 33127f1..2e74e81 100644 --- a/drivers/irqchip/irq-clps711x.c +++ b/drivers/irqchip/irq-clps711x.c @@ -133,14 +133,14 @@ static int __init clps711x_intc_irq_map(struct irq_domain *h, unsigned int virq, irq_hw_number_t hw) { irq_flow_handler_t handler = handle_level_irq; - unsigned int flags = IRQF_VALID | IRQF_PROBE; + unsigned int flags = 0; if (!clps711x_irqs[hw].flags) return 0; if (clps711x_irqs[hw].flags & CLPS711X_FLAG_FIQ) { handler = handle_bad_irq; - flags |= IRQF_NOAUTOEN; + flags |= IRQ_NOAUTOEN; } else if (clps711x_irqs[hw].eoi) { handler = handle_fasteoi_irq; } @@ -150,7 +150,7 @@ static int __init clps711x_intc_irq_map(struct irq_domain *h, unsigned int virq, writel_relaxed(0, clps711x_intc->base + clps711x_irqs[hw].eoi); irq_set_chip_and_handler(virq, &clps711x_intc_chip, handler); - set_irq_flags(virq, flags); + irq_modify_status(virq, IRQ_NOPROBE, flags); return 0; } diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c index c52f7ba..16f9028 100644 --- a/drivers/irqchip/irq-gic-v3.c +++ b/drivers/irqchip/irq-gic-v3.c @@ -681,13 +681,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) { @@ -695,7 +695,6 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq, return -EPERM; irq_domain_set_info(d, irq, hw, &gic_chip, d->host_data, handle_fasteoi_irq, NULL, NULL); - set_irq_flags(irq, IRQF_VALID); } return 0; diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c index 4dd8826..d6a1ba1 100644 --- a/drivers/irqchip/irq-gic.c +++ b/drivers/irqchip/irq-gic.c @@ -793,11 +793,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_probe(irq); } return 0; } diff --git a/drivers/irqchip/irq-hip04.c b/drivers/irqchip/irq-hip04.c index 0cae45d..469fba6 100644 --- a/drivers/irqchip/irq-hip04.c +++ b/drivers/irqchip/irq-hip04.c @@ -305,11 +305,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_probe(irq); } irq_set_chip_data(irq, d->host_data); return 0; diff --git a/drivers/irqchip/irq-keystone.c b/drivers/irqchip/irq-keystone.c index 81e3cf5..e7090ec 100644 --- a/drivers/irqchip/irq-keystone.c +++ b/drivers/irqchip/irq-keystone.c @@ -127,7 +127,7 @@ static int keystone_irq_map(struct irq_domain *h, unsigned int virq, irq_set_chip_data(virq, kirq); irq_set_chip_and_handler(virq, &kirq->chip, handle_level_irq); - set_irq_flags(virq, IRQF_VALID | IRQF_PROBE); + irq_set_probe(virq); return 0; } diff --git a/drivers/irqchip/irq-mmp.c b/drivers/irqchip/irq-mmp.c index c0da57b..3dfef63 100644 --- a/drivers/irqchip/irq-mmp.c +++ b/drivers/irqchip/irq-mmp.c @@ -164,7 +164,6 @@ static int mmp_irq_domain_map(struct irq_domain *d, unsigned int irq, irq_hw_number_t hw) { irq_set_chip_and_handler(irq, &icu_irq_chip, handle_level_irq); - set_irq_flags(irq, IRQF_VALID); return 0; } @@ -234,7 +233,6 @@ void __init icu_init_irq(void) for (irq = 0; irq < 64; irq++) { icu_mask_irq(irq_get_irq_data(irq)); irq_set_chip_and_handler(irq, &icu_irq_chip, handle_level_irq); - set_irq_flags(irq, IRQF_VALID); } irq_set_default_host(icu_data[0].domain); set_handle_irq(mmp_handle_irq); @@ -337,7 +335,6 @@ void __init mmp2_init_icu(void) irq_set_chip_and_handler(irq, &icu_irq_chip, handle_level_irq); } - set_irq_flags(irq, IRQF_VALID); } irq_set_default_host(icu_data[0].domain); set_handle_irq(mmp2_handle_irq); diff --git a/drivers/irqchip/irq-mxs.c b/drivers/irqchip/irq-mxs.c index 04bf97b..ffe85d6 100644 --- a/drivers/irqchip/irq-mxs.c +++ b/drivers/irqchip/irq-mxs.c @@ -85,7 +85,6 @@ static int icoll_irq_domain_map(struct irq_domain *d, unsigned int virq, irq_hw_number_t hw) { irq_set_chip_and_handler(virq, &mxs_icoll_chip, handle_level_irq); - set_irq_flags(virq, IRQF_VALID); return 0; } diff --git a/drivers/irqchip/irq-renesas-intc-irqpin.c b/drivers/irqchip/irq-renesas-intc-irqpin.c index 0670ab4..20a86de 100644 --- a/drivers/irqchip/irq-renesas-intc-irqpin.c +++ b/drivers/irqchip/irq-renesas-intc-irqpin.c @@ -343,7 +343,6 @@ static int intc_irqpin_irq_domain_map(struct irq_domain *h, unsigned int virq, intc_irqpin_dbg(&p->irq[hw], "map"); irq_set_chip_data(virq, h->host_data); irq_set_chip_and_handler(virq, &p->irq_chip, handle_level_irq); - set_irq_flags(virq, IRQF_VALID); /* kill me now */ return 0; } diff --git a/drivers/irqchip/irq-renesas-irqc.c b/drivers/irqchip/irq-renesas-irqc.c index 778bd07..74e980f 100644 --- a/drivers/irqchip/irq-renesas-irqc.c +++ b/drivers/irqchip/irq-renesas-irqc.c @@ -162,7 +162,6 @@ static int irqc_irq_domain_map(struct irq_domain *h, unsigned int virq, irqc_dbg(&p->irq[hw], "map"); irq_set_chip_data(virq, h->host_data); irq_set_chip_and_handler(virq, &p->irq_chip, handle_level_irq); - set_irq_flags(virq, IRQF_VALID); /* kill me now */ return 0; } diff --git a/drivers/irqchip/irq-s3c24xx.c b/drivers/irqchip/irq-s3c24xx.c index e96717f..19d1fc4 100644 --- a/drivers/irqchip/irq-s3c24xx.c +++ b/drivers/irqchip/irq-s3c24xx.c @@ -469,13 +469,11 @@ static int s3c24xx_irq_map(struct irq_domain *h, unsigned int virq, irq_set_chip_data(virq, irq_data); - set_irq_flags(virq, IRQF_VALID); - if (parent_intc && irq_data->type != S3C_IRQTYPE_NONE) { if (irq_data->parent_irq > 31) { pr_err("irq-s3c24xx: parent irq %lu is out of range\n", irq_data->parent_irq); - goto err; + return -EINVAL; } parent_irq_data = &parent_intc->irqs[irq_data->parent_irq]; @@ -488,18 +486,12 @@ static int s3c24xx_irq_map(struct irq_domain *h, unsigned int virq, if (!irqno) { pr_err("irq-s3c24xx: could not find mapping for parent irq %lu\n", irq_data->parent_irq); - goto err; + return -EINVAL; } irq_set_chained_handler(irqno, s3c_irq_demux); } return 0; - -err: - set_irq_flags(virq, 0); - - /* the only error can result from bad mapping data*/ - return -EINVAL; } static const struct irq_domain_ops s3c24xx_irq_ops = { @@ -1177,8 +1169,6 @@ static int s3c24xx_irq_map_of(struct irq_domain *h, unsigned int virq, irq_set_chip_data(virq, irq_data); - set_irq_flags(virq, IRQF_VALID); - return 0; } diff --git a/drivers/irqchip/irq-sun4i.c b/drivers/irqchip/irq-sun4i.c index 83d6aa6..f1f401c 100644 --- a/drivers/irqchip/irq-sun4i.c +++ b/drivers/irqchip/irq-sun4i.c @@ -84,7 +84,7 @@ static int sun4i_irq_map(struct irq_domain *d, unsigned int virq, irq_hw_number_t hw) { irq_set_chip_and_handler(virq, &sun4i_irq_chip, handle_fasteoi_irq); - set_irq_flags(virq, IRQF_VALID | IRQF_PROBE); + irq_set_probe(virq); return 0; } diff --git a/drivers/irqchip/irq-versatile-fpga.c b/drivers/irqchip/irq-versatile-fpga.c index 888111b..e96b4fe 100644 --- a/drivers/irqchip/irq-versatile-fpga.c +++ b/drivers/irqchip/irq-versatile-fpga.c @@ -128,7 +128,7 @@ static int fpga_irqdomain_map(struct irq_domain *d, unsigned int irq, irq_set_chip_data(irq, f); irq_set_chip_and_handler(irq, &f->chip, handle_level_irq); - set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); + irq_set_probe(irq); return 0; } diff --git a/drivers/irqchip/irq-vic.c b/drivers/irqchip/irq-vic.c index d4ce331..401561c 100644 --- a/drivers/irqchip/irq-vic.c +++ b/drivers/irqchip/irq-vic.c @@ -202,7 +202,7 @@ static int vic_irqdomain_map(struct irq_domain *d, unsigned int irq, return -EPERM; irq_set_chip_and_handler(irq, &vic_chip, handle_level_irq); irq_set_chip_data(irq, v->base); - set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); + irq_set_probe(irq); return 0; } diff --git a/drivers/irqchip/irq-vt8500.c b/drivers/irqchip/irq-vt8500.c index 0b29700..8b235c9 100644 --- a/drivers/irqchip/irq-vt8500.c +++ b/drivers/irqchip/irq-vt8500.c @@ -168,7 +168,6 @@ static int vt8500_irq_map(struct irq_domain *h, unsigned int virq, irq_hw_number_t hw) { irq_set_chip_and_handler(virq, &vt8500_irq_chip, handle_level_irq); - set_irq_flags(virq, IRQF_VALID); return 0; } diff --git a/drivers/irqchip/spear-shirq.c b/drivers/irqchip/spear-shirq.c index acb721b..e2b4e99 100644 --- a/drivers/irqchip/spear-shirq.c +++ b/drivers/irqchip/spear-shirq.c @@ -212,7 +212,6 @@ static void __init spear_shirq_register(struct spear_shirq *shirq, for (i = 0; i < shirq->nr_irqs; i++) { irq_set_chip_and_handler(shirq->virq_base + i, shirq->irq_chip, handle_simple_irq); - set_irq_flags(shirq->virq_base + i, IRQF_VALID); irq_set_chip_data(shirq->virq_base + i, shirq); } } -- 2.1.4 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [RESEND PATCH v3 3/5] sh: kill off set_irq_flags usage 2015-08-29 23:01 [PATCH v3 RESEND 0/5] Remaining part of kill off set_irq_flags usage Rob Herring 2015-08-29 23:01 ` [RESEND PATCH v3 1/5] gpu/drm: " Rob Herring 2015-08-29 23:01 ` [RESEND PATCH v3 2/5] irqchip: " Rob Herring @ 2015-08-29 23:01 ` Rob Herring 2015-08-31 5:01 ` Simon Horman 2015-08-29 23:01 ` [RESEND PATCH v3 4/5] ARM: remove ununsed set_irq_flags Rob Herring ` (3 subsequent siblings) 6 siblings, 1 reply; 12+ messages in thread From: Rob Herring @ 2015-08-29 23:01 UTC (permalink / raw) To: linux-arm-kernel set_irq_flags is ARM specific with custom flags which have genirq equivalents. Convert drivers to use the genirq interfaces directly, so we can kill off set_irq_flags. The translation of flags is as follows: IRQF_VALID -> !IRQ_NOREQUEST IRQF_PROBE -> !IRQ_NOPROBE IRQF_NOAUTOEN -> IRQ_NOAUTOEN For IRQs managed by an irqdomain, the irqdomain core code handles clearing and setting IRQ_NOREQUEST already, so there is no need to do this in .map() functions and we can simply remove the set_irq_flags calls. Some users also modify IRQ_NOPROBE and this has been maintained although it is not clear that is really needed. There appears to be a great deal of blind copy and paste of this code. Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Simon Horman <horms@verge.net.au> Cc: Magnus Damm <magnus.damm@gmail.com> Cc: linux-sh at vger.kernel.org --- drivers/sh/intc/internals.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h index 7dff08e..6ce7f0d 100644 --- a/drivers/sh/intc/internals.h +++ b/drivers/sh/intc/internals.h @@ -99,15 +99,7 @@ static inline struct intc_desc_int *get_intc_desc(unsigned int irq) */ static inline void activate_irq(int irq) { -#ifdef CONFIG_ARM - /* ARM requires an extra step to clear IRQ_NOREQUEST, which it - * sets on behalf of every irq_chip. Also sets IRQ_NOPROBE. - */ - set_irq_flags(irq, IRQF_VALID); -#else - /* same effect on other architectures */ - irq_set_noprobe(irq); -#endif + irq_modify_status(irq, IRQ_NOREQUEST, IRQ_NOPROBE); } static inline int intc_handle_int_cmp(const void *a, const void *b) -- 2.1.4 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [RESEND PATCH v3 3/5] sh: kill off set_irq_flags usage 2015-08-29 23:01 ` [RESEND PATCH v3 3/5] sh: " Rob Herring @ 2015-08-31 5:01 ` Simon Horman 2015-08-31 12:52 ` Rob Herring 0 siblings, 1 reply; 12+ messages in thread From: Simon Horman @ 2015-08-31 5:01 UTC (permalink / raw) To: linux-arm-kernel Hi Rob, On Sat, Aug 29, 2015 at 06:01:23PM -0500, Rob Herring wrote: > set_irq_flags is ARM specific with custom flags which have genirq > equivalents. Convert drivers to use the genirq interfaces directly, so we > can kill off set_irq_flags. The translation of flags is as follows: > > IRQF_VALID -> !IRQ_NOREQUEST > IRQF_PROBE -> !IRQ_NOPROBE > IRQF_NOAUTOEN -> IRQ_NOAUTOEN > > For IRQs managed by an irqdomain, the irqdomain core code handles clearing > and setting IRQ_NOREQUEST already, so there is no need to do this in > .map() functions and we can simply remove the set_irq_flags calls. Some > users also modify IRQ_NOPROBE and this has been maintained although it > is not clear that is really needed. There appears to be a great deal of > blind copy and paste of this code. > > Signed-off-by: Rob Herring <robh@kernel.org> > Acked-by: Simon Horman <horms@verge.net.au> > Cc: Magnus Damm <magnus.damm@gmail.com> > Cc: linux-sh at vger.kernel.org I have queued this up. Please let me know if that was not your intent. The patch is queued up in the sh-drivers-for-v4.3 branch of my renesas tree. At this point I plan to send a pull-request once dt changes that other patches in that branch depend on hit Linus's tree via the ARM SoC tree. I anticipate that being during the rc1 or rc2 timeframe. ^ permalink raw reply [flat|nested] 12+ messages in thread
* [RESEND PATCH v3 3/5] sh: kill off set_irq_flags usage 2015-08-31 5:01 ` Simon Horman @ 2015-08-31 12:52 ` Rob Herring 2015-09-01 1:09 ` Simon Horman 0 siblings, 1 reply; 12+ messages in thread From: Rob Herring @ 2015-08-31 12:52 UTC (permalink / raw) To: linux-arm-kernel On Mon, Aug 31, 2015 at 12:01 AM, Simon Horman <horms@verge.net.au> wrote: > Hi Rob, > > On Sat, Aug 29, 2015 at 06:01:23PM -0500, Rob Herring wrote: >> set_irq_flags is ARM specific with custom flags which have genirq >> equivalents. Convert drivers to use the genirq interfaces directly, so we >> can kill off set_irq_flags. The translation of flags is as follows: >> >> IRQF_VALID -> !IRQ_NOREQUEST >> IRQF_PROBE -> !IRQ_NOPROBE >> IRQF_NOAUTOEN -> IRQ_NOAUTOEN >> >> For IRQs managed by an irqdomain, the irqdomain core code handles clearing >> and setting IRQ_NOREQUEST already, so there is no need to do this in >> .map() functions and we can simply remove the set_irq_flags calls. Some >> users also modify IRQ_NOPROBE and this has been maintained although it >> is not clear that is really needed. There appears to be a great deal of >> blind copy and paste of this code. >> >> Signed-off-by: Rob Herring <robh@kernel.org> >> Acked-by: Simon Horman <horms@verge.net.au> >> Cc: Magnus Damm <magnus.damm@gmail.com> >> Cc: linux-sh at vger.kernel.org > > I have queued this up. Please let me know if that was not your intent. > > The patch is queued up in the sh-drivers-for-v4.3 branch of my renesas tree. > At this point I plan to send a pull-request once dt changes that other > patches in that branch depend on hit Linus's tree via the ARM SoC tree. > I anticipate that being during the rc1 or rc2 timeframe. This needs to go in before -rc1 so the final 2 patches removing set_irq_flags can go in at the end of the merge window. Given your timeline, I think you can just leave this one for Thomas to apply with those 2. Rob ^ permalink raw reply [flat|nested] 12+ messages in thread
* [RESEND PATCH v3 3/5] sh: kill off set_irq_flags usage 2015-08-31 12:52 ` Rob Herring @ 2015-09-01 1:09 ` Simon Horman 0 siblings, 0 replies; 12+ messages in thread From: Simon Horman @ 2015-09-01 1:09 UTC (permalink / raw) To: linux-arm-kernel On Mon, Aug 31, 2015 at 07:52:07AM -0500, Rob Herring wrote: > On Mon, Aug 31, 2015 at 12:01 AM, Simon Horman <horms@verge.net.au> wrote: > > Hi Rob, > > > > On Sat, Aug 29, 2015 at 06:01:23PM -0500, Rob Herring wrote: > >> set_irq_flags is ARM specific with custom flags which have genirq > >> equivalents. Convert drivers to use the genirq interfaces directly, so we > >> can kill off set_irq_flags. The translation of flags is as follows: > >> > >> IRQF_VALID -> !IRQ_NOREQUEST > >> IRQF_PROBE -> !IRQ_NOPROBE > >> IRQF_NOAUTOEN -> IRQ_NOAUTOEN > >> > >> For IRQs managed by an irqdomain, the irqdomain core code handles clearing > >> and setting IRQ_NOREQUEST already, so there is no need to do this in > >> .map() functions and we can simply remove the set_irq_flags calls. Some > >> users also modify IRQ_NOPROBE and this has been maintained although it > >> is not clear that is really needed. There appears to be a great deal of > >> blind copy and paste of this code. > >> > >> Signed-off-by: Rob Herring <robh@kernel.org> > >> Acked-by: Simon Horman <horms@verge.net.au> > >> Cc: Magnus Damm <magnus.damm@gmail.com> > >> Cc: linux-sh at vger.kernel.org > > > > I have queued this up. Please let me know if that was not your intent. > > > > The patch is queued up in the sh-drivers-for-v4.3 branch of my renesas tree. > > At this point I plan to send a pull-request once dt changes that other > > patches in that branch depend on hit Linus's tree via the ARM SoC tree. > > I anticipate that being during the rc1 or rc2 timeframe. > > This needs to go in before -rc1 so the final 2 patches removing > set_irq_flags can go in at the end of the merge window. Given your > timeline, I think you can just leave this one for Thomas to apply with > those 2. Sure, will do. ^ permalink raw reply [flat|nested] 12+ messages in thread
* [RESEND PATCH v3 4/5] ARM: remove ununsed set_irq_flags 2015-08-29 23:01 [PATCH v3 RESEND 0/5] Remaining part of kill off set_irq_flags usage Rob Herring ` (2 preceding siblings ...) 2015-08-29 23:01 ` [RESEND PATCH v3 3/5] sh: " Rob Herring @ 2015-08-29 23:01 ` Rob Herring 2015-08-29 23:01 ` [RESEND PATCH v3 5/5] arm64: " Rob Herring ` (2 subsequent siblings) 6 siblings, 0 replies; 12+ messages in thread From: Rob Herring @ 2015-08-29 23:01 UTC (permalink / raw) To: linux-arm-kernel Now that all users of set_irq_flags and custom flags are converted to genirq functions, the ARM specific set_irq_flags can be removed. Signed-off-by: Rob Herring <robh@kernel.org> Cc: Russell King <linux@arm.linux.org.uk> Cc: linux-arm-kernel at lists.infradead.org Tested-by: Kevin Hilman <khilman@linaro.org> --- arch/arm/include/asm/hw_irq.h | 6 ------ arch/arm/kernel/irq.c | 20 -------------------- 2 files changed, 26 deletions(-) diff --git a/arch/arm/include/asm/hw_irq.h b/arch/arm/include/asm/hw_irq.h index af79da4..9beb929 100644 --- a/arch/arm/include/asm/hw_irq.h +++ b/arch/arm/include/asm/hw_irq.h @@ -11,12 +11,6 @@ static inline void ack_bad_irq(int irq) pr_crit("unexpected IRQ trap at vector %02x\n", irq); } -void set_irq_flags(unsigned int irq, unsigned int flags); - -#define IRQF_VALID (1 << 0) -#define IRQF_PROBE (1 << 1) -#define IRQF_NOAUTOEN (1 << 2) - #define ARCH_IRQ_INIT_FLAGS (IRQ_NOREQUEST | IRQ_NOPROBE) #endif diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 350f188..4072266 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c @@ -78,26 +78,6 @@ asm_do_IRQ(unsigned int irq, struct pt_regs *regs) handle_IRQ(irq, regs); } -void set_irq_flags(unsigned int irq, unsigned int iflags) -{ - unsigned long clr = 0, set = IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN; - - if (irq >= nr_irqs) { - pr_err("Trying to set irq flags for IRQ%d\n", irq); - return; - } - - if (iflags & IRQF_VALID) - clr |= IRQ_NOREQUEST; - if (iflags & IRQF_PROBE) - clr |= IRQ_NOPROBE; - if (!(iflags & IRQF_NOAUTOEN)) - clr |= IRQ_NOAUTOEN; - /* Order is clear bits in "clr" then set bits in "set" */ - irq_modify_status(irq, clr, set & ~clr); -} -EXPORT_SYMBOL_GPL(set_irq_flags); - void __init init_IRQ(void) { int ret; -- 2.1.4 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [RESEND PATCH v3 5/5] arm64: remove ununsed set_irq_flags 2015-08-29 23:01 [PATCH v3 RESEND 0/5] Remaining part of kill off set_irq_flags usage Rob Herring ` (3 preceding siblings ...) 2015-08-29 23:01 ` [RESEND PATCH v3 4/5] ARM: remove ununsed set_irq_flags Rob Herring @ 2015-08-29 23:01 ` Rob Herring 2015-08-31 14:13 ` [PATCH v3 RESEND 0/5] Remaining part of kill off set_irq_flags usage Thomas Gleixner 2015-09-16 14:12 ` Rob Herring 6 siblings, 0 replies; 12+ messages in thread From: Rob Herring @ 2015-08-29 23:01 UTC (permalink / raw) To: linux-arm-kernel Now that all users of set_irq_flags and custom flags are converted to genirq functions, the ARM specific set_irq_flags can be removed. Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: linux-arm-kernel at lists.infradead.org --- arch/arm64/include/asm/hardirq.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/arch/arm64/include/asm/hardirq.h b/arch/arm64/include/asm/hardirq.h index 6aae421..1679d22 100644 --- a/arch/arm64/include/asm/hardirq.h +++ b/arch/arm64/include/asm/hardirq.h @@ -47,9 +47,4 @@ static inline void ack_bad_irq(unsigned int irq) irq_err_count++; } -/* - * No arch-specific IRQ flags. - */ -#define set_irq_flags(irq, flags) - #endif /* __ASM_HARDIRQ_H */ -- 2.1.4 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v3 RESEND 0/5] Remaining part of kill off set_irq_flags usage 2015-08-29 23:01 [PATCH v3 RESEND 0/5] Remaining part of kill off set_irq_flags usage Rob Herring ` (4 preceding siblings ...) 2015-08-29 23:01 ` [RESEND PATCH v3 5/5] arm64: " Rob Herring @ 2015-08-31 14:13 ` Thomas Gleixner 2015-09-16 14:12 ` Rob Herring 6 siblings, 0 replies; 12+ messages in thread From: Thomas Gleixner @ 2015-08-31 14:13 UTC (permalink / raw) To: linux-arm-kernel On Sat, 29 Aug 2015, Rob Herring wrote: > Thomas, > > As requested, here are the remaining patches for killing off > set_irq_flags which have not been picked up. The rest of the > series has been picked up and are in -next. I pick it up, stick it into tip irq/urgent let it brew for a couple of days in next and send it to Linus after that. Thanks, tglx ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v3 RESEND 0/5] Remaining part of kill off set_irq_flags usage 2015-08-29 23:01 [PATCH v3 RESEND 0/5] Remaining part of kill off set_irq_flags usage Rob Herring ` (5 preceding siblings ...) 2015-08-31 14:13 ` [PATCH v3 RESEND 0/5] Remaining part of kill off set_irq_flags usage Thomas Gleixner @ 2015-09-16 14:12 ` Rob Herring 2015-09-16 14:15 ` Thomas Gleixner 6 siblings, 1 reply; 12+ messages in thread From: Rob Herring @ 2015-09-16 14:12 UTC (permalink / raw) To: linux-arm-kernel On 08/29/2015 06:01 PM, Rob Herring wrote: > Thomas, > > As requested, here are the remaining patches for killing off > set_irq_flags which have not been picked up. The rest of the > series has been picked up and are in -next. Thomas, are you going to pick up these remaining patches? Rob > > Rob > > Rob Herring (5): > gpu/drm: kill off set_irq_flags usage > irqchip: kill off set_irq_flags usage > sh: kill off set_irq_flags usage > ARM: remove ununsed set_irq_flags > arm64: remove ununsed set_irq_flags > > arch/arm/include/asm/hw_irq.h | 6 ------ > arch/arm/kernel/irq.c | 20 -------------------- > arch/arm64/include/asm/hardirq.h | 5 ----- > 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/sh/intc/internals.h | 10 +--------- > 24 files changed, 20 insertions(+), 81 deletions(-) > ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v3 RESEND 0/5] Remaining part of kill off set_irq_flags usage 2015-09-16 14:12 ` Rob Herring @ 2015-09-16 14:15 ` Thomas Gleixner 0 siblings, 0 replies; 12+ messages in thread From: Thomas Gleixner @ 2015-09-16 14:15 UTC (permalink / raw) To: linux-arm-kernel On Wed, 16 Sep 2015, Rob Herring wrote: > On 08/29/2015 06:01 PM, Rob Herring wrote: > > Thomas, > > > > As requested, here are the remaining patches for killing off > > set_irq_flags which have not been picked up. The rest of the > > series has been picked up and are in -next. > > Thomas, are you going to pick up these remaining patches? Yes. I'm going to push them out later today. ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2015-09-16 14:15 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-08-29 23:01 [PATCH v3 RESEND 0/5] Remaining part of kill off set_irq_flags usage Rob Herring 2015-08-29 23:01 ` [RESEND PATCH v3 1/5] gpu/drm: " Rob Herring 2015-08-29 23:01 ` [RESEND PATCH v3 2/5] irqchip: " Rob Herring 2015-08-29 23:01 ` [RESEND PATCH v3 3/5] sh: " Rob Herring 2015-08-31 5:01 ` Simon Horman 2015-08-31 12:52 ` Rob Herring 2015-09-01 1:09 ` Simon Horman 2015-08-29 23:01 ` [RESEND PATCH v3 4/5] ARM: remove ununsed set_irq_flags Rob Herring 2015-08-29 23:01 ` [RESEND PATCH v3 5/5] arm64: " Rob Herring 2015-08-31 14:13 ` [PATCH v3 RESEND 0/5] Remaining part of kill off set_irq_flags usage Thomas Gleixner 2015-09-16 14:12 ` Rob Herring 2015-09-16 14:15 ` Thomas Gleixner
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).