diff options
| author | ryo <ryo@NetBSD.org> | 2022-12-01 00:29:51 +0000 |
|---|---|---|
| committer | ryo <ryo@NetBSD.org> | 2022-12-01 00:29:51 +0000 |
| commit | cb9d3d1847ecc1c4d538693caa0aaae10f5aa663 (patch) | |
| tree | b5e0e000713b5e48eb7e5d82c2d0d18db84d904c /sys/dev | |
| parent | e099aa8bcf42bf42a4df482b920d77092ec3f58c (diff) | |
tprof_armv7 initializes on each CPUs, like tprof_armv8.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/tprof/tprof_armv7.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/dev/tprof/tprof_armv7.c b/sys/dev/tprof/tprof_armv7.c index d80acbe0cb5..8ff8622e611 100644 --- a/sys/dev/tprof/tprof_armv7.c +++ b/sys/dev/tprof/tprof_armv7.c @@ -1,4 +1,4 @@ -/* $NetBSD: tprof_armv7.c,v 1.8 2022/12/01 00:29:10 ryo Exp $ */ +/* $NetBSD: tprof_armv7.c,v 1.9 2022/12/01 00:29:51 ryo Exp $ */ /*- * Copyright (c) 2018 Jared McNeill <jmcneill@invisible.ca> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tprof_armv7.c,v 1.8 2022/12/01 00:29:10 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tprof_armv7.c,v 1.9 2022/12/01 00:29:51 ryo Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -258,8 +258,8 @@ armv7_pmu_intr(void *priv) return 1; } -int -armv7_pmu_init(void) +static void +armv7_pmu_init_cpu(void *arg1, void *arg2) { /* Disable user mode access to performance monitors */ armreg_pmuserenr_write(0); @@ -269,6 +269,13 @@ armv7_pmu_init(void) /* Disable counters */ armreg_pmcntenclr_write(PMCNTEN_P); +} + +int +armv7_pmu_init(void) +{ + uint64_t xc = xc_broadcast(0, armv7_pmu_init_cpu, NULL, NULL); + xc_wait(xc); return tprof_backend_register("tprof_armv7", &tprof_armv7_pmu_ops, TPROF_BACKEND_VERSION); |
