Thread (80 messages) 80 messages, 7 authors, 2021-05-20

Re: [PATCH v8 08/30] powerpc: Use a function for getting the instruction op code

From: Jordan Niethe <hidden>
Date: 2020-05-17 07:43:01

On Sat, May 16, 2020 at 9:08 PM Michael Ellerman [off-list ref] wrote:
Jordan Niethe [off-list ref] writes:
quoted
mpe, as suggested by Christophe could you please add this.
I did that and ...
quoted
diff --git a/arch/powerpc/include/asm/inst.h b/arch/powerpc/include/asm/inst.h
--- a/arch/powerpc/include/asm/inst.h
+++ b/arch/powerpc/include/asm/inst.h
@@ -2,6 +2,8 @@
 #ifndef _ASM_INST_H
 #define _ASM_INST_H

+#include <asm/disassemble.h>
.. this eventually breaks the build in some driver, because get_ra() is
redefined.

So I've backed out this change for now.
Thanks, that is fine with me.
If we want to use the macros in disassemble.h we'll need to namespace
them better, eg. make them ppc_get_ra() and so on.

cheers
quoted
 /*
  * Instruction data type for POWER
  */
@@ -15,7 +17,7 @@ static inline u32 ppc_inst_val(u32 x)

 static inline int ppc_inst_primary_opcode(u32 x)
 {
-    return ppc_inst_val(x) >> 26;
+    return get_op(ppc_inst_val(x));
 }

 #endif /* _ASM_INST_H */
--
2.17.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help