Skip to content

Commit

Permalink
powerpc/smp: Use code patching to restore reset vector
Browse files Browse the repository at this point in the history
Instead of hardcoding reset vector restore, use patch_instruction()

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 6c16816 commit 8a01960
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions arch/powerpc/platforms/86xx/mpc86xx_smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ smp_86xx_kick_cpu(int nr)
mdelay(1);

/* Restore the exception vector */
*vector = save_vector;
flush_icache_range((unsigned long) vector, (unsigned long) vector + 4);
patch_instruction(vector, save_vector);

local_irq_restore(flags);

Expand Down
3 changes: 1 addition & 2 deletions arch/powerpc/platforms/powermac/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -832,8 +832,7 @@ static int smp_core99_kick_cpu(int nr)
mdelay(1);

/* Restore our exception vector */
*vector = save_vector;
flush_icache_range((unsigned long) vector, (unsigned long) vector + 4);
patch_instruction(vector, save_vector);

local_irq_restore(flags);
if (ppc_md.progress) ppc_md.progress("smp_core99_kick_cpu done", 0x347);
Expand Down

0 comments on commit 8a01960

Please sign in to comment.