Skip to content

Commit f8b036a

Browse files
committed
Merge tag 'irq-core-2020-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq updates from Thomas Gleixner: "The usual boring updates from the interrupt subsystem: - Infrastructure to allow building irqchip drivers as modules - Consolidation of irqchip ACPI probing - Removal of the EOI-preflow interrupt handler which was required for SPARC support and became obsolete after SPARC was converted to use sparse interrupts. - Cleanups, fixes and improvements all over the place" * tag 'irq-core-2020-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (51 commits) irqchip/loongson-pch-pic: Fix the misused irq flow handler irqchip/loongson-htvec: Support 8 groups of HT vectors irqchip/loongson-liointc: Fix misuse of gc->mask_cache dt-bindings: interrupt-controller: Update Loongson HTVEC description irqchip/imx-intmux: Fix irqdata regs save in imx_intmux_runtime_suspend() irqchip/imx-intmux: Implement intmux runtime power management irqchip/gic-v4.1: Use GFP_ATOMIC flag in allocate_vpe_l1_table() irqchip: Fix IRQCHIP_PLATFORM_DRIVER_* compilation by including module.h irqchip/stm32-exti: Map direct event to irq parent irqchip/mtk-cirq: Convert to a platform driver irqchip/mtk-sysirq: Convert to a platform driver irqchip/qcom-pdc: Switch to using IRQCHIP_PLATFORM_DRIVER helper macros irqchip: Add IRQCHIP_PLATFORM_DRIVER_BEGIN/END and IRQCHIP_MATCH helper macros irqchip: irq-bcm2836.h: drop a duplicated word irqchip/gic-v4.1: Ensure accessing the correct RD when writing INVALLR irqchip/irq-bcm7038-l1: Guard uses of cpu_logical_map irqchip/gic-v3: Remove unused register definition irqchip/qcom-pdc: Allow QCOM_PDC to be loadable as a permanent module genirq: Export irq_chip_retrigger_hierarchy and irq_chip_set_vcpu_affinity_parent irqdomain: Export irq_domain_update_bus_token ...
2 parents 2ed90db + 3d5128c commit f8b036a

36 files changed

+346
-244
lines changed

Documentation/devicetree/bindings/interrupt-controller/brcm,l2-intc.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ Broadcom Generic Level 2 Interrupt Controller
22

33
Required properties:
44

5-
- compatible: should be "brcm,l2-intc" for latched interrupt controllers
5+
- compatible: should be one of:
6+
"brcm,hif-spi-l2-intc" or
7+
"brcm,upg-aux-aon-l2-intc" or
8+
"brcm,l2-intc" for latched interrupt controllers
69
should be "brcm,bcm7271-l2-intc" for level interrupt controllers
710
- reg: specifies the base physical address and size of the registers
811
- interrupt-controller: identifies the node as an interrupt controller

Documentation/devicetree/bindings/interrupt-controller/loongson,htvec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ properties:
2222

2323
interrupts:
2424
minItems: 1
25-
maxItems: 4
26-
description: Four parent interrupts that receive chained interrupts.
25+
maxItems: 8
26+
description: Eight parent interrupts that receive chained interrupts.
2727

2828
interrupt-controller: true
2929

arch/sparc/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ config SPARC64
8181
select RTC_DRV_STARFIRE
8282
select HAVE_PERF_EVENTS
8383
select PERF_USE_VMALLOC
84-
select IRQ_PREFLOW_FASTEOI
8584
select ARCH_HAVE_NMI_SAFE_CMPXCHG
8685
select HAVE_C_RECORDMCOUNT
8786
select HAVE_ARCH_AUDITSYSCALL

drivers/irqchip/Kconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ config GOLDFISH_PIC
425425
for Goldfish based virtual platforms.
426426

427427
config QCOM_PDC
428-
bool "QCOM PDC"
428+
tristate "QCOM PDC"
429429
depends on ARCH_QCOM
430430
select IRQ_DOMAIN_HIERARCHY
431431
help
@@ -541,7 +541,6 @@ config LOONGSON_HTPIC
541541
default y
542542
select IRQ_DOMAIN
543543
select GENERIC_IRQ_CHIP
544-
select I8259
545544
help
546545
Support for the Loongson-3 HyperTransport PIC Controller.
547546

