Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq update from Thomas Gleixner:
 "A small set of updats/fixes for the irq subsystem:

   - Allow GICv3 interrupts to be configured as wake-up sources to
     enable wakeup from suspend

   - Make the error handling of the STM32 irqchip init function work

   - A set of small cleanups and improvements"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip/gic-v3: Allow interrupt to be configured as wake-up sources
  irqchip/tango: Set irq handler and data in one go
  dt-bindings: irqchip: renesas-irqc: Document r8a774a1 support
  irqchip/s3c24xx: Remove unneeded comparison of unsigned long to 0
  irqchip/stm32: Fix init error handling
  irqchip/bcm7038-l1: Hide cpu offline callback when building for !SMP
This commit is contained in:
Linus Torvalds 2018-08-26 09:55:28 -07:00
commit de3750351c
6 changed files with 26 additions and 17 deletions

View file

@ -13,6 +13,7 @@ Required properties:
- "renesas,irqc-r8a7792" (R-Car V2H) - "renesas,irqc-r8a7792" (R-Car V2H)
- "renesas,irqc-r8a7793" (R-Car M2-N) - "renesas,irqc-r8a7793" (R-Car M2-N)
- "renesas,irqc-r8a7794" (R-Car E2) - "renesas,irqc-r8a7794" (R-Car E2)
- "renesas,intc-ex-r8a774a1" (RZ/G2M)
- "renesas,intc-ex-r8a7795" (R-Car H3) - "renesas,intc-ex-r8a7795" (R-Car H3)
- "renesas,intc-ex-r8a7796" (R-Car M3-W) - "renesas,intc-ex-r8a7796" (R-Car M3-W)
- "renesas,intc-ex-r8a77965" (R-Car M3-N) - "renesas,intc-ex-r8a77965" (R-Car M3-N)

View file

@ -217,6 +217,7 @@ static int bcm7038_l1_set_affinity(struct irq_data *d,
return 0; return 0;
} }
#ifdef CONFIG_SMP
static void bcm7038_l1_cpu_offline(struct irq_data *d) static void bcm7038_l1_cpu_offline(struct irq_data *d)
{ {
struct cpumask *mask = irq_data_get_affinity_mask(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); irq_set_affinity_locked(d, &new_affinity, false);
} }
#endif
static int __init bcm7038_l1_init_one(struct device_node *dn, static int __init bcm7038_l1_init_one(struct device_node *dn,
unsigned int idx, unsigned int idx,
@ -293,7 +295,9 @@ static struct irq_chip bcm7038_l1_irq_chip = {
.irq_mask = bcm7038_l1_mask, .irq_mask = bcm7038_l1_mask,
.irq_unmask = bcm7038_l1_unmask, .irq_unmask = bcm7038_l1_unmask,
.irq_set_affinity = bcm7038_l1_set_affinity, .irq_set_affinity = bcm7038_l1_set_affinity,
#ifdef CONFIG_SMP
.irq_cpu_offline = bcm7038_l1_cpu_offline, .irq_cpu_offline = bcm7038_l1_cpu_offline,
#endif
}; };
static int bcm7038_l1_map(struct irq_domain *d, unsigned int virq, static int bcm7038_l1_map(struct irq_domain *d, unsigned int virq,

View file

@ -861,7 +861,9 @@ static struct irq_chip gic_chip = {
.irq_set_affinity = gic_set_affinity, .irq_set_affinity = gic_set_affinity,
.irq_get_irqchip_state = gic_irq_get_irqchip_state, .irq_get_irqchip_state = gic_irq_get_irqchip_state,
.irq_set_irqchip_state = gic_irq_set_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 = { 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_get_irqchip_state = gic_irq_get_irqchip_state,
.irq_set_irqchip_state = gic_irq_set_irqchip_state, .irq_set_irqchip_state = gic_irq_set_irqchip_state,
.irq_set_vcpu_affinity = gic_irq_set_vcpu_affinity, .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)) #define GIC_ID_NR (1U << GICD_TYPER_ID_BITS(gic_data.rdists.gicd_typer))

View file

@ -250,7 +250,7 @@ static int s3c_irqext0_type(struct irq_data *data, unsigned int type)
void __iomem *gpcon_reg; void __iomem *gpcon_reg;
unsigned long gpcon_offset, extint_offset; unsigned long gpcon_offset, extint_offset;
if ((data->hwirq >= 0) && (data->hwirq <= 3)) { if (data->hwirq <= 3) {
gpcon_reg = S3C2410_GPFCON; gpcon_reg = S3C2410_GPFCON;
extint_reg = S3C24XX_EXTINT0; extint_reg = S3C24XX_EXTINT0;
gpcon_offset = (data->hwirq) * 2; gpcon_offset = (data->hwirq) * 2;

View 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), sizeof(struct stm32_exti_chip_data),
GFP_KERNEL); GFP_KERNEL);
if (!host_data->chips_data) if (!host_data->chips_data)
return NULL; goto free_host_data;
host_data->base = of_iomap(node, 0); host_data->base = of_iomap(node, 0);
if (!host_data->base) { if (!host_data->base) {
pr_err("%pOF: Unable to map registers\n", node); pr_err("%pOF: Unable to map registers\n", node);
return NULL; goto free_chips_data;
} }
stm32_host_data = host_data; stm32_host_data = host_data;
return host_data; return host_data;
free_chips_data:
kfree(host_data->chips_data);
free_host_data:
kfree(host_data);
return NULL;
} }
static struct static struct
@ -665,10 +672,8 @@ static int __init stm32_exti_init(const struct stm32_exti_drv_data *drv_data,
struct irq_domain *domain; struct irq_domain *domain;
host_data = stm32_exti_host_init(drv_data, node); host_data = stm32_exti_host_init(drv_data, node);
if (!host_data) { if (!host_data)
ret = -ENOMEM; return -ENOMEM;
goto out_free_mem;
}
domain = irq_domain_add_linear(node, drv_data->bank_nr * IRQS_PER_BANK, domain = irq_domain_add_linear(node, drv_data->bank_nr * IRQS_PER_BANK,
&irq_exti_domain_ops, NULL); &irq_exti_domain_ops, NULL);
@ -725,7 +730,6 @@ static int __init stm32_exti_init(const struct stm32_exti_drv_data *drv_data,
irq_domain_remove(domain); irq_domain_remove(domain);
out_unmap: out_unmap:
iounmap(host_data->base); iounmap(host_data->base);
out_free_mem:
kfree(host_data->chips_data); kfree(host_data->chips_data);
kfree(host_data); kfree(host_data);
return ret; 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); host_data = stm32_exti_host_init(drv_data, node);
if (!host_data) { if (!host_data)
ret = -ENOMEM; return -ENOMEM;
goto out_free_mem;
}
for (i = 0; i < drv_data->bank_nr; i++) for (i = 0; i < drv_data->bank_nr; i++)
stm32_exti_chip_init(host_data, i, node); 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: out_unmap:
iounmap(host_data->base); iounmap(host_data->base);
out_free_mem:
kfree(host_data->chips_data); kfree(host_data->chips_data);
kfree(host_data); kfree(host_data);
return ret; return ret;

View file

@ -205,8 +205,7 @@ static int __init tangox_irq_init(void __iomem *base, struct resource *baseres,
tangox_irq_domain_init(dom); tangox_irq_domain_init(dom);
irq_set_chained_handler(irq, tangox_irq_handler); irq_set_chained_handler_and_data(irq, tangox_irq_handler, dom);
irq_set_handler_data(irq, dom);
return 0; return 0;
} }