aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/ftrace.c
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2009-02-10 15:10:44 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-02-22 18:48:56 -0500
commit16c57b3620d77e0bc981da5ef32beae730512684 (patch)
tree115045916a264f56f55751ce2948d59e03b16c0c /arch/powerpc/kernel/ftrace.c
parentbb9b903527eb16c8fdad59a562c29e89f5dcf233 (diff)
powerpc: Unify opcode definitions and support
Create a new header that becomes a single location for defining PowerPC opcodes used by code that is either generationg instructions at runtime (fixups, debug, etc.), emulating instructions, or just compiling instructions old assemblers don't know about. We currently don't handle the floating point emulation or alignment decode as both are better handled by the specific decode support they already have. Added support for the new dcbzl, dcbal, msgsnd, tlbilx, & wait instructions since older assemblers don't know about them. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/ftrace.c')
-rw-r--r--arch/powerpc/kernel/ftrace.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c
index 4c75a1c0a5b4..5b5d16b2cac8 100644
--- a/arch/powerpc/kernel/ftrace.c
+++ b/arch/powerpc/kernel/ftrace.c
@@ -33,7 +33,7 @@
33#ifdef CONFIG_DYNAMIC_FTRACE 33#ifdef CONFIG_DYNAMIC_FTRACE
34static unsigned int ftrace_nop_replace(void) 34static unsigned int ftrace_nop_replace(void)
35{ 35{
36 return PPC_NOP_INSTR; 36 return PPC_INST_NOP;
37} 37}
38 38
39static unsigned int 39static unsigned int
@@ -302,7 +302,7 @@ __ftrace_make_nop(struct module *mod,
302 return -EINVAL; 302 return -EINVAL;
303 } 303 }
304 304
305 op = PPC_NOP_INSTR; 305 op = PPC_INST_NOP;
306 306
307 if (probe_kernel_write((void *)ip, &op, MCOUNT_INSN_SIZE)) 307 if (probe_kernel_write((void *)ip, &op, MCOUNT_INSN_SIZE))
308 return -EPERM; 308 return -EPERM;
@@ -380,7 +380,7 @@ __ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
380 * b +8; ld r2,40(r1) 380 * b +8; ld r2,40(r1)
381 */ 381 */
382 if (((op[0] != 0x48000008) || (op[1] != 0xe8410028)) && 382 if (((op[0] != 0x48000008) || (op[1] != 0xe8410028)) &&
383 ((op[0] != PPC_NOP_INSTR) || (op[1] != PPC_NOP_INSTR))) { 383 ((op[0] != PPC_INST_NOP) || (op[1] != PPC_INST_NOP))) {
384 printk(KERN_ERR "Expected NOPs but have %x %x\n", op[0], op[1]); 384 printk(KERN_ERR "Expected NOPs but have %x %x\n", op[0], op[1]);
385 return -EINVAL; 385 return -EINVAL;
386 } 386 }
@@ -423,7 +423,7 @@ __ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
423 return -EFAULT; 423 return -EFAULT;
424 424
425 /* It should be pointing to a nop */ 425 /* It should be pointing to a nop */
426 if (op != PPC_NOP_INSTR) { 426 if (op != PPC_INST_NOP) {
427 printk(KERN_ERR "Expected NOP but have %x\n", op); 427 printk(KERN_ERR "Expected NOP but have %x\n", op);
428 return -EINVAL; 428 return -EINVAL;
429 } 429 }