diff mbox series

[v1,3/5] arm64: cache_v8: Use memset_simple() in create_table()

Message ID 20210806133843.3642916-4-sr@denx.de
State Superseded
Delegated to: Tom Rini
Headers show
Series arm64: Add optimized memset/memcpy functions | expand

Commit Message

Stefan Roese Aug. 6, 2021, 1:38 p.m. UTC
create_table() is called very early in the boot process, before the
caches are enabled. Because of this, the optimized memset() version
can't be used here. With this patch, the simple memset version
memset_simple() is used here instead.

Signed-off-by: Stefan Roese <sr@denx.de>
---

 arch/arm/cpu/armv8/cache_v8.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/arch/arm/cpu/armv8/cache_v8.c b/arch/arm/cpu/armv8/cache_v8.c
index 3de18c7675b9..04c437aebabf 100644
--- a/arch/arm/cpu/armv8/cache_v8.c
+++ b/arch/arm/cpu/armv8/cache_v8.c
@@ -159,7 +159,7 @@  static u64 *create_table(void)
 			gd->arch.tlb_size);
 
 	/* Mark all entries as invalid */
-	memset(new_table, 0, pt_len);
+	memset_simple(new_table, 0, pt_len);
 
 	return new_table;
 }