Skip to content

Commit d688ffa

Browse files
robherringwilldeacon
authored andcommitted
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: Rob Herring (Arm) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 12f051c commit d688ffa

File tree

4 files changed

+3
-4
lines changed

4 files changed

+3
-4
lines changed

arch/arm64/include/asm/arm_pmuv3.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#ifndef __ASM_PMUV3_H
77
#define __ASM_PMUV3_H
88

9-
#include <linux/kvm_host.h>
9+
#include <asm/kvm_host.h>
1010

1111
#include <asm/cpufeature.h>
1212
#include <asm/sysreg.h>

arch/arm64/kvm/pmu-emul.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include <asm/kvm_emulate.h>
1515
#include <kvm/arm_pmu.h>
1616
#include <kvm/arm_vgic.h>
17-
#include <asm/arm_pmuv3.h>
1817

1918
#define PERF_ATTR_CFG1_COUNTER_64BIT BIT(0)
2019

drivers/perf/arm_pmuv3.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
#include <linux/smp.h>
2626
#include <linux/nmi.h>
2727

28-
#include <asm/arm_pmuv3.h>
29-
3028
/* ARMv8 Cortex-A53 specific event types. */
3129
#define ARMV8_A53_PERFCTR_PREF_LINEFILL 0xC2
3230

include/linux/perf/arm_pmuv3.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,4 +309,6 @@
309309
} \
310310
} while (0)
311311

312+
#include <asm/arm_pmuv3.h>
313+
312314
#endif

0 commit comments

Comments
 (0)