Skip to content

Commit 219fb1a

Browse files
Fix-Pointraiden00pl
authored andcommitted
arch/arm64: Add up_perf_init for qemu.
This commit added up_perf_init for qemu. Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
1 parent 9a02572 commit 219fb1a

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
@@ -190,4 +190,8 @@ void arm64_chip_boot(void)
190190
#ifdef CONFIG_SYSLOG_RPMSG
191191
syslog_rpmsg_init_early(g_syslog_rpmsg_buf, sizeof(g_syslog_rpmsg_buf));
192192
#endif
193+
194+
#ifdef CONFIG_ARCH_PERF_EVENTS
195+
up_perf_init((void *)CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC);
196+
#endif
193197
}

arch/arm64/src/qemu/qemu_boot.h

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

41+
#define CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC 62500000
42+
4143
/****************************************************************************
4244
* Public Function Prototypes
4345
****************************************************************************/

0 commit comments

Comments
 (0)