svn commit: r307210 - head/sys/arm64/arm64
Andrew Turner
andrew at FreeBSD.org
Thu Oct 13 09:06:31 UTC 2016
Author: andrew
Date: Thu Oct 13 09:06:29 2016
New Revision: 307210
URL: https://svnweb.freebsd.org/changeset/base/307210
Log:
Move printing the AArch64 ID registers to a new SYSINIT, the previous
location only prints them when booting on SMP with multiple cores.
MFC after: 1 week
Sponsored by: DARPA, AFRL
Modified:
head/sys/arm64/arm64/identcpu.c
head/sys/arm64/arm64/mp_machdep.c
Modified: head/sys/arm64/arm64/identcpu.c
==============================================================================
--- head/sys/arm64/arm64/identcpu.c Thu Oct 13 09:00:44 2016 (r307209)
+++ head/sys/arm64/arm64/identcpu.c Thu Oct 13 09:06:29 2016 (r307210)
@@ -33,7 +33,9 @@
__FBSDID("$FreeBSD$");
#include <sys/param.h>
+#include <sys/kernel.h>
#include <sys/pcpu.h>
+#include <sys/smp.h>
#include <sys/sysctl.h>
#include <sys/systm.h>
@@ -151,6 +153,17 @@ const struct cpu_implementers cpu_implem
CPU_IMPLEMENTER_NONE,
};
+static void
+identify_cpu_sysinit(void *dummy __unused)
+{
+ int cpu;
+
+ CPU_FOREACH(cpu) {
+ print_cpu_features(cpu);
+ }
+}
+SYSINIT(idenrity_cpu, SI_SUB_SMP, SI_ORDER_ANY, identify_cpu_sysinit, NULL);
+
void
print_cpu_features(u_int cpu)
{
Modified: head/sys/arm64/arm64/mp_machdep.c
==============================================================================
--- head/sys/arm64/arm64/mp_machdep.c Thu Oct 13 09:00:44 2016 (r307209)
+++ head/sys/arm64/arm64/mp_machdep.c Thu Oct 13 09:06:29 2016 (r307210)
@@ -201,7 +201,7 @@ arm64_cpu_attach(device_t dev)
static void
release_aps(void *dummy __unused)
{
- int cpu, i;
+ int i;
intr_pic_ipi_setup(IPI_AST, "ast", ipi_ast, NULL);
intr_pic_ipi_setup(IPI_PREEMPT, "preempt", ipi_preempt, NULL);
@@ -217,14 +217,8 @@ release_aps(void *dummy __unused)
printf("Release APs\n");
for (i = 0; i < 2000; i++) {
- if (smp_started) {
- for (cpu = 0; cpu <= mp_maxid; cpu++) {
- if (CPU_ABSENT(cpu))
- continue;
- print_cpu_features(cpu);
- }
+ if (smp_started)
return;
- }
DELAY(1000);
}
More information about the svn-src-head
mailing list