aboutsummaryrefslogtreecommitdiff
path: root/sys/arm/arm/cpuinfo.c
diff options
context:
space:
mode:
authorMichal Meloun <mmel@FreeBSD.org>2017-06-17 14:36:25 +0000
committerMichal Meloun <mmel@FreeBSD.org>2017-06-17 14:36:25 +0000
commitc40a5f8a404a3b740174f29969245321e46bf973 (patch)
treee7d6b90e91ac6dcc5b46f992b59a459a05bb15a6 /sys/arm/arm/cpuinfo.c
parentf3990417c55d7aaa6823db58d8edf00b59b04a56 (diff)
downloadsrc-c40a5f8a404a3b740174f29969245321e46bf973.tar.gz
src-c40a5f8a404a3b740174f29969245321e46bf973.zip
Manually load tunable CPU quirks.
These are needed too early, far before SYSINIT is processed. Reported by: zbb Pointy hat to: mmel MFC after: 3 weeks MFC with: r319896
Notes
Notes: svn path=/head/; revision=320054
Diffstat (limited to 'sys/arm/arm/cpuinfo.c')
-rw-r--r--sys/arm/arm/cpuinfo.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/arm/arm/cpuinfo.c b/sys/arm/arm/cpuinfo.c
index 4b4b67ed7d89..5dceab37be00 100644
--- a/sys/arm/arm/cpuinfo.c
+++ b/sys/arm/arm/cpuinfo.c
@@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/kernel.h>
#include <sys/sysctl.h>
#include <machine/cpu.h>
@@ -77,6 +78,14 @@ void
cpuinfo_init(void)
{
+ /*
+ * Prematurely fetch CPU quirks. Standard fetch for tunable
+ * sysctls is handled using SYSINIT, thus too late for boot CPU.
+ * Keep names in sync with sysctls.
+ */
+ TUNABLE_INT_FETCH("hw.cpu.quirks.actlr_mask", &cpu_quirks_actlr_mask);
+ TUNABLE_INT_FETCH("hw.cpu.quirks.actlr_set", &cpu_quirks_actlr_set);
+
cpuinfo.midr = cp15_midr_get();
/* Test old version id schemes first */
if ((cpuinfo.midr & CPU_ID_IMPLEMENTOR_MASK) == CPU_ID_ARM_LTD) {