Skip to content

Commit 63f4993

Browse files
committed
Merge tag 'irq_urgent_for_v6.13_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq fixes from Borislav Petkov: - Move the ->select callback to the correct ops structure in irq-mvebu-sei to fix some Marvell Armada platforms - Add a workaround for Hisilicon ITS erratum 162100801 which can cause some virtual interrupts to get lost - More platform_driver::remove() conversion * tag 'irq_urgent_for_v6.13_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip: Switch back to struct platform_driver::remove() irqchip/gicv3-its: Add workaround for hip09 ITS erratum 162100801 irqchip/irq-mvebu-sei: Move misplaced select() callback to SEI CP domain
2 parents 58ac609 + cc47268 commit 63f4993

16 files changed

+65
-24
lines changed

Documentation/arch/arm64/silicon-errata.rst

+2
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,8 @@ stable kernels.
258258
| Hisilicon | Hip{08,09,10,10C| #162001900 | N/A |
259259
| | ,11} SMMU PMCG | | |
260260
+----------------+-----------------+-----------------+-----------------------------+
261+
| Hisilicon | Hip09 | #162100801 | HISILICON_ERRATUM_162100801 |
262+
+----------------+-----------------+-----------------+-----------------------------+
261263
+----------------+-----------------+-----------------+-----------------------------+
262264
| Qualcomm Tech. | Kryo/Falkor v1 | E1003 | QCOM_FALKOR_ERRATUM_1003 |
263265
+----------------+-----------------+-----------------+-----------------------------+

arch/arm64/Kconfig

+11
Original file line numberDiff line numberDiff line change
@@ -1235,6 +1235,17 @@ config HISILICON_ERRATUM_161600802
12351235

12361236
If unsure, say Y.
12371237

1238+
config HISILICON_ERRATUM_162100801
1239+
bool "Hip09 162100801 erratum support"
1240+
default y
1241+
help
1242+
When enabling GICv4.1 in hip09, VMAPP will fail to clear some caches
1243+
during unmapping operation, which will cause some vSGIs lost.
1244+
To fix the issue, invalidate related vPE cache through GICR_INVALLR
1245+
after VMOVP.
1246+
1247+
If unsure, say Y.
1248+
12381249
config QCOM_FALKOR_ERRATUM_1003
12391250
bool "Falkor E1003: Incorrect translation due to ASID change"
12401251
default y

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

+39-11
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
#define ITS_FLAGS_WORKAROUND_CAVIUM_22375 (1ULL << 1)
4848
#define ITS_FLAGS_WORKAROUND_CAVIUM_23144 (1ULL << 2)
4949
#define ITS_FLAGS_FORCE_NON_SHAREABLE (1ULL << 3)
50+
#define ITS_FLAGS_WORKAROUND_HISILICON_162100801 (1ULL << 4)
5051

5152
#define RD_LOCAL_LPI_ENABLED BIT(0)
5253
#define RD_LOCAL_PENDTABLE_PREALLOCATED BIT(1)
@@ -64,6 +65,7 @@ static u32 lpi_id_bits;
6465
#define LPI_PENDBASE_SZ ALIGN(BIT(LPI_NRBITS) / 8, SZ_64K)
6566

6667
static u8 __ro_after_init lpi_prop_prio;
68+
static struct its_node *find_4_1_its(void);
6769

6870
/*
6971
* Collection structure - just an ID, and a redistributor address to
@@ -3883,13 +3885,28 @@ static void its_vpe_db_proxy_move(struct its_vpe *vpe, int from, int to)
38833885
raw_spin_unlock_irqrestore(&vpe_proxy.lock, flags);
38843886
}
38853887

3888+
static void its_vpe_4_1_invall_locked(int cpu, struct its_vpe *vpe)
3889+
{
3890+
void __iomem *rdbase;
3891+
u64 val;
3892+
3893+
val = GICR_INVALLR_V;
3894+
val |= FIELD_PREP(GICR_INVALLR_VPEID, vpe->vpe_id);
3895+
3896+
guard(raw_spinlock)(&gic_data_rdist_cpu(cpu)->rd_lock);
3897+
rdbase = per_cpu_ptr(gic_rdists->rdist, cpu)->rd_base;
3898+
gic_write_lpir(val, rdbase + GICR_INVALLR);
3899+
wait_for_syncr(rdbase);
3900+
}
3901+
38863902
static int its_vpe_set_affinity(struct irq_data *d,
38873903
const struct cpumask *mask_val,
38883904
bool force)
38893905
{
38903906
struct its_vpe *vpe = irq_data_get_irq_chip_data(d);
38913907
unsigned int from, cpu = nr_cpu_ids;
38923908
struct cpumask *table_mask;
3909+
struct its_node *its;
38933910
unsigned long flags;
38943911

38953912
/*
@@ -3952,6 +3969,11 @@ static int its_vpe_set_affinity(struct irq_data *d,
39523969
vpe->col_idx = cpu;
39533970

39543971
its_send_vmovp(vpe);
3972+
3973+
its = find_4_1_its();
3974+
if (its && its->flags & ITS_FLAGS_WORKAROUND_HISILICON_162100801)
3975+
its_vpe_4_1_invall_locked(cpu, vpe);
3976+
39553977
its_vpe_db_proxy_move(vpe, from, cpu);
39563978

39573979
out:
@@ -4259,22 +4281,12 @@ static void its_vpe_4_1_deschedule(struct its_vpe *vpe,
42594281

42604282
static void its_vpe_4_1_invall(struct its_vpe *vpe)
42614283
{
4262-
void __iomem *rdbase;
42634284
unsigned long flags;
4264-
u64 val;
42654285
int cpu;
42664286

4267-
val = GICR_INVALLR_V;
4268-
val |= FIELD_PREP(GICR_INVALLR_VPEID, vpe->vpe_id);
4269-
42704287
/* Target the redistributor this vPE is currently known on */
42714288
cpu = vpe_to_cpuid_lock(vpe, &flags);
4272-
raw_spin_lock(&gic_data_rdist_cpu(cpu)->rd_lock);
4273-
rdbase = per_cpu_ptr(gic_rdists->rdist, cpu)->rd_base;
4274-
gic_write_lpir(val, rdbase + GICR_INVALLR);
4275-
4276-
wait_for_syncr(rdbase);
4277-
raw_spin_unlock(&gic_data_rdist_cpu(cpu)->rd_lock);
4289+
its_vpe_4_1_invall_locked(cpu, vpe);
42784290
vpe_to_cpuid_unlock(vpe, flags);
42794291
}
42804292

@@ -4867,6 +4879,14 @@ static bool its_set_non_coherent(void *data)
48674879
return true;
48684880
}
48694881

4882+
static bool __maybe_unused its_enable_quirk_hip09_162100801(void *data)
4883+
{
4884+
struct its_node *its = data;
4885+
4886+
its->flags |= ITS_FLAGS_WORKAROUND_HISILICON_162100801;
4887+
return true;
4888+
}
4889+
48704890
static const struct gic_quirk its_quirks[] = {
48714891
#ifdef CONFIG_CAVIUM_ERRATUM_22375
48724892
{
@@ -4913,6 +4933,14 @@ static const struct gic_quirk its_quirks[] = {
49134933
.init = its_enable_quirk_hip07_161600802,
49144934
},
49154935
#endif
4936+
#ifdef CONFIG_HISILICON_ERRATUM_162100801
4937+
{
4938+
.desc = "ITS: Hip09 erratum 162100801",
4939+
.iidr = 0x00051736,
4940+
.mask = 0xffffffff,
4941+
.init = its_enable_quirk_hip09_162100801,
4942+
},
4943+
#endif
49164944
#ifdef CONFIG_ROCKCHIP_ERRATUM_3588001
49174945
{
49184946
.desc = "ITS: Rockchip erratum RK3588001",

drivers/irqchip/irq-imgpdc.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ static struct platform_driver pdc_intc_driver = {
479479
.of_match_table = pdc_intc_match,
480480
},
481481
.probe = pdc_intc_probe,
482-
.remove_new = pdc_intc_remove,
482+
.remove = pdc_intc_remove,
483483
};
484484

485485
static int __init pdc_intc_init(void)

drivers/irqchip/irq-imx-intmux.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,6 @@ static struct platform_driver imx_intmux_driver = {
361361
.pm = &imx_intmux_pm_ops,
362362
},
363363
.probe = imx_intmux_probe,
364-
.remove_new = imx_intmux_remove,
364+
.remove = imx_intmux_remove,
365365
};
366366
builtin_platform_driver(imx_intmux_driver);

drivers/irqchip/irq-imx-irqsteer.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,6 @@ static struct platform_driver imx_irqsteer_driver = {
328328
.pm = &imx_irqsteer_pm_ops,
329329
},
330330
.probe = imx_irqsteer_probe,
331-
.remove_new = imx_irqsteer_remove,
331+
.remove = imx_irqsteer_remove,
332332
};
333333
builtin_platform_driver(imx_irqsteer_driver);

drivers/irqchip/irq-keystone.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ MODULE_DEVICE_TABLE(of, keystone_irq_dt_ids);
211211

