Skip to content

Commit

Permalink
powerpc/32: use patch_site_addr() in machine_init()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christophe Leroy authored and Michael Ellerman committed Dec 19, 2018
1 parent 36b08b4 commit 04b0a72
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/powerpc/kernel/setup_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit 04b0a72

Please sign in to comment.