Skip to content

Commit 7934cea

Browse files
chleroympe
authored andcommitted
powerpc/32: use memset() instead of memset_io() to zero BSS
Since commit 400c47d ("powerpc32: memset: only use dcbz once cache is enabled"), memset() can be used before activation of the cache, so no need to use memset_io() for zeroing the BSS. Acked-by: Dmitry Vyukov <dvyukov@google.com> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent adcf591 commit 7934cea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/powerpc/kernel/early_32.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ notrace unsigned long __init early_init(unsigned long dt_ptr)
2121
{
2222
unsigned long offset = reloc_offset();
2323

24-
/* First zero the BSS -- use memset_io, some platforms don't have caches on yet */
25-
memset_io((void __iomem *)PTRRELOC(&__bss_start), 0, __bss_stop - __bss_start);
24+
/* First zero the BSS */
25+
memset(PTRRELOC(&__bss_start), 0, __bss_stop - __bss_start);
2626

2727
/*
2828
* Identify the CPU type and fix up code sections

0 commit comments

Comments
 (0)