drivers/irqchip/irq-ativic32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ static int ativic32_irq_domain_map(struct irq_domain *id, unsigned int virq,
9292
return 0;
9393
}
9494

95-
static struct irq_domain_ops ativic32_ops = {
95+
static const struct irq_domain_ops ativic32_ops = {
9696
.map = ativic32_irq_domain_map,
9797
.xlate = irq_domain_xlate_onecell
9898
};

drivers/irqchip/irq-atmel-aic5.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,10 +310,16 @@ static void __init sama5d3_aic_irq_fixup(void)
310310
aic_common_rtc_irq_fixup();
311311
}
312312

313+
static void __init sam9x60_aic_irq_fixup(void)
314+
{
315+
aic_common_rtc_irq_fixup();
316+
aic_common_rtt_irq_fixup();
317+
}
318+
313319
static const struct of_device_id aic5_irq_fixups[] __initconst = {
314320
{ .compatible = "atmel,sama5d3", .data = sama5d3_aic_irq_fixup },
315321
{ .compatible = "atmel,sama5d4", .data = sama5d3_aic_irq_fixup },
316-
{ .compatible = "microchip,sam9x60", .data = sama5d3_aic_irq_fixup },
322+
{ .compatible = "microchip,sam9x60", .data = sam9x60_aic_irq_fixup },
317323
{ /* sentinel */ },
318324
};
319325

drivers/irqchip/irq-bcm7038-l1.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
#include <linux/irqchip.h>
2929
#include <linux/irqchip/chained_irq.h>
3030
#include <linux/syscore_ops.h>
31+
#ifdef CONFIG_ARM
32+
#include <asm/smp_plat.h>
33+
#endif
3134

3235
#define IRQS_PER_WORD 32
3336
#define REG_BYTES_PER_IRQ_WORD (sizeof(u32) * 4)
@@ -327,7 +330,11 @@ static int bcm7038_l1_suspend(void)
327330
u32 val;
328331

329332
/* Wakeup interrupt should only come from the boot cpu */
333+
#ifdef CONFIG_SMP
330334
boot_cpu = cpu_logical_map(0);
335+
#else
336+
boot_cpu = 0;
337+
#endif
331338

332339
list_for_each_entry(intc, &bcm7038_l1_intcs_list, list) {
333340
for (word = 0; word < intc->n_words; word++) {
@@ -347,7 +354,11 @@ static void bcm7038_l1_resume(void)
347354
struct bcm7038_l1_chip *intc;
348355
int boot_cpu, word;
349356

357+
#ifdef CONFIG_SMP
350358
boot_cpu = cpu_logical_map(0);
359+
#else
360+
boot_cpu = 0;
361+
#endif
351362

352363
list_for_each_entry(intc, &bcm7038_l1_intcs_list, list) {
353364
for (word = 0; word < intc->n_words; word++) {

drivers/irqchip/irq-bcm7120-l2.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ static int bcm7120_l2_intc_init_one(struct device_node *dn,
143143

144144
irq_set_chained_handler_and_data(parent_irq,
145145
bcm7120_l2_intc_irq_handle, l1_data);
146+
if (data->can_wake)
147+
enable_irq_wake(parent_irq);
148+
146149
return 0;
147150
}
148151

@@ -247,6 +250,8 @@ static int __init bcm7120_l2_intc_probe(struct device_node *dn,
247250
if (ret < 0)
248251
goto out_free_l1_data;
249252

253+
data->can_wake = of_property_read_bool(dn, "brcm,irq-can-wake");
254+
250255
for (irq = 0; irq < data->num_parent_irqs; irq++) {
251256
ret = bcm7120_l2_intc_init_one(dn, data, irq, valid_mask);
252257
if (ret)
@@ -274,9 +279,6 @@ static int __init bcm7120_l2_intc_probe(struct device_node *dn,
274279
goto out_free_domain;
275280
}
276281

277-
if (of_property_read_bool(dn, "brcm,irq-can-wake"))
278-
data->can_wake = true;
279-
280282
for (idx = 0; idx < data->n_words; idx++) {
281283
irq = idx * IRQS_PER_WORD;
282284
gc = irq_get_domain_generic_chip(data->domain, irq);

drivers/irqchip/irq-brcmstb-l2.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ static int __init brcmstb_l2_intc_of_init(struct device_node *np,
254254
*/
255255
data->gc->wake_enabled = 0xffffffff;
256256
ct->chip.irq_set_wake = irq_gc_set_wake;
257+
enable_irq_wake(parent_irq);
257258
}
258259

259260
pr_info("registered L2 intc (%pOF, parent irq: %d)\n", np, parent_irq);
@@ -275,6 +276,10 @@ static int __init brcmstb_l2_edge_intc_of_init(struct device_node *np,
275276
return brcmstb_l2_intc_of_init(np, parent, &l2_edge_intc_init);
276277
}
277278
IRQCHIP_DECLARE(brcmstb_l2_intc, "brcm,l2-intc", brcmstb_l2_edge_intc_of_init);
279+
IRQCHIP_DECLARE(brcmstb_hif_spi_l2_intc, "brcm,hif-spi-l2-intc",
280+
brcmstb_l2_edge_intc_of_init);
281+
IRQCHIP_DECLARE(brcmstb_upg_aux_aon_l2_intc, "brcm,upg-aux-aon-l2-intc",
282+
brcmstb_l2_edge_intc_of_init);
278283

279284
static int __init brcmstb_l2_lvl_intc_of_init(struct device_node *np,
280285
struct device_node *parent)

drivers/irqchip/irq-gic-v3-its.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2814,7 +2814,7 @@ static int allocate_vpe_l1_table(void)
28142814
if (val & GICR_VPROPBASER_4_1_VALID)
28152815
goto out;
28162816

2817-
gic_data_rdist()->vpe_table_mask = kzalloc(sizeof(cpumask_t), GFP_KERNEL);
2817+
gic_data_rdist()->vpe_table_mask = kzalloc(sizeof(cpumask_t), GFP_ATOMIC);
28182818
if (!gic_data_rdist()->vpe_table_mask)
28192819
return -ENOMEM;
28202820

@@ -2881,7 +2881,7 @@ static int allocate_vpe_l1_table(void)
28812881

28822882
pr_debug("np = %d, npg = %lld, psz = %d, epp = %d, esz = %d\n",
28832883
np, npg, psz, epp, esz);
2884-
page = alloc_pages(GFP_KERNEL | __GFP_ZERO, get_order(np * PAGE_SIZE));
2884+
page = alloc_pages(GFP_ATOMIC | __GFP_ZERO, get_order(np * PAGE_SIZE));
28852885
if (!page)
28862886
return -ENOMEM;
28872887

@@ -4090,18 +4090,22 @@ static void its_vpe_4_1_deschedule(struct its_vpe *vpe,
40904090
static void its_vpe_4_1_invall(struct its_vpe *vpe)
40914091
{
40924092
void __iomem *rdbase;
4093+
unsigned long flags;
40934094
u64 val;
4095+
int cpu;
40944096

40954097
val = GICR_INVALLR_V;
40964098
val |= FIELD_PREP(GICR_INVALLR_VPEID, vpe->vpe_id);
40974099

40984100
/* Target the redistributor this vPE is currently known on */
4099-
raw_spin_lock(&gic_data_rdist_cpu(vpe->col_idx)->rd_lock);
4100-
rdbase = per_cpu_ptr(gic_rdists->rdist, vpe->col_idx)->rd_base;
4101+
cpu = vpe_to_cpuid_lock(vpe, &flags);
4102+
raw_spin_lock(&gic_data_rdist_cpu(cpu)->rd_lock);
4103+
rdbase = per_cpu_ptr(gic_rdists->rdist, cpu)->rd_base;
41014104
gic_write_lpir(val, rdbase + GICR_INVALLR);
41024105

41034106
wait_for_syncr(rdbase);
4104-
raw_spin_unlock(&gic_data_rdist_cpu(vpe->col_idx)->rd_lock);
4107+
raw_spin_unlock(&gic_data_rdist_cpu(cpu)->rd_lock);
4108+
vpe_to_cpuid_unlock(vpe, flags);
41054109
}
41064110

41074111
static int its_vpe_4_1_set_vcpu_affinity(struct irq_data *d, void *vcpu_info)

0 commit comments

Comments
 (0)