Skip to content

Commit 6132a49

Browse files
committed
Merge tag 'irqchip-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core
Pull irqchip updates frim Marc Zyngier: - More APCI fixes and improvements for the LoongArch architecture, adding support for the HTVEC irqchip, suspend-resume, and some PCI INTx workarounds - Initial DT support for LoongArch. I'm not even kidding. - Support for the MTK CIRQv2, a minor deviation from the original version - Error handling fixes for wpcm450, GIC... - BE detection for a FSL controller - Declare the Sifive PLIC as wake-up agnostic - Simplify fishing out the device data for the ST irqchip - Mark some data structures as __initconst in the apple-aic driver - Switch over from strtobool to kstrtobool - COMPILE_TEST fixes
2 parents e6d2210 + 6ed54e1 commit 6132a49

23 files changed

Lines changed: 557 additions & 144 deletions
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/interrupt-controller/loongarch,cpu-interrupt-controller.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: LoongArch CPU Interrupt Controller
8+
9+
maintainers:
10+
- Liu Peibao <liupeibao@loongson.cn>
11+
12+
properties:
13+
compatible:
14+
const: loongarch,cpu-interrupt-controller
15+
16+
'#interrupt-cells':
17+
const: 1
18+
19+
interrupt-controller: true
20+
21+
additionalProperties: false
22+
23+
required:
24+
- compatible
25+
- '#interrupt-cells'
26+
- interrupt-controller
27+
28+
examples:
29+
- |
30+
interrupt-controller {
31+
compatible = "loongarch,cpu-interrupt-controller";
32+
#interrupt-cells = <1>;
33+
interrupt-controller;
34+
};

Documentation/devicetree/bindings/interrupt-controller/mediatek,cirq.txt

Lines changed: 0 additions & 33 deletions
This file was deleted.
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/interrupt-controller/mediatek,mtk-cirq.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: MediaTek System Interrupt Controller
8+
9+
maintainers:
10+
- Youlin Pei <youlin.pei@mediatek.com>
11+
12+
description:
13+
In MediaTek SoCs, the CIRQ is a low power interrupt controller designed to
14+
work outside of MCUSYS which comprises with Cortex-Ax cores, CCI and GIC.
15+
The external interrupts (outside MCUSYS) will feed through CIRQ and connect
16+
to GIC in MCUSYS. When CIRQ is enabled, it will record the edge-sensitive
17+
interrupts and generate a pulse signal to parent interrupt controller when
18+
flush command is executed. With CIRQ, MCUSYS can be completely turned off
19+
to improve the system power consumption without losing interrupts.
20+
21+
22+
properties:
23+
compatible:
24+
items:
25+
- enum:
26+
- mediatek,mt2701-cirq
27+
- mediatek,mt8135-cirq
28+
- mediatek,mt8173-cirq
29+
- mediatek,mt8192-cirq
30+
- const: mediatek,mtk-cirq
31+
32+
reg:
33+
maxItems: 1
34+
35+
'#interrupt-cells':
36+
const: 3
37+
38+
interrupt-controller: true
39+
40+
mediatek,ext-irq-range:
41+
$ref: /schemas/types.yaml#/definitions/uint32-array
42+
items:
43+
- description: First CIRQ interrupt
44+
- description: Last CIRQ interrupt
45+
description:
46+
Identifies the range of external interrupts in different SoCs
47+
48+
required:
49+
- compatible
50+
- reg
51+
- '#interrupt-cells'
52+
- interrupt-controller
53+
- mediatek,ext-irq-range
54+
55+
additionalProperties: false
56+
57+
examples:
58+
- |
59+
#include <dt-bindings/interrupt-controller/irq.h>
60+
61+
cirq: interrupt-controller@10204000 {
62+
compatible = "mediatek,mt2701-cirq", "mediatek,mtk-cirq";
63+
reg = <0x10204000 0x400>;
64+
#interrupt-cells = <3>;
65+
interrupt-controller;
66+
interrupt-parent = <&sysirq>;
67+
mediatek,ext-irq-range = <32 200>;
68+
};

