git: e49c7cd677df - main - dtrace: remove x86 non-EARLY_AP_STARTUP support

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Tue, 10 Oct 2023 15:04:44 UTC
The branch main has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=e49c7cd677df0b8691c828b55919ef37d8aad219

commit e49c7cd677df0b8691c828b55919ef37d8aad219
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2023-10-09 20:13:50 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2023-10-10 15:03:27 +0000

    dtrace: remove x86 non-EARLY_AP_STARTUP support
    
    After 792655abd64c EARLY_AP_STARTUP is mandatory for x86.
    
    Reviewed by:    markj
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D42139
---
 sys/cddl/dev/dtrace/amd64/dtrace_subr.c | 28 ----------------------------
 sys/cddl/dev/dtrace/i386/dtrace_subr.c  | 28 ----------------------------
 2 files changed, 56 deletions(-)

diff --git a/sys/cddl/dev/dtrace/amd64/dtrace_subr.c b/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
index ee57432bd2fb..09b820241e50 100644
--- a/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
+++ b/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
@@ -283,7 +283,6 @@ dtrace_gethrtime_init_cpu(void *arg)
 		hst_cpu_tsc = rdtsc();
 }
 
-#ifdef EARLY_AP_STARTUP
 static void
 dtrace_gethrtime_init(void *arg)
 {
@@ -291,16 +290,6 @@ dtrace_gethrtime_init(void *arg)
 	uint64_t tsc_f;
 	cpuset_t map;
 	int i;
-#else
-/*
- * Get the frequency and scale factor as early as possible so that they can be
- * used for boot-time tracing.
- */
-static void
-dtrace_gethrtime_init_early(void *arg)
-{
-	uint64_t tsc_f;
-#endif
 
 	/*
 	 * Get TSC frequency known at this moment.
@@ -329,18 +318,6 @@ dtrace_gethrtime_init_early(void *arg)
 	 *   (terahertz) values;
 	 */
 	nsec_scale = ((uint64_t)NANOSEC << SCALE_SHIFT) / tsc_f;
-#ifndef EARLY_AP_STARTUP
-}
-SYSINIT(dtrace_gethrtime_init_early, SI_SUB_CPU, SI_ORDER_ANY,
-    dtrace_gethrtime_init_early, NULL);
-
-static void
-dtrace_gethrtime_init(void *arg)
-{
-	struct pcpu *pc;
-	cpuset_t map;
-	int i;
-#endif
 
 	if (vm_guest != VM_GUEST_NO)
 		return;
@@ -364,13 +341,8 @@ dtrace_gethrtime_init(void *arg)
 	}
 	sched_unpin();
 }
-#ifdef EARLY_AP_STARTUP
 SYSINIT(dtrace_gethrtime_init, SI_SUB_DTRACE, SI_ORDER_ANY,
     dtrace_gethrtime_init, NULL);
-#else
-SYSINIT(dtrace_gethrtime_init, SI_SUB_SMP, SI_ORDER_ANY, dtrace_gethrtime_init,
-    NULL);
-#endif
 
 /*
  * DTrace needs a high resolution time function which can
diff --git a/sys/cddl/dev/dtrace/i386/dtrace_subr.c b/sys/cddl/dev/dtrace/i386/dtrace_subr.c
index 9c9143eb9dff..026581f5a899 100644
--- a/sys/cddl/dev/dtrace/i386/dtrace_subr.c
+++ b/sys/cddl/dev/dtrace/i386/dtrace_subr.c
@@ -283,7 +283,6 @@ dtrace_gethrtime_init_cpu(void *arg)
 		hst_cpu_tsc = rdtsc();
 }
 
-#ifdef EARLY_AP_STARTUP
 static void
 dtrace_gethrtime_init(void *arg)
 {
@@ -291,16 +290,6 @@ dtrace_gethrtime_init(void *arg)
 	uint64_t tsc_f;
 	cpuset_t map;
 	int i;
-#else
-/*
- * Get the frequency and scale factor as early as possible so that they can be
- * used for boot-time tracing.
- */
-static void
-dtrace_gethrtime_init_early(void *arg)
-{
-	uint64_t tsc_f;
-#endif
 
 	/*
 	 * Get TSC frequency known at this moment.
@@ -329,18 +318,6 @@ dtrace_gethrtime_init_early(void *arg)
 	 *   (terahertz) values;
 	 */
 	nsec_scale = ((uint64_t)NANOSEC << SCALE_SHIFT) / tsc_f;
-#ifndef EARLY_AP_STARTUP
-}
-SYSINIT(dtrace_gethrtime_init_early, SI_SUB_CPU, SI_ORDER_ANY,
-    dtrace_gethrtime_init_early, NULL);
-
-static void
-dtrace_gethrtime_init(void *arg)
-{
-	cpuset_t map;
-	struct pcpu *pc;
-	int i;
-#endif
 
 	if (vm_guest != VM_GUEST_NO)
 		return;
@@ -364,13 +341,8 @@ dtrace_gethrtime_init(void *arg)
 	}
 	sched_unpin();
 }
-#ifdef EARLY_AP_STARTUP
 SYSINIT(dtrace_gethrtime_init, SI_SUB_DTRACE, SI_ORDER_ANY,
     dtrace_gethrtime_init, NULL);
-#else
-SYSINIT(dtrace_gethrtime_init, SI_SUB_SMP, SI_ORDER_ANY, dtrace_gethrtime_init,
-    NULL);
-#endif
 
 /*
  * DTrace needs a high resolution time function which can