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>
This commit is contained in:

کامیت شده توسط
Benjamin Herrenschmidt

والد
bb9b903527
کامیت
16c57b3620
@@ -33,7 +33,7 @@
|
||||
#ifdef CONFIG_DYNAMIC_FTRACE
|
||||
static unsigned int ftrace_nop_replace(void)
|
||||
{
|
||||
return PPC_NOP_INSTR;
|
||||
return PPC_INST_NOP;
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
@@ -302,7 +302,7 @@ __ftrace_make_nop(struct module *mod,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
op = PPC_NOP_INSTR;
|
||||
op = PPC_INST_NOP;
|
||||
|
||||
if (probe_kernel_write((void *)ip, &op, MCOUNT_INSN_SIZE))
|
||||
return -EPERM;
|
||||
@@ -380,7 +380,7 @@ __ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
|
||||
* b +8; ld r2,40(r1)
|
||||
*/
|
||||
if (((op[0] != 0x48000008) || (op[1] != 0xe8410028)) &&
|
||||
((op[0] != PPC_NOP_INSTR) || (op[1] != PPC_NOP_INSTR))) {
|
||||
((op[0] != PPC_INST_NOP) || (op[1] != PPC_INST_NOP))) {
|
||||
printk(KERN_ERR "Expected NOPs but have %x %x\n", op[0], op[1]);
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -423,7 +423,7 @@ __ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
|
||||
return -EFAULT;
|
||||
|
||||
/* It should be pointing to a nop */
|
||||
if (op != PPC_NOP_INSTR) {
|
||||
if (op != PPC_INST_NOP) {
|
||||
printk(KERN_ERR "Expected NOP but have %x\n", op);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
مرجع در شماره جدید
Block a user