diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2008-06-23 21:32:35 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-06-30 21:28:23 -0400 |
commit | b7bcda631e87eb3466d0baa9885650ba7d7ed89d (patch) | |
tree | 3a04957c5f1b22e2d4405ccdaa980e6e513ef388 /arch/powerpc/kernel/module_64.c | |
parent | ae0dc73625f9b0e636ccd130e394c9b654a062fb (diff) |
powerpc: Add PPC_NOP_INSTR, a hash define for the preferred nop instruction
A bunch of code has hard-coded the value for a "nop" instruction, it
would be nice to have a #define for it.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/module_64.c')
-rw-r--r-- | arch/powerpc/kernel/module_64.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c index 4803f2de98dd..ee6a2982d567 100644 --- a/arch/powerpc/kernel/module_64.c +++ b/arch/powerpc/kernel/module_64.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <asm/module.h> | 24 | #include <asm/module.h> |
25 | #include <asm/uaccess.h> | 25 | #include <asm/uaccess.h> |
26 | #include <asm/firmware.h> | 26 | #include <asm/firmware.h> |
27 | #include <asm/code-patching.h> | ||
27 | #include <linux/sort.h> | 28 | #include <linux/sort.h> |
28 | 29 | ||
29 | #include "setup.h" | 30 | #include "setup.h" |
@@ -330,7 +331,7 @@ static unsigned long stub_for_addr(Elf64_Shdr *sechdrs, | |||
330 | restore r2. */ | 331 | restore r2. */ |
331 | static int restore_r2(u32 *instruction, struct module *me) | 332 | static int restore_r2(u32 *instruction, struct module *me) |
332 | { | 333 | { |
333 | if (*instruction != 0x60000000) { | 334 | if (*instruction != PPC_NOP_INSTR) { |
334 | printk("%s: Expect noop after relocate, got %08x\n", | 335 | printk("%s: Expect noop after relocate, got %08x\n", |
335 | me->name, *instruction); | 336 | me->name, *instruction); |
336 | return 0; | 337 | return 0; |