1
0
Fork 0

powerpc/32: use patch_site_addr() in machine_init()

Use patch_site_addr() instead of hardcoding the
address calculation in machine_init()

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
hifive-unleashed-5.1
Christophe Leroy 2018-11-09 17:33:20 +00:00 committed by Michael Ellerman
parent 36b08b431e
commit 04b0a72f28
1 changed files with 1 additions and 2 deletions

View File

@ -101,8 +101,7 @@ notrace unsigned long __init early_init(unsigned long dt_ptr)
*/
notrace void __init machine_init(u64 dt_ptr)
{
unsigned int *addr = (unsigned int *)((unsigned long)&patch__memset_nocache +
patch__memset_nocache);
unsigned int *addr = (unsigned int *)patch_site_addr(&patch__memset_nocache);
unsigned long insn;
/* Configure static keys first, now that we're relocated. */