Skip to contentSkip to conversation

arm64/fpsimd: add <asm/insn.h> to <asm/kprobes.h> to fix fpsimd build

PATCH Applied Randy Dunlap 2 participants 2 messages Nov 23, 2020 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64/fpsimd: add <asm/insn.h> to <asm/kprobes.h> to fix fpsimd build

Adding <asm/exception.h> brought in <asm/kprobes.h> which uses <asm/probes.h>, which uses 'pstate_check_t' so the latter needs to #include <asm/insn.h> for this typedef.

Fixes this build error:

In file included from arch/arm64/include/asm/kprobes.h:24,

                    from arch/arm64/include/asm/exception.h:11,
                    from arch/arm64/kernel/fpsimd.c:35:
  arch/arm64/include/asm/probes.h:16:2: error: unknown type name 'pstate_check_t'
      16 |  pstate_check_t *pstate_cc;
Fixes c6b90d5cf637 ("arm64/fpsimd: Fix missing-prototypes in fpsimd.c")
Cc Will Deacon <[email protected]>
Cc Tian Tao <[email protected]>
---
 arch/arm64/include/asm/probes.h |    2 ++
 1 file changed, 2 insertions(+)
arch/arm64/include/asm/probes.h +2 -0
@@ -7,6 +7,8 @@
 #ifndef _ARM_PROBES_H
 #define _ARM_PROBES_H
 
+#include <asm/insn.h>
+
 typedef u32 probe_opcode_t;
 typedef void (probes_handler_t) (u32 opcode, long addr, struct pt_regs *);
 
maintainer Applied
#1 lore raw
Quoted 6 lines · Randy Dunlap

Adding <asm/exception.h> brought in <asm/kprobes.h> which uses <asm/probes.h>, which uses 'pstate_check_t' so the latter needs to #include <asm/insn.h> for this typedef.

Fixes this build error:

Quoted 7 lines

In file included from arch/arm64/include/asm/kprobes.h:24,

                    from arch/arm64/include/asm/exception.h:11,
                    from arch/arm64/kernel/fpsimd.c:35:
  arch/arm64/include/asm/probes.h:16:2: error: unknown type name 'pstate_check_t'
      16 |  pstate_check_t *pstate_cc;

[...]

Applied to arm64 (for-next/fixes), thanks!

[1/1] arm64/fpsimd: add <asm/insn.h> to <asm/kprobes.h> to fix fpsimd build

      https://git.kernel.org/arm64/c/03659efe4287

Cheers,

Signature · 5 lines
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev