Skip to content

Commit

Permalink
powerpc/32: use memset() instead of memset_io() to zero BSS
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christophe Leroy authored and Michael Ellerman committed May 2, 2019
1 parent adcf591 commit 7934cea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/powerpc/kernel/early_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ notrace unsigned long __init early_init(unsigned long dt_ptr)
{
unsigned long offset = reloc_offset();

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

/*
* Identify the CPU type and fix up code sections
Expand Down

0 comments on commit 7934cea

Please sign in to comment.