Skip to content

Commit

Permalink
powerpc/modules: Improve restore_r2() error message
Browse files Browse the repository at this point in the history
Print the function address associated with the restore_r2() error to
make it easier to debug the problem.

Also clarify the wording a bit.

Before:

  module_64: patch_foo: Expect noop after relocate, got 3c820000

After:

  module_64: patch_foo: Expected nop after call, got 7c630034 at netdev_has_upper_dev+0x54/0xb0 [patch_foo]

Signed-off-by: Josh Poimboeuf <[email protected]>
Signed-off-by: Kamalesh Babulal <[email protected]>
[mpe: Change noop to nop, as that's the name of the instruction]
Signed-off-by: Michael Ellerman <[email protected]>
  • Loading branch information
jpoimboe authored and mpe committed Dec 11, 2017
1 parent b9eab08 commit 1ea61ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/powerpc/kernel/module_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,8 +501,8 @@ static int restore_r2(u32 *instruction, struct module *me)
return 1;

if (*instruction != PPC_INST_NOP) {
pr_err("%s: Expect noop after relocate, got %08x\n",
me->name, *instruction);
pr_err("%s: Expected nop after call, got %08x at %pS\n",
me->name, *instruction, instruction);
return 0;
}
/* ld r2,R2_STACK_OFFSET(r1) */
Expand Down

0 comments on commit 1ea61ea

Please sign in to comment.