Module Name: src
Committed By: ryo
Date: Wed Nov 9 19:06:46 UTC 2022
Modified Files:
src/sys/dev/tprof: tprof_armv8.c
Log Message:
If the hardware does not support PMU, return an error instead of KASSERT.
To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/tprof/tprof_armv8.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/tprof/tprof_armv8.c
diff -u src/sys/dev/tprof/tprof_armv8.c:1.14 src/sys/dev/tprof/tprof_armv8.c:1.15
--- src/sys/dev/tprof/tprof_armv8.c:1.14 Mon May 16 09:42:32 2022
+++ src/sys/dev/tprof/tprof_armv8.c Wed Nov 9 19:06:46 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: tprof_armv8.c,v 1.14 2022/05/16 09:42:32 jmcneill Exp $ */
+/* $NetBSD: tprof_armv8.c,v 1.15 2022/11/09 19:06:46 ryo Exp $ */
/*-
* Copyright (c) 2018 Jared McNeill <[email protected]>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tprof_armv8.c,v 1.14 2022/05/16 09:42:32 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tprof_armv8.c,v 1.15 2022/11/09 19:06:46 ryo Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -233,7 +233,8 @@ armv8_pmu_detect(void)
int
armv8_pmu_init(void)
{
- KASSERT(armv8_pmu_detect());
+ if (!armv8_pmu_detect())
+ return ENOTSUP;
uint64_t xc = xc_broadcast(0, armv8_pmu_init_cpu, NULL, NULL);
xc_wait(xc);