Commit 04b0a72f authored by Christophe Leroy's avatar Christophe Leroy Committed by Michael Ellerman

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: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 36b08b43
...@@ -101,8 +101,7 @@ notrace unsigned long __init early_init(unsigned long dt_ptr) ...@@ -101,8 +101,7 @@ notrace unsigned long __init early_init(unsigned long dt_ptr)
*/ */
notrace void __init machine_init(u64 dt_ptr) notrace void __init machine_init(u64 dt_ptr)
{ {
unsigned int *addr = (unsigned int *)((unsigned long)&patch__memset_nocache + unsigned int *addr = (unsigned int *)patch_site_addr(&patch__memset_nocache);
patch__memset_nocache);
unsigned long insn; unsigned long insn;
/* Configure static keys first, now that we're relocated. */ /* Configure static keys first, now that we're relocated. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment