Remaining part of kill off set_irq_flags usage
Subsystems (16)
v3 cover Remaining part of kill off set_irq_flags usage
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(-)
Signature · 1 line
2.1.4
PATCH RESEND v3 1/5 gpu/drm: 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 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.
--- 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.4
PATCH RESEND v3 2/5 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 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.
--- 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
@@ -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 ; }
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_probe (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_probe (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 (virq,IRQ_NOPROBE , flags);return 0 ; }
drivers/irqchip/irq-gic-v3.c +2 -3
@@ -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 ;
drivers/irqchip/irq-gic.c +2 -2
@@ -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 ; }
drivers/irqchip/irq-hip04.c +2 -2
@@ -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 ;
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_probe (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
@@ -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 ; }
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 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 ; }
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_probe (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_probe (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_probe (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
@@ -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); } }
Signature · 1 line
2.1.4
tip-bot for Rob Herring
merge bot[tip:irq/urgent] irqchip: Kill off set_irq_flags usage
irqchip: Kill off set_irq_flags usage
Commit-ID: d17cab4451df1f25f3a46369e0aaeaa18390fa6b Gitweb: http://git.kernel.org/tip/d17cab4451df1f25f3a46369e0aaeaa18390fa6b Author: Rob Herring <[email protected]> AuthorDate: Sat, 29 Aug 2015 18:01:22 -0500 Committer: Thomas Gleixner <[email protected]> CommitDate: Wed, 16 Sep 2015 16:53:38 +0200
irqchip: 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 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.
--- 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-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 - 17 files changed, 18 insertions(+), 37 deletions(-)
drivers/irqchip/exynos-combiner.c +1 -1
@@ -163,7 +163,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 ; }
drivers/irqchip/irq-armada-370-xp.c +1 -2
@@ -200,7 +200,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 ; }
@@ -317,7 +316,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 ; }
drivers/irqchip/irq-bcm2835.c +1 -1
@@ -166,7 +166,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); } }
drivers/irqchip/irq-clps711x.c +3 -3
@@ -132,14 +132,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; }
@@ -149,7 +149,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 ; }
drivers/irqchip/irq-gic-v3.c +2 -3
@@ -752,13 +752,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, 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, 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 ) {
@@ -766,7 +766,6 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq,return -EPERM ;irq_domain_set_info (d, irq, hw, chip, d->host_data, handle_fasteoi_irq,NULL ,NULL ); -set_irq_flags (irq,IRQF_VALID ); }return 0 ;
drivers/irqchip/irq-gic.c +2 -2
@@ -890,11 +890,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, 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, chip, d->host_data, handle_fasteoi_irq,NULL ,NULL ); -set_irq_flags (irq,IRQF_VALID |IRQF_PROBE ); +irq_set_probe (irq); }return 0 ; }
drivers/irqchip/irq-hip04.c +2 -2
@@ -307,11 +307,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 ;
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_probe (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
@@ -84,7 +84,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
@@ -353,7 +353,6 @@ static int intc_irqpin_irq_domain_map(struct irq_domain *h, unsigned int virq,irq_set_chip_data (virq, h->host_data);irq_set_lockdep_class (virq, &intc_irqpin_irq_lock_class);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
@@ -466,13 +466,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];
@@ -485,18 +483,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 = {
@@ -1174,8 +1166,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
@@ -83,7 +83,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 ; }
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_probe (irq);return 0 ; }
drivers/irqchip/irq-vic.c +1 -1
@@ -201,7 +201,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 ; }
drivers/irqchip/irq-vt8500.c +0 -1
@@ -167,7 +167,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
@@ -211,7 +211,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); } }
PATCH RESEND v3 3/5 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 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.
--- 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_modify_status (irq,IRQ_NOREQUEST ,IRQ_NOPROBE ); }static inline int intc_handle_int_cmp (const void *a,const void *b)
Signature · 1 line
2.1.4
PATCH RESEND v3 3/5 sh: kill off set_irq_flags usage
Hi Rob,
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 modifyIRQ_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]>Acked-by Simon Horman <[email protected]>Cc Magnus Damm <[email protected]>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.
PATCH RESEND v3 3/5 sh: kill off set_irq_flags usage
Quoted 23 lines · Simon Horman
Hi Rob,
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 modifyIRQ_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]>Acked-by Simon Horman <[email protected]>Cc Magnus Damm <[email protected]>Cc linux-sh at vger.kernel.org
Quoted 6 lines
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
PATCH RESEND v3 3/5 sh: kill off set_irq_flags usage
Quoted 31 lines · Rob Herring
Quoted 23 lines · Simon Horman
Hi Rob,
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 modifyIRQ_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]>Acked-by Simon Horman <[email protected]>Cc Magnus Damm <[email protected]>Cc linux-sh at vger.kernel.orgQuoted 6 lines
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.
Quoted 4 lines
This needs to go in before -rc1 so the final 2 patches removing
set_irq_flagscan 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.
tip-bot for Rob Herring
merge bot[tip:irq/urgent] sh: Kill off set_irq_flags usage
In reply to Rob Herringsh: Kill off set_irq_flags usage
Commit-ID: 3e15135b98ecaa0228eb5dad42be7516cac38aa0 Gitweb: http://git.kernel.org/tip/3e15135b98ecaa0228eb5dad42be7516cac38aa0 Author: Rob Herring <[email protected]> AuthorDate: Sat, 29 Aug 2015 18:01:23 -0500 Committer: Thomas Gleixner <[email protected]> CommitDate: Wed, 16 Sep 2015 16:53:39 +0200
sh: 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 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.
--- 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_modify_status (irq,IRQ_NOREQUEST ,IRQ_NOPROBE ); }static inline int intc_handle_int_cmp (const void *a,const void *b)
PATCH RESEND v3 4/5 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.4
PATCH RESEND v3 5/5 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.4
Quoted 5 lines · Rob Herring
Thomas,
As requested, here are the remaining patches for killing off
set_irq_flagswhich 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
Quoted 5 lines · Rob Herring
Thomas,
As requested, here are the remaining patches for killing off
set_irq_flagswhich 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
Quoted 36 lines
Rob
Rob Herring (5):
gpu/drm: kill offset_irq_flagsusage
irqchip: kill offset_irq_flagsusage
sh: kill offset_irq_flagsusage
ARM: remove ununsedset_irq_flags
arm64: remove ununsedset_irq_flagsarch/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(-)
Quoted 8 lines · Rob Herring
Quoted 5 lines · Rob Herring
Thomas,
As requested, here are the remaining patches for killing off
set_irq_flagswhich 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.