From 49b17d01ac48949cdaa756a29657d59061822fa7 Mon Sep 17 00:00:00 2001 From: zhao maosheng Date: Tue, 6 Feb 2024 10:20:27 +0800 Subject: [PATCH] preventing erroneous optimization of rt_ioremap_early --- libcpu/aarch64/common/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcpu/aarch64/common/mmu.c b/libcpu/aarch64/common/mmu.c index 2485949367..68270df4ef 100644 --- a/libcpu/aarch64/common/mmu.c +++ b/libcpu/aarch64/common/mmu.c @@ -604,7 +604,7 @@ static int _map_single_page_2M(unsigned long *lv0_tbl, unsigned long va, void *rt_ioremap_early(void *paddr, size_t size) { - size_t count; + volatile size_t count; rt_ubase_t base; static void *tbl = RT_NULL;