[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231026020116.4238-1-fangxiang3@xiaomi.com>
Date: Thu, 26 Oct 2023 10:01:16 +0800
From: Fang Xiang <fangxiang3@...omi.com>
To: <tglx@...utronix.de>, <maz@...nel.org>,
<linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>
CC: <fangxiang3@...omi.com>
Subject: [PATCH] irqchip/gic-v3-its: Fix the coherent issue in its_setup_baser() when shr = 0.
The table would not be flushed if the input parameter shr = 0 in its_setup_baser() and
it would cause a coherent problem.
Signed-off-by: Fang Xiang <fangxiang3@...omi.com>
---
drivers/irqchip/irq-gic-v3-its.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 75a2dd550625..58a9f24ccfa7 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -2394,13 +2394,15 @@ static int its_setup_baser(struct its_node *its, struct its_baser *baser,
* non-cacheable as well.
*/
shr = tmp & GITS_BASER_SHAREABILITY_MASK;
- if (!shr) {
+ if (!shr)
cache = GITS_BASER_nC;
- gic_flush_dcache_to_poc(base, PAGE_ORDER_TO_SIZE(order));
- }
+
goto retry_baser;
}
+ if (!shr)
+ gic_flush_dcache_to_poc(base, PAGE_ORDER_TO_SIZE(order));
+
if (val != tmp) {
pr_err("ITS@%pa: %s doesn't stick: %llx %llx\n",
&its->phys_base, its_base_type_string[type],
--
2.34.1
Powered by blists - more mailing lists