arch/loongarch/include/asm/irq.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ int liointc_acpi_init(struct irq_domain *parent,
9393
int eiointc_acpi_init(struct irq_domain *parent,
9494
struct acpi_madt_eio_pic *acpi_eiointc);
9595

96-
struct irq_domain *htvec_acpi_init(struct irq_domain *parent,
96+
int htvec_acpi_init(struct irq_domain *parent,
9797
struct acpi_madt_ht_pic *acpi_htvec);
9898
int pch_lpc_acpi_init(struct irq_domain *parent,
9999
struct acpi_madt_lpc_pic *acpi_pchlpc);

drivers/acpi/pci_irq.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,13 +387,15 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
387387
u8 pin;
388388
int triggering = ACPI_LEVEL_SENSITIVE;
389389
/*
390-
* On ARM systems with the GIC interrupt model, level interrupts
390+
* On ARM systems with the GIC interrupt model, or LoongArch
391+
* systems with the LPIC interrupt model, level interrupts
391392
* are always polarity high by specification; PCI legacy
392393
* IRQs lines are inverted before reaching the interrupt
393394
* controller and must therefore be considered active high
394395
* as default.
395396
*/
396-
int polarity = acpi_irq_model == ACPI_IRQ_MODEL_GIC ?
397+
int polarity = acpi_irq_model == ACPI_IRQ_MODEL_GIC ||
398+
acpi_irq_model == ACPI_IRQ_MODEL_LPIC ?
397399
ACPI_ACTIVE_HIGH : ACPI_ACTIVE_LOW;
398400
char *link = NULL;
399401
char link_desc[16];

drivers/irqchip/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ config ALPINE_MSI
8686

8787
config AL_FIC
8888
bool "Amazon's Annapurna Labs Fabric Interrupt Controller"
89-
depends on OF || COMPILE_TEST
89+
depends on OF
9090
select GENERIC_IRQ_CHIP
9191
select IRQ_DOMAIN
9292
help
@@ -576,6 +576,7 @@ config IRQ_LOONGARCH_CPU
576576
select GENERIC_IRQ_CHIP
577577
select IRQ_DOMAIN
578578
select GENERIC_IRQ_EFFECTIVE_AFF_MASK
579+
select LOONGSON_HTVEC
579580
select LOONGSON_LIOINTC
580581
select LOONGSON_EIOINTC
581582
select LOONGSON_PCH_PIC

drivers/irqchip/irq-apple-aic.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,14 +248,14 @@ struct aic_info {
248248
bool fast_ipi;
249249
};
250250

251-
static const struct aic_info aic1_info = {
251+
static const struct aic_info aic1_info __initconst = {
252252
.version = 1,
253253

254254
.event = AIC_EVENT,
255255
.target_cpu = AIC_TARGET_CPU,
256256
};
257257

258-
static const struct aic_info aic1_fipi_info = {
258+
static const struct aic_info aic1_fipi_info __initconst = {
259259
.version = 1,
260260

261261
.event = AIC_EVENT,
@@ -264,7 +264,7 @@ static const struct aic_info aic1_fipi_info = {
264264
.fast_ipi = true,
265265
};
266266

267-
static const struct aic_info aic2_info = {
267+
static const struct aic_info aic2_info __initconst = {
268268
.version = 2,
269269

270270
.irq_cfg = AIC2_IRQ_CFG,

drivers/irqchip/irq-gic-pm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ static int gic_probe(struct platform_device *pdev)
102102

103103
pm_runtime_enable(dev);
104104

105-
ret = pm_runtime_get_sync(dev);
105+
ret = pm_runtime_resume_and_get(dev);
106106
if (ret < 0)
107107
goto rpm_disable;
108108

drivers/irqchip/irq-gic-v3.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <linux/delay.h>
1313
#include <linux/interrupt.h>
1414
#include <linux/irqdomain.h>
15+
#include <linux/kstrtox.h>
1516
#include <linux/of.h>
1617
#include <linux/of_address.h>
1718
#include <linux/of_irq.h>
@@ -1171,7 +1172,7 @@ static bool gicv3_nolpi;
11711172

11721173
static int __init gicv3_nolpi_cfg(char *buf)
11731174
{
1174-
return strtobool(buf, &gicv3_nolpi);
1175+
return kstrtobool(buf, &gicv3_nolpi);
11751176
}
11761177
early_param("irqchip.gicv3_nolpi", gicv3_nolpi_cfg);
11771178

drivers/irqchip/irq-gic.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
*/
2020
#include <linux/init.h>
2121
#include <linux/kernel.h>
22+
#include <linux/kstrtox.h>
2223
#include <linux/err.h>
2324
#include <linux/module.h>
2425
#include <linux/list.h>
@@ -1332,7 +1333,7 @@ static bool gicv2_force_probe;
13321333

13331334
static int __init gicv2_force_probe_cfg(char *buf)
13341335
{
1335-
return strtobool(buf, &gicv2_force_probe);
1336+
return kstrtobool(buf, &gicv2_force_probe);
13361337
}
13371338
early_param("irqchip.gicv2_force_probe", gicv2_force_probe_cfg);
13381339

0 commit comments

Comments
 (0)