Module Name:    src
Committed By:   ryo
Date:           Thu Nov 10 07:54:20 UTC 2022

Modified Files:
        src/sys/dev/tprof: tprof_armv8.c

Log Message:
revert my previous commit.

since armv8_pmu_init is only called when it is reliably worked by ACPI or fdt,
there is no need for dynamic checks.

pointed out by jmcneill@, thanks


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 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.15 src/sys/dev/tprof/tprof_armv8.c:1.16
--- src/sys/dev/tprof/tprof_armv8.c:1.15	Wed Nov  9 19:06:46 2022
+++ src/sys/dev/tprof/tprof_armv8.c	Thu Nov 10 07:54:20 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: tprof_armv8.c,v 1.15 2022/11/09 19:06:46 ryo Exp $ */
+/* $NetBSD: tprof_armv8.c,v 1.16 2022/11/10 07:54:20 ryo Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill <jmcne...@invisible.ca>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tprof_armv8.c,v 1.15 2022/11/09 19:06:46 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tprof_armv8.c,v 1.16 2022/11/10 07:54:20 ryo Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -233,8 +233,7 @@ armv8_pmu_detect(void)
 int
 armv8_pmu_init(void)
 {
-	if (!armv8_pmu_detect())
-		return ENOTSUP;
+	KASSERT(armv8_pmu_detect());
 
 	uint64_t xc = xc_broadcast(0, armv8_pmu_init_cpu, NULL, NULL);
 	xc_wait(xc);

Reply via email to