OSDN Git Service

Merge branch 'irq/for-arm' into irq/core
authorThomas Gleixner <tglx@linutronix.de>
Mon, 18 May 2015 21:59:13 +0000 (23:59 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 18 May 2015 21:59:33 +0000 (23:59 +0200)
Pull in the branch which can be consumed by ARM to build their changes
on top.

20 files changed:
drivers/irqchip/exynos-combiner.c
drivers/irqchip/irq-armada-370-xp.c
drivers/irqchip/irq-bcm2835.c
drivers/irqchip/irq-keystone.c
drivers/irqchip/irq-mips-gic.c
drivers/irqchip/irq-mtk-sysirq.c
drivers/irqchip/irq-mxs.c
drivers/irqchip/irq-renesas-intc-irqpin.c
drivers/irqchip/irq-renesas-irqc.c
drivers/irqchip/irq-s3c24xx.c
drivers/irqchip/irq-sun4i.c
drivers/irqchip/irq-versatile-fpga.c
drivers/irqchip/irq-vf610-mscm-ir.c
drivers/irqchip/irq-vic.c
drivers/irqchip/irq-vt8500.c
include/linux/platform_data/irq-renesas-irqc.h [deleted file]
kernel/irq/devres.c
kernel/irq/irqdesc.c
kernel/irq/msi.c
kernel/irq/pm.c

index 5945223..a57a3a1 100644 (file)
@@ -164,7 +164,7 @@ static int combiner_irq_domain_map(struct irq_domain *d, unsigned int irq,
        return 0;
 }
 
-static struct irq_domain_ops combiner_irq_domain_ops = {
+static const struct irq_domain_ops combiner_irq_domain_ops = {
        .xlate  = combiner_irq_domain_xlate,
        .map    = combiner_irq_domain_map,
 };
index daccc8b..0d3b0fe 100644 (file)
@@ -409,7 +409,7 @@ static struct notifier_block mpic_cascaded_cpu_notifier = {
 };
 #endif /* CONFIG_SMP */
 
-static struct irq_domain_ops armada_370_xp_mpic_irq_ops = {
+static const struct irq_domain_ops armada_370_xp_mpic_irq_ops = {
        .map = armada_370_xp_mpic_irq_map,
        .xlate = irq_domain_xlate_onecell,
 };
index 5916d6c..e68c3b6 100644 (file)
@@ -135,7 +135,7 @@ static int armctrl_xlate(struct irq_domain *d, struct device_node *ctrlr,
        return 0;
 }
 
-static struct irq_domain_ops armctrl_ops = {
+static const struct irq_domain_ops armctrl_ops = {
        .xlate = armctrl_xlate
 };
 
index 78e8b3c..5dc6165 100644 (file)
@@ -131,7 +131,7 @@ static int keystone_irq_map(struct irq_domain *h, unsigned int virq,
        return 0;
 }
 
-static struct irq_domain_ops keystone_irq_ops = {
+static const struct irq_domain_ops keystone_irq_ops = {
        .map    = keystone_irq_map,
        .xlate  = irq_domain_xlate_onecell,
 };
index 57f09cb..44d2d10 100644 (file)
@@ -739,7 +739,7 @@ static int gic_irq_domain_xlate(struct irq_domain *d, struct device_node *ctrlr,
        return 0;
 }
 
-static struct irq_domain_ops gic_irq_domain_ops = {
+static const struct irq_domain_ops gic_irq_domain_ops = {
        .map = gic_irq_domain_map,
        .xlate = gic_irq_domain_xlate,
 };
index eaf0a71..04de2d4 100644 (file)
@@ -111,7 +111,7 @@ static int mtk_sysirq_domain_alloc(struct irq_domain *domain, unsigned int virq,
        return irq_domain_alloc_irqs_parent(domain, virq, nr_irqs, &gic_data);
 }
 
-static struct irq_domain_ops sysirq_domain_ops = {
+static const struct irq_domain_ops sysirq_domain_ops = {
        .xlate = mtk_sysirq_domain_xlate,
        .alloc = mtk_sysirq_domain_alloc,
        .free = irq_domain_free_irqs_common,
index e4acf1e..04bf97b 100644 (file)
@@ -90,7 +90,7 @@ static int icoll_irq_domain_map(struct irq_domain *d, unsigned int virq,
        return 0;
 }
 
-static struct irq_domain_ops icoll_irq_domain_ops = {
+static const struct irq_domain_ops icoll_irq_domain_ops = {
        .map = icoll_irq_domain_map,
        .xlate = irq_domain_xlate_onecell,
 };
index 9a0767b..0670ab4 100644 (file)
@@ -347,7 +347,7 @@ static int intc_irqpin_irq_domain_map(struct irq_domain *h, unsigned int virq,
        return 0;
 }
 
-static struct irq_domain_ops intc_irqpin_irq_domain_ops = {
+static const struct irq_domain_ops intc_irqpin_irq_domain_ops = {
        .map    = intc_irqpin_irq_domain_map,
        .xlate  = irq_domain_xlate_twocell,
 };
index cdf80b7..778bd07 100644 (file)
@@ -29,7 +29,6 @@
 #include <linux/err.h>
 #include <linux/slab.h>
 #include <linux/module.h>
-#include <linux/platform_data/irq-renesas-irqc.h>
 #include <linux/pm_runtime.h>
 
 #define IRQC_IRQ_MAX   32      /* maximum 32 interrupts per driver instance */
@@ -62,7 +61,6 @@ struct irqc_priv {
        void __iomem *iomem;
        void __iomem *cpu_int_base;
        struct irqc_irq irq[IRQC_IRQ_MAX];
-       struct renesas_irqc_config config;
        unsigned int number_of_irqs;
        struct platform_device *pdev;
        struct irq_chip irq_chip;
@@ -168,14 +166,13 @@ static int irqc_irq_domain_map(struct irq_domain *h, unsigned int virq,
        return 0;
 }
 
-static struct irq_domain_ops irqc_irq_domain_ops = {
+static const struct irq_domain_ops irqc_irq_domain_ops = {
        .map    = irqc_irq_domain_map,
        .xlate  = irq_domain_xlate_twocell,
 };
 
 static int irqc_probe(struct platform_device *pdev)
 {
-       struct renesas_irqc_config *pdata = pdev->dev.platform_data;
        struct irqc_priv *p;
        struct resource *io;
        struct resource *irq;
@@ -191,10 +188,6 @@ static int irqc_probe(struct platform_device *pdev)
                goto err0;
        }
 
-       /* deal with driver instance configuration */
-       if (pdata)
-               memcpy(&p->config, pdata, sizeof(*pdata));
-
        p->pdev = pdev;
        platform_set_drvdata(pdev, p);
 
@@ -251,8 +244,7 @@ static int irqc_probe(struct platform_device *pdev)
        irq_chip->flags = IRQCHIP_MASK_ON_SUSPEND;
 
        p->irq_domain = irq_domain_add_simple(pdev->dev.of_node,
-                                             p->number_of_irqs,
-                                             p->config.irq_base,
+                                             p->number_of_irqs, 0,
                                              &irqc_irq_domain_ops, p);
        if (!p->irq_domain) {
                ret = -ENXIO;
@@ -272,13 +264,6 @@ static int irqc_probe(struct platform_device *pdev)
 
        dev_info(&pdev->dev, "driving %d irqs\n", p->number_of_irqs);
 
-       /* warn in case of mismatch if irq base is specified */
-       if (p->config.irq_base) {
-               if (p->config.irq_base != p->irq[0].domain_irq)
-                       dev_warn(&pdev->dev, "irq base mismatch (%d/%d)\n",
-                                p->config.irq_base, p->irq[0].domain_irq);
-       }
-
        return 0;
 err3:
        while (--k >= 0)
index c8d373f..e96717f 100644 (file)
@@ -502,7 +502,7 @@ err:
        return -EINVAL;
 }
 
-static struct irq_domain_ops s3c24xx_irq_ops = {
+static const struct irq_domain_ops s3c24xx_irq_ops = {
        .map = s3c24xx_irq_map,
        .xlate = irq_domain_xlate_twocell,
 };
@@ -1228,7 +1228,7 @@ static int s3c24xx_irq_xlate_of(struct irq_domain *d, struct device_node *n,
        return 0;
 }
 
-static struct irq_domain_ops s3c24xx_irq_ops_of = {
+static const struct irq_domain_ops s3c24xx_irq_ops_of = {
        .map = s3c24xx_irq_map_of,
        .xlate = s3c24xx_irq_xlate_of,
 };
index 64155b6..83d6aa6 100644 (file)
@@ -89,7 +89,7 @@ static int sun4i_irq_map(struct irq_domain *d, unsigned int virq,
        return 0;
 }
 
-static struct irq_domain_ops sun4i_irq_ops = {
+static const struct irq_domain_ops sun4i_irq_ops = {
        .map = sun4i_irq_map,
        .xlate = irq_domain_xlate_onecell,
 };
index 1ab4517..888111b 100644 (file)
@@ -132,7 +132,7 @@ static int fpga_irqdomain_map(struct irq_domain *d, unsigned int irq,
        return 0;
 }
 
-static struct irq_domain_ops fpga_irqdomain_ops = {
+static const struct irq_domain_ops fpga_irqdomain_ops = {
        .map = fpga_irqdomain_map,
        .xlate = irq_domain_xlate_onetwocell,
 };
index b932ecb..f5c01cb 100644 (file)
@@ -182,10 +182,9 @@ static int __init vf610_mscm_ir_of_init(struct device_node *node,
                return -ENOMEM;
 
        mscm_ir_data->mscm_ir_base = of_io_request_and_map(node, 0, "mscm-ir");
-
-       if (!mscm_ir_data->mscm_ir_base) {
+       if (IS_ERR(mscm_ir_data->mscm_ir_base)) {
                pr_err("vf610_mscm_ir: unable to map mscm register\n");
-               ret = -ENOMEM;
+               ret = PTR_ERR(mscm_ir_data->mscm_ir_base);
                goto out_free;
        }
 
index 54089de..d4ce331 100644 (file)
@@ -256,7 +256,7 @@ static void __exception_irq_entry vic_handle_irq(struct pt_regs *regs)
        } while (handled);
 }
 
-static struct irq_domain_ops vic_irqdomain_ops = {
+static const struct irq_domain_ops vic_irqdomain_ops = {
        .map = vic_irqdomain_map,
        .xlate = irq_domain_xlate_onetwocell,
 };
index b7af816..0b29700 100644 (file)
@@ -173,7 +173,7 @@ static int vt8500_irq_map(struct irq_domain *h, unsigned int virq,
        return 0;
 }
 
-static struct irq_domain_ops vt8500_irq_domain_ops = {
+static const struct irq_domain_ops vt8500_irq_domain_ops = {
        .map = vt8500_irq_map,
        .xlate = irq_domain_xlate_onecell,
 };
diff --git a/include/linux/platform_data/irq-renesas-irqc.h b/include/linux/platform_data/irq-renesas-irqc.h
deleted file mode 100644 (file)
index 3ae17b3..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Renesas IRQC Driver
- *
- *  Copyright (C) 2013 Magnus Damm
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#ifndef __IRQ_RENESAS_IRQC_H__
-#define __IRQ_RENESAS_IRQC_H__
-
-struct renesas_irqc_config {
-       unsigned int irq_base;
-};
-
-#endif /* __IRQ_RENESAS_IRQC_H__ */
index d5d0f73..74d90a7 100644 (file)
@@ -104,7 +104,7 @@ int devm_request_any_context_irq(struct device *dev, unsigned int irq,
                return -ENOMEM;
 
        rc = request_any_context_irq(irq, handler, irqflags, devname, dev_id);
-       if (rc) {
+       if (rc < 0) {
                devres_free(dr);
                return rc;
        }
@@ -113,7 +113,7 @@ int devm_request_any_context_irq(struct device *dev, unsigned int irq,
        dr->dev_id = dev_id;
        devres_add(dev, dr);
 
-       return 0;
+       return rc;
 }
 EXPORT_SYMBOL(devm_request_any_context_irq);
 
index 99793b9..73a76e2 100644 (file)
@@ -619,7 +619,7 @@ unsigned int kstat_irqs(unsigned int irq)
 {
        struct irq_desc *desc = irq_to_desc(irq);
        int cpu;
-       int sum = 0;
+       unsigned int sum = 0;
 
        if (!desc || !desc->kstat_irqs)
                return 0;
@@ -639,7 +639,7 @@ unsigned int kstat_irqs(unsigned int irq)
  */
 unsigned int kstat_irqs_usr(unsigned int irq)
 {
-       int sum;
+       unsigned int sum;
 
        irq_lock_sparse();
        sum = kstat_irqs(irq);
index 474de5c..7bf1f1b 100644 (file)
@@ -124,7 +124,7 @@ static void msi_domain_free(struct irq_domain *domain, unsigned int virq,
        irq_domain_free_irqs_top(domain, virq, nr_irqs);
 }
 
-static struct irq_domain_ops msi_domain_ops = {
+static const struct irq_domain_ops msi_domain_ops = {
        .alloc          = msi_domain_alloc,
        .free           = msi_domain_free,
        .activate       = msi_domain_activate,
index 5204a6d..d22786a 100644 (file)
@@ -123,6 +123,8 @@ void suspend_device_irqs(void)
                unsigned long flags;
                bool sync;
 
+               if (irq_settings_is_nested_thread(desc))
+                       continue;
                raw_spin_lock_irqsave(&desc->lock, flags);
                sync = suspend_device_irq(desc, irq);
                raw_spin_unlock_irqrestore(&desc->lock, flags);
@@ -163,6 +165,8 @@ static void resume_irqs(bool want_early)
 
                if (!is_early && want_early)
                        continue;
+               if (irq_settings_is_nested_thread(desc))
+                       continue;
 
                raw_spin_lock_irqsave(&desc->lock, flags);
                resume_irq(desc, irq);