Skip to content

Commit 46fcfb6

Browse files
committed
arch/arm64: Add up_perf_init for qemu.
This commit added up_perf_init for qemu. Signed-off-by: ouyangxiangzhen <[email protected]>
1 parent 5172da6 commit 46fcfb6

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

arch/arm64/src/qemu/qemu_boot.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,4 +165,8 @@ void arm64_chip_boot(void)
165165

166166
arm64_earlyserialinit();
167167
#endif
168+
169+
#ifdef CONFIG_ARCH_PERF_EVENTS
170+
up_perf_init((void *)CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC);
171+
#endif
168172
}

arch/arm64/src/qemu/qemu_boot.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
* Pre-processor Definitions
3737
****************************************************************************/
3838

39+
#define CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC 62500000
40+
3941
/****************************************************************************
4042
* Public Function Prototypes
4143
****************************************************************************/

0 commit comments

Comments
 (0)