@@ -10,7 +10,6 @@
#define _PPC_BOOK3S_64_HW_BREAKPOINT_H
#include <asm/cpu_has_feature.h>
-#include <asm/inst.h>
#ifdef __KERNEL__
struct arch_hw_breakpoint {
@@ -3,6 +3,7 @@
#define _ASM_POWERPC_INST_H
#include <asm/ppc-opcode.h>
+#include <asm/reg.h>
#define ___get_user_instr(gu_op, dest, ptr) \
({ \
@@ -35,13 +36,6 @@
*/
#if defined(CONFIG_PPC64) || defined(__CHECKER__)
-typedef struct {
- u32 val;
-#ifdef CONFIG_PPC64
- u32 suffix;
-#endif
-} __packed ppc_inst_t;
-
static inline u32 ppc_inst_val(ppc_inst_t x)
{
return x.val;
@@ -50,8 +44,6 @@ static inline u32 ppc_inst_val(ppc_inst_t x)
#define ppc_inst(x) ((ppc_inst_t){ .val = (x) })
#else
-typedef u32 ppc_inst_t;
-
static inline u32 ppc_inst_val(ppc_inst_t x)
{
return x;
@@ -1366,6 +1366,18 @@
/* Macros for setting and retrieving special purpose registers */
#ifndef __ASSEMBLY__
+
+#if defined(CONFIG_PPC64) || defined(__CHECKER__)
+typedef struct {
+ u32 val;
+#ifdef CONFIG_PPC64
+ u32 suffix;
+#endif
+} __packed ppc_inst_t;
+#else
+typedef u32 ppc_inst_t;
+#endif
+
#define mfmsr() ({unsigned long rval; \
asm volatile("mfmsr %0" : "=r" (rval) : \
: "memory"); rval;})
@@ -11,7 +11,6 @@
#include <linux/notifier.h>
#include <asm/probes.h>
-#include <asm/inst.h>
typedef ppc_opcode_t uprobe_opcode_t;
Because of circular inclusion of asm/hw_breakpoint.h, we need to move definition of asm/reg.h outside of inst.h so that asm/hw_breakpoint.h gets it without including asm/inst.h Also remove asm/inst.h from asm/uprobes.h as it's not needed anymore. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> --- v4: New to support inlining of copy_inst_from_kernel_nofault() in following patch. --- arch/powerpc/include/asm/hw_breakpoint.h | 1 - arch/powerpc/include/asm/inst.h | 10 +--------- arch/powerpc/include/asm/reg.h | 12 ++++++++++++ arch/powerpc/include/asm/uprobes.h | 1 - 4 files changed, 13 insertions(+), 11 deletions(-)