212212
static struct platform_driver keystone_irq_device_driver = {
213213
.probe = keystone_irq_probe,
214-
.remove_new = keystone_irq_remove,
214+
.remove = keystone_irq_remove,
215215
.driver = {
216216
.name = "keystone_irq",
217217
.of_match_table = of_match_ptr(keystone_irq_dt_ids),

drivers/irqchip/irq-ls-scfg-msi.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ static struct platform_driver ls_scfg_msi_driver = {
418418
.of_match_table = ls_scfg_msi_id,
419419
},
420420
.probe = ls_scfg_msi_probe,
421-
.remove_new = ls_scfg_msi_remove,
421+
.remove = ls_scfg_msi_remove,
422422
};
423423

424424
module_platform_driver(ls_scfg_msi_driver);

drivers/irqchip/irq-madera.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ static void madera_irq_remove(struct platform_device *pdev)
236236

237237
static struct platform_driver madera_irq_driver = {
238238
.probe = madera_irq_probe,
239-
.remove_new = madera_irq_remove,
239+
.remove = madera_irq_remove,
240240
.driver = {
241241
.name = "madera-irq",
242242
.pm = &madera_irq_pm_ops,

drivers/irqchip/irq-mvebu-pic.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ MODULE_DEVICE_TABLE(of, mvebu_pic_of_match);
183183

184184
static struct platform_driver mvebu_pic_driver = {
185185
.probe = mvebu_pic_probe,
186-
.remove_new = mvebu_pic_remove,
186+
.remove = mvebu_pic_remove,
187187
.driver = {
188188
.name = "mvebu-pic",
189189
.of_match_table = mvebu_pic_of_match,

drivers/irqchip/irq-mvebu-sei.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ static void mvebu_sei_domain_free(struct irq_domain *domain, unsigned int virq,
192192
}
193193

194194
static const struct irq_domain_ops mvebu_sei_domain_ops = {
195-
.select = msi_lib_irq_domain_select,
196195
.alloc = mvebu_sei_domain_alloc,
197196
.free = mvebu_sei_domain_free,
198197
};
@@ -306,6 +305,7 @@ static void mvebu_sei_cp_domain_free(struct irq_domain *domain,
306305
}
307306

308307
static const struct irq_domain_ops mvebu_sei_cp_domain_ops = {
308+
.select = msi_lib_irq_domain_select,
309309
.alloc = mvebu_sei_cp_domain_alloc,
310310
.free = mvebu_sei_cp_domain_free,
311311
};

drivers/irqchip/irq-pruss-intc.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ static struct platform_driver pruss_intc_driver = {
648648
.suppress_bind_attrs = true,
649649
},
650650
.probe = pruss_intc_probe,
651-
.remove_new = pruss_intc_remove,
651+
.remove = pruss_intc_remove,
652652
};
653653
module_platform_driver(pruss_intc_driver);
654654

drivers/irqchip/irq-renesas-intc-irqpin.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ static SIMPLE_DEV_PM_OPS(intc_irqpin_pm_ops, intc_irqpin_suspend, NULL);
584584

585585
static struct platform_driver intc_irqpin_device_driver = {
586586
.probe = intc_irqpin_probe,
587-
.remove_new = intc_irqpin_remove,
587+
.remove = intc_irqpin_remove,
588588
.driver = {
589589
.name = "renesas_intc_irqpin",
590590
.of_match_table = intc_irqpin_dt_ids,

drivers/irqchip/irq-renesas-irqc.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ MODULE_DEVICE_TABLE(of, irqc_dt_ids);
247247

248248
static struct platform_driver irqc_device_driver = {
249249
.probe = irqc_probe,
250-
.remove_new = irqc_remove,
250+
.remove = irqc_remove,
251251
.driver = {
252252
.name = "renesas_irqc",
253253
.of_match_table = irqc_dt_ids,

drivers/irqchip/irq-renesas-rza1.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ MODULE_DEVICE_TABLE(of, rza1_irqc_dt_ids);
259259

260260
static struct platform_driver rza1_irqc_device_driver = {
261261
.probe = rza1_irqc_probe,
262-
.remove_new = rza1_irqc_remove,
262+
.remove = rza1_irqc_remove,
263263
.driver = {
264264
.name = "renesas_rza1_irqc",
265265
.of_match_table = rza1_irqc_dt_ids,

drivers/irqchip/irq-ts4800.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ MODULE_DEVICE_TABLE(of, ts4800_ic_of_match);
154154

155155
static struct platform_driver ts4800_ic_driver = {
156156
.probe = ts4800_ic_probe,
157-
.remove_new = ts4800_ic_remove,
157+
.remove = ts4800_ic_remove,
158158
.driver = {
159159
.name = "ts4800-irqc",
160160
.of_match_table = ts4800_ic_of_match,

0 commit comments

Comments
 (0)