diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-07-01 15:19:35 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-07-01 15:19:35 -0700 |
commit | d5fb82137b6cd39e67c4321f4f5ce9b03d4d04e6 (patch) | |
tree | aadb6cd1b654c0b45759111af74f3e7fc7a13705 /drivers | |
parent | 8fff77551a9215a725650263e30fa105acca95ab (diff) | |
parent | 93b6eb77b49064ed1de5726560a0849f3ebccc2c (diff) | |
download | op-kernel-dev-d5fb82137b6cd39e67c4321f4f5ce9b03d4d04e6.zip op-kernel-dev-d5fb82137b6cd39e67c4321f4f5ce9b03d4d04e6.tar.gz |
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq fixes from Thomas Gleixner:
"This contains:
- a series of fixes for interrupt drivers to prevent a potential race
when installing a chained interrupt handler
- a fix for cpumask pointer misuse
- a fix for using the wrong interrupt number from struct irq_data
- removal of unused code and outdated comments
- a few new helper functions which allow us to cleanup the interrupt
handling code further in 4.3
I decided against doing the cleanup at the end of this merge window
and rather do the preparatory steps for 4.3, so we can run the final
ABI change at the end of the 4.3 merge window with less risk"
* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (26 commits)
ARM/LPC32xx: Use irq not hwirq for __irq_set_handler_locked()
genirq: Implement irq_set_handler_locked()/irq_set_chip_handler_name_locked()
genirq: Introduce helper irq_desc_get_irq()
genirq: Remove irq_node()
genirq: Clean up outdated comments related to include/linux/irqdesc.h
mn10300: Fix incorrect use of irq_data->affinity
MIPS/ralink: Fix race in installing chained IRQ handler
MIPS/pci: Fix race in installing chained IRQ handler
MIPS/ath25: Fix race in installing chained IRQ handler
MIPS/ath25: Fix race in installing chained IRQ handler
m68k/psc: Fix race in installing chained IRQ handler
avr32/at32ap: Fix race in installing chained IRQ handler
sh/intc: Fix race in installing chained IRQ handler
sh/intc: Fix potential race in installing chained IRQ handler
pinctrl/sun4i: Fix race in installing chained IRQ handler
pinctrl/samsung: Fix race in installing chained IRQ handler
pinctrl/samsung: Fix race in installing chained IRQ handler
pinctrl/exynos: Fix race in installing chained IRQ handler
pinctrl/st: Fix race in installing chained IRQ handler
pinctrl/adi2: Fix race in installing chained IRQ handler
...
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpio/gpio-bcm-kona.c | 5 | ||||
-rw-r--r-- | drivers/gpio/gpio-dwapb.c | 4 | ||||
-rw-r--r-- | drivers/gpio/gpio-msic.c | 3 | ||||
-rw-r--r-- | drivers/mfd/asic3.c | 3 | ||||
-rw-r--r-- | drivers/pci/host/pci-keystone.c | 7 | ||||
-rw-r--r-- | drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 3 | ||||
-rw-r--r-- | drivers/pinctrl/pinctrl-adi2.c | 4 | ||||
-rw-r--r-- | drivers/pinctrl/pinctrl-st.c | 4 | ||||
-rw-r--r-- | drivers/pinctrl/samsung/pinctrl-exynos.c | 4 | ||||
-rw-r--r-- | drivers/pinctrl/samsung/pinctrl-s3c24xx.c | 3 | ||||
-rw-r--r-- | drivers/pinctrl/samsung/pinctrl-s3c64xx.c | 8 | ||||
-rw-r--r-- | drivers/pinctrl/sunxi/pinctrl-sunxi.c | 6 | ||||
-rw-r--r-- | drivers/sh/intc/core.c | 5 | ||||
-rw-r--r-- | drivers/sh/intc/virq.c | 3 |
14 files changed, 30 insertions, 32 deletions
diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c index 8333f87..40343fa 100644 --- a/drivers/gpio/gpio-bcm-kona.c +++ b/drivers/gpio/gpio-bcm-kona.c @@ -657,8 +657,9 @@ static int bcm_kona_gpio_probe(struct platform_device *pdev) } 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); - irq_set_handler_data(bank->irq, bank); + irq_set_chained_handler_and_data(bank->irq, + bcm_kona_gpio_irq_handler, + bank); } spin_lock_init(&kona_gpio->lock); diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c index 58faf04..55fa985 100644 --- a/drivers/gpio/gpio-dwapb.c +++ b/drivers/gpio/gpio-dwapb.c @@ -348,8 +348,8 @@ static void dwapb_configure_irqs(struct dwapb_gpio *gpio, irq_gc->chip_types[1].handler = handle_edge_irq; if (!pp->irq_shared) { - irq_set_chained_handler(pp->irq, dwapb_irq_handler); - irq_set_handler_data(pp->irq, gpio); + irq_set_chained_handler_and_data(pp->irq, dwapb_irq_handler, + gpio); } else { /* * Request a shared IRQ since where MFD would have devices diff --git a/drivers/gpio/gpio-msic.c b/drivers/gpio/gpio-msic.c index 01acf0a..7bcfb87 100644 --- a/drivers/gpio/gpio-msic.c +++ b/drivers/gpio/gpio-msic.c @@ -309,8 +309,7 @@ static int platform_msic_gpio_probe(struct platform_device *pdev) &msic_irqchip, handle_simple_irq); } - irq_set_chained_handler(mg->irq, msic_gpio_irq_handler); - irq_set_handler_data(mg->irq, mg); + irq_set_chained_handler_and_data(mg->irq, msic_gpio_irq_handler, mg); return 0; err: diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c index 977bd3a..120df5c 100644 --- a/drivers/mfd/asic3.c +++ b/drivers/mfd/asic3.c @@ -417,9 +417,8 @@ static int __init asic3_irq_probe(struct platform_device *pdev) asic3_write_register(asic, ASIC3_OFFSET(INTR, INT_MASK), ASIC3_INTMASK_GINTMASK); - irq_set_chained_handler(asic->irq_nr, asic3_irq_demux); + irq_set_chained_handler_and_data(asic->irq_nr, asic3_irq_demux, asic); irq_set_irq_type(asic->irq_nr, IRQ_TYPE_EDGE_RISING); - irq_set_handler_data(asic->irq_nr, asic); return 0; } diff --git a/drivers/pci/host/pci-keystone.c b/drivers/pci/host/pci-keystone.c index b75d684..734da58 100644 --- a/drivers/pci/host/pci-keystone.c +++ b/drivers/pci/host/pci-keystone.c @@ -221,10 +221,9 @@ static void ks_pcie_setup_interrupts(struct keystone_pcie *ks_pcie) /* MSI IRQ */ if (IS_ENABLED(CONFIG_PCI_MSI)) { for (i = 0; i < ks_pcie->num_msi_host_irqs; i++) { - irq_set_chained_handler(ks_pcie->msi_host_irqs[i], - ks_pcie_msi_irq_handler); - irq_set_handler_data(ks_pcie->msi_host_irqs[i], - ks_pcie); + irq_set_chained_handler_and_data(ks_pcie->msi_host_irqs[i], + ks_pcie_msi_irq_handler, + ks_pcie); } } } diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c index c4fc77a..ad1ea16 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c @@ -1351,8 +1351,7 @@ int mtk_pctrl_init(struct platform_device *pdev, set_irq_flags(virq, IRQF_VALID); }; - irq_set_chained_handler(irq, mtk_eint_irq_handler); - irq_set_handler_data(irq, pctl); + irq_set_chained_handler_and_data(irq, mtk_eint_irq_handler, pctl); set_irq_flags(irq, IRQF_VALID); return 0; diff --git a/drivers/pinctrl/pinctrl-adi2.c b/drivers/pinctrl/pinctrl-adi2.c index 873433d..c3c3d23 100644 --- a/drivers/pinctrl/pinctrl-adi2.c +++ b/drivers/pinctrl/pinctrl-adi2.c @@ -865,8 +865,8 @@ static int adi_gpio_pint_probe(struct platform_device *pdev) pint->pint_map_port = adi_pint_map_port; platform_set_drvdata(pdev, pint); - irq_set_chained_handler(pint->irq, adi_gpio_handle_pint_irq); - irq_set_handler_data(pint->irq, pint); + irq_set_chained_handler_and_data(pint->irq, adi_gpio_handle_pint_irq, + pint); list_add_tail(&pint->node, &adi_pint_list); diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c index d34ac87..c262e5f 100644 --- a/drivers/pinctrl/pinctrl-st.c +++ b/drivers/pinctrl/pinctrl-st.c @@ -1661,8 +1661,8 @@ static int st_pctl_probe_dt(struct platform_device *pdev, if (IS_ERR(info->irqmux_base)) return PTR_ERR(info->irqmux_base); - irq_set_chained_handler(irq, st_gpio_irqmux_handler); - irq_set_handler_data(irq, info); + irq_set_chained_handler_and_data(irq, st_gpio_irqmux_handler, + info); } diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.c b/drivers/pinctrl/samsung/pinctrl-exynos.c index 0b7afa5..b18dabb 100644 --- a/drivers/pinctrl/samsung/pinctrl-exynos.c +++ b/drivers/pinctrl/samsung/pinctrl-exynos.c @@ -563,8 +563,8 @@ static int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d) return -ENOMEM; } - irq_set_chained_handler(irq, exynos_irq_demux_eint16_31); - irq_set_handler_data(irq, muxed_data); + irq_set_chained_handler_and_data(irq, exynos_irq_demux_eint16_31, + muxed_data); bank = d->pin_banks; idx = 0; diff --git a/drivers/pinctrl/samsung/pinctrl-s3c24xx.c b/drivers/pinctrl/samsung/pinctrl-s3c24xx.c index f1993f42..01b43db 100644 --- a/drivers/pinctrl/samsung/pinctrl-s3c24xx.c +++ b/drivers/pinctrl/samsung/pinctrl-s3c24xx.c @@ -514,8 +514,7 @@ static int s3c24xx_eint_init(struct samsung_pinctrl_drv_data *d) } eint_data->parents[i] = irq; - irq_set_chained_handler(irq, handlers[i]); - irq_set_handler_data(irq, eint_data); + irq_set_chained_handler_and_data(irq, handlers[i], eint_data); } bank = d->pin_banks; diff --git a/drivers/pinctrl/samsung/pinctrl-s3c64xx.c b/drivers/pinctrl/samsung/pinctrl-s3c64xx.c index 7756c1e..ec8cc3b 100644 --- a/drivers/pinctrl/samsung/pinctrl-s3c64xx.c +++ b/drivers/pinctrl/samsung/pinctrl-s3c64xx.c @@ -506,8 +506,7 @@ static int s3c64xx_eint_gpio_init(struct samsung_pinctrl_drv_data *d) data->domains[nr_domains++] = bank->irq_domain; } - irq_set_chained_handler(d->irq, s3c64xx_eint_gpio_irq); - irq_set_handler_data(d->irq, data); + irq_set_chained_handler_and_data(d->irq, s3c64xx_eint_gpio_irq, data); return 0; } @@ -731,8 +730,9 @@ static int s3c64xx_eint_eint0_init(struct samsung_pinctrl_drv_data *d) return -ENXIO; } - irq_set_chained_handler(irq, s3c64xx_eint0_handlers[i]); - irq_set_handler_data(irq, data); + irq_set_chained_handler_and_data(irq, + s3c64xx_eint0_handlers[i], + data); } bank = d->pin_banks; diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c index d7857c7..f09573e 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c +++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c @@ -1005,9 +1005,9 @@ int sunxi_pinctrl_init(struct platform_device *pdev, writel(0xffffffff, pctl->membase + sunxi_irq_status_reg_from_bank(i)); - irq_set_chained_handler(pctl->irq[i], - sunxi_pinctrl_irq_handler); - irq_set_handler_data(pctl->irq[i], pctl); + irq_set_chained_handler_and_data(pctl->irq[i], + sunxi_pinctrl_irq_handler, + pctl); } dev_info(&pdev->dev, "initialized sunXi PIO driver\n"); diff --git a/drivers/sh/intc/core.c b/drivers/sh/intc/core.c index 81f2298..156b790 100644 --- a/drivers/sh/intc/core.c +++ b/drivers/sh/intc/core.c @@ -366,8 +366,9 @@ int __init register_intc_controller(struct intc_desc *desc) /* redirect this interrupts to the first one */ irq_set_chip(irq2, &dummy_irq_chip); - irq_set_chained_handler(irq2, intc_redirect_irq); - irq_set_handler_data(irq2, (void *)irq); + irq_set_chained_handler_and_data(irq2, + intc_redirect_irq, + (void *)irq); } } diff --git a/drivers/sh/intc/virq.c b/drivers/sh/intc/virq.c index f30ac93..f5f1b82 100644 --- a/drivers/sh/intc/virq.c +++ b/drivers/sh/intc/virq.c @@ -243,8 +243,9 @@ restart: */ irq_set_nothread(irq); - irq_set_chained_handler(entry->pirq, intc_virq_handler); + /* Set handler data before installing the handler */ add_virq_to_pirq(entry->pirq, irq); + irq_set_chained_handler(entry->pirq, intc_virq_handler); radix_tree_tag_clear(&d->tree, entry->enum_id, INTC_TAG_VIRQ_NEEDS_ALLOC); |