aboutsummaryrefslogtreecommitdiff
path: root/sys/arm64
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2016-10-13 09:06:29 +0000
committerAndrew Turner <andrew@FreeBSD.org>2016-10-13 09:06:29 +0000
commit1890f18cbe9fb86f5c2c9547933959a0010be7c8 (patch)
tree16391c88b0419bc6391fb30e3dea81cc47bd5543 /sys/arm64
parent3e5c48d95f685ac0f4c2b6363143fcde87212356 (diff)
downloadsrc-1890f18cbe9fb86f5c2c9547933959a0010be7c8.tar.gz
src-1890f18cbe9fb86f5c2c9547933959a0010be7c8.zip
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
Notes
Notes: svn path=/head/; revision=307210
Diffstat (limited to 'sys/arm64')
-rw-r--r--sys/arm64/arm64/identcpu.c13
-rw-r--r--sys/arm64/arm64/mp_machdep.c10
2 files changed, 15 insertions, 8 deletions
diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c
index c047c5412db1..6dd548b30d40 100644
--- a/sys/arm64/arm64/identcpu.c
+++ b/sys/arm64/arm64/identcpu.c
@@ -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_implementers[] = {
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)
{
diff --git a/sys/arm64/arm64/mp_machdep.c b/sys/arm64/arm64/mp_machdep.c
index b0e182796461..6fbb610dd6c0 100644
--- a/sys/arm64/arm64/mp_machdep.c
+++ b/sys/arm64/arm64/mp_machdep.c
@@ -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);
}