Commit d688ffa2 authored by Rob Herring (Arm)'s avatar Rob Herring (Arm) Committed by Will Deacon

perf: arm_pmuv3: Include asm/arm_pmuv3.h from linux/perf/arm_pmuv3.h

The arm64 asm/arm_pmuv3.h depends on defines from
linux/perf/arm_pmuv3.h. Rather than depend on include order, follow the
usual pattern of "linux" headers including "asm" headers of the same
name.

With this change, the include of linux/kvm_host.h is problematic due to
circular includes:

In file included from ../arch/arm64/include/asm/arm_pmuv3.h:9,
                 from ../include/linux/perf/arm_pmuv3.h:312,
                 from ../include/kvm/arm_pmu.h:11,
                 from ../arch/arm64/include/asm/kvm_host.h:38,
                 from ../arch/arm64/mm/init.c:41:
../include/linux/kvm_host.h:383:30: error: field 'arch' has incomplete type

Switching to asm/kvm_host.h solves the issue.
Signed-off-by: default avatarRob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20240626-arm-pmu-3-9-icntr-v2-5-c9784b4f4065@kernel.orgSigned-off-by: default avatarWill Deacon <will@kernel.org>
parent 12f051c9
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#ifndef __ASM_PMUV3_H #ifndef __ASM_PMUV3_H
#define __ASM_PMUV3_H #define __ASM_PMUV3_H
#include <linux/kvm_host.h> #include <asm/kvm_host.h>
#include <asm/cpufeature.h> #include <asm/cpufeature.h>
#include <asm/sysreg.h> #include <asm/sysreg.h>
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include <asm/kvm_emulate.h> #include <asm/kvm_emulate.h>
#include <kvm/arm_pmu.h> #include <kvm/arm_pmu.h>
#include <kvm/arm_vgic.h> #include <kvm/arm_vgic.h>
#include <asm/arm_pmuv3.h>
#define PERF_ATTR_CFG1_COUNTER_64BIT BIT(0) #define PERF_ATTR_CFG1_COUNTER_64BIT BIT(0)
......
...@@ -25,8 +25,6 @@ ...@@ -25,8 +25,6 @@
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/nmi.h> #include <linux/nmi.h>
#include <asm/arm_pmuv3.h>
/* ARMv8 Cortex-A53 specific event types. */ /* ARMv8 Cortex-A53 specific event types. */
#define ARMV8_A53_PERFCTR_PREF_LINEFILL 0xC2 #define ARMV8_A53_PERFCTR_PREF_LINEFILL 0xC2
......
...@@ -309,4 +309,6 @@ ...@@ -309,4 +309,6 @@
} \ } \
} while (0) } while (0)
#include <asm/arm_pmuv3.h>
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment