public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] irqchip/gic-v4.1:fix the kdump GIC ITS RAS error for ITS BASER2
@ 2021-12-14  6:47 Jay Chen
  2021-12-14  9:26 ` Marc Zyngier
  2021-12-16 15:24 ` [irqchip: irq/irqchip-next] irqchip/gic-v4: Disable redistributors' view of the VPE table at boot time irqchip-bot for Marc Zyngier
  0 siblings, 2 replies; 5+ messages in thread
From: Jay Chen @ 2021-12-14  6:47 UTC (permalink / raw)
  To: tglx, maz, linux-kernel; +Cc: zhangliguang

We encounter a GIC RAS Error in below flow:
(1) Configure ITS related register (including
	GITS_BASER2, GITS_BASER2.valid = 1'b1)
(2) Configure GICR related register (including
	GICR_VPROPBASER, GICR_VPROPBASER.valid = 1'b1)
The common settings in above 2 register are the same
and currently everything is OK
(3) Kernel panic and os start the kdump flow.And then os
reconfigure ITS related register (including GITS_BASER2,
GITS_BASER2.valid = 1'b1). But at this time, gicr_vpropbaser
is not initialized, so it is still an old value. At this point,
the new value of its_baser2 and the old value of gicr_vpropbaser is
different, resulting in its RAS error.

https://bugzilla.kernel.org/show_bug.cgi?id=215327

Signed-off-by: Jay Chen <jkchen@linux.alibaba.com>
---
 drivers/irqchip/irq-gic-v3-its.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index eb0882d15366..c340bbf4427b 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -2623,6 +2623,12 @@ static int its_alloc_tables(struct its_node *its)
 			return err;
 		}
 
+		if ((i == 2) && is_kdump_kernel() && is_v4_1(its)) {
+			val = its_read_baser(its, baser);
+			val &= ~GITS_BASER_VALID;
+			its_write_baser(its, baser, val);
+		}
+
 		/* Update settings which will be used for next BASERn */
 		cache = baser->val & GITS_BASER_CACHEABILITY_MASK;
 		shr = baser->val & GITS_BASER_SHAREABILITY_MASK;
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-12-16 15:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-14  6:47 [RFC PATCH] irqchip/gic-v4.1:fix the kdump GIC ITS RAS error for ITS BASER2 Jay Chen
2021-12-14  9:26 ` Marc Zyngier
2021-12-14  9:52   ` Lorenzo Pieralisi
2021-12-16  3:36   ` Jiankang Chen
2021-12-16 15:24 ` [irqchip: irq/irqchip-next] irqchip/gic-v4: Disable redistributors' view of the VPE table at boot time irqchip-bot for Marc Zyngier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox