Merge tag 'irqchip-4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm...
authorThomas Gleixner <tglx@linutronix.de>
Fri, 24 Aug 2018 14:06:42 +0000 (16:06 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 24 Aug 2018 14:06:42 +0000 (16:06 +0200)
Pull irqchip updates for 4.19, take #2 from Marc Zyngier:

 - bcm7038: compilation fix for !SMP
 - stm32: fix teardown on probe error
 - s3c24xx: fix compilation warning
 - renesas-irqc: r8a774a1 support
 - tango: chained irq setup simplification
 - gic-v3: allow wake-up sources

Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.txt
drivers/irqchip/irq-bcm7038-l1.c
drivers/irqchip/irq-gic-v3.c
drivers/irqchip/irq-s3c24xx.c
drivers/irqchip/irq-stm32-exti.c
drivers/irqchip/irq-tango.c

index 697ca2f..a046ed3 100644 (file)
@@ -13,6 +13,7 @@ Required properties:
     - "renesas,irqc-r8a7792" (R-Car V2H)
     - "renesas,irqc-r8a7793" (R-Car M2-N)
     - "renesas,irqc-r8a7794" (R-Car E2)
+    - "renesas,intc-ex-r8a774a1" (RZ/G2M)
     - "renesas,intc-ex-r8a7795" (R-Car H3)
     - "renesas,intc-ex-r8a7796" (R-Car M3-W)
     - "renesas,intc-ex-r8a77965" (R-Car M3-N)
index faf734f..0f6e30e 100644 (file)
@@ -217,6 +217,7 @@ static int bcm7038_l1_set_affinity(struct irq_data *d,
        return 0;
 }
 
+#ifdef CONFIG_SMP
 static void bcm7038_l1_cpu_offline(struct irq_data *d)
 {
        struct cpumask *mask = irq_data_get_affinity_mask(d);
@@ -241,6 +242,7 @@ static void bcm7038_l1_cpu_offline(struct irq_data *d)
        }
        irq_set_affinity_locked(d, &new_affinity, false);
 }
+#endif
 
 static int __init bcm7038_l1_init_one(struct device_node *dn,
                                      unsigned int idx,
@@ -293,7 +295,9 @@ static struct irq_chip bcm7038_l1_irq_chip = {
        .irq_mask               = bcm7038_l1_mask,
        .irq_unmask             = bcm7038_l1_unmask,
        .irq_set_affinity       = bcm7038_l1_set_affinity,
+#ifdef CONFIG_SMP
        .irq_cpu_offline        = bcm7038_l1_cpu_offline,
+#endif
 };
 
 static int bcm7038_l1_map(struct irq_domain *d, unsigned int virq,
index e214181..d5912f1 100644 (file)
@@ -861,7 +861,9 @@ static struct irq_chip gic_chip = {
        .irq_set_affinity       = gic_set_affinity,
        .irq_get_irqchip_state  = gic_irq_get_irqchip_state,
        .irq_set_irqchip_state  = gic_irq_set_irqchip_state,
-       .flags                  = IRQCHIP_SET_TYPE_MASKED,
+       .flags                  = IRQCHIP_SET_TYPE_MASKED |
+                                 IRQCHIP_SKIP_SET_WAKE |
+                                 IRQCHIP_MASK_ON_SUSPEND,
 };
 
 static struct irq_chip gic_eoimode1_chip = {
@@ -874,7 +876,9 @@ static struct irq_chip gic_eoimode1_chip = {
        .irq_get_irqchip_state  = gic_irq_get_irqchip_state,
        .irq_set_irqchip_state  = gic_irq_set_irqchip_state,
        .irq_set_vcpu_affinity  = gic_irq_set_vcpu_affinity,
-       .flags                  = IRQCHIP_SET_TYPE_MASKED,
+       .flags                  = IRQCHIP_SET_TYPE_MASKED |
+                                 IRQCHIP_SKIP_SET_WAKE |
+                                 IRQCHIP_MASK_ON_SUSPEND,
 };
 
 #define GIC_ID_NR      (1U << GICD_TYPER_ID_BITS(gic_data.rdists.gicd_typer))
index f6fd57e..c19766f 100644 (file)
@@ -250,7 +250,7 @@ static int s3c_irqext0_type(struct irq_data *data, unsigned int type)
        void __iomem *gpcon_reg;
        unsigned long gpcon_offset, extint_offset;
 
-       if ((data->hwirq >= 0) && (data->hwirq <= 3)) {
+       if (data->hwirq <= 3) {
                gpcon_reg = S3C2410_GPFCON;
                extint_reg = S3C24XX_EXTINT0;
                gpcon_offset = (data->hwirq) * 2;
index 3df527f..0a2088e 100644 (file)
@@ -603,17 +603,24 @@ stm32_exti_host_data *stm32_exti_host_init(const struct stm32_exti_drv_data *dd,
                                        sizeof(struct stm32_exti_chip_data),
                                        GFP_KERNEL);
        if (!host_data->chips_data)
-               return NULL;
+               goto free_host_data;
 
        host_data->base = of_iomap(node, 0);
        if (!host_data->base) {
                pr_err("%pOF: Unable to map registers\n", node);
-               return NULL;
+               goto free_chips_data;
        }
 
        stm32_host_data = host_data;
 
        return host_data;
+
+free_chips_data:
+       kfree(host_data->chips_data);
+free_host_data:
+       kfree(host_data);
+
+       return NULL;
 }
 
 static struct
@@ -665,10 +672,8 @@ static int __init stm32_exti_init(const struct stm32_exti_drv_data *drv_data,
        struct irq_domain *domain;
 
        host_data = stm32_exti_host_init(drv_data, node);
-       if (!host_data) {
-               ret = -ENOMEM;
-               goto out_free_mem;
-       }
+       if (!host_data)
+               return -ENOMEM;
 
        domain = irq_domain_add_linear(node, drv_data->bank_nr * IRQS_PER_BANK,
                                       &irq_exti_domain_ops, NULL);
@@ -725,7 +730,6 @@ out_free_domain:
        irq_domain_remove(domain);
 out_unmap:
        iounmap(host_data->base);
-out_free_mem:
        kfree(host_data->chips_data);
        kfree(host_data);
        return ret;
@@ -752,10 +756,8 @@ __init stm32_exti_hierarchy_init(const struct stm32_exti_drv_data *drv_data,
        }
 
        host_data = stm32_exti_host_init(drv_data, node);
-       if (!host_data) {
-               ret = -ENOMEM;
-               goto out_free_mem;
-       }
+       if (!host_data)
+               return -ENOMEM;
 
        for (i = 0; i < drv_data->bank_nr; i++)
                stm32_exti_chip_init(host_data, i, node);
@@ -777,7 +779,6 @@ __init stm32_exti_hierarchy_init(const struct stm32_exti_drv_data *drv_data,
 
 out_unmap:
        iounmap(host_data->base);
-out_free_mem:
        kfree(host_data->chips_data);
        kfree(host_data);
        return ret;
index 0c08530..580e2d7 100644 (file)
@@ -205,8 +205,7 @@ static int __init tangox_irq_init(void __iomem *base, struct resource *baseres,
 
        tangox_irq_domain_init(dom);
 
-       irq_set_chained_handler(irq, tangox_irq_handler);
-       irq_set_handler_data(irq, dom);
+       irq_set_chained_handler_and_data(irq, tangox_irq_handler, dom);
 
        return 0;
 }