Author: mmel
Date: Sat Jun 17 14:36:25 2017
New Revision: 320054
URL: https://svnweb.freebsd.org/changeset/base/320054
Log:
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
Modified:
head/sys/arm/arm/cpuinfo.c
Modified: head/sys/arm/arm/cpuinfo.c
==============================================================================
--- head/sys/arm/arm/cpuinfo.c Sat Jun 17 12:48:31 2017 (r320053)
+++ head/sys/arm/arm/cpuinfo.c Sat Jun 17 14:36:25 2017 (r320054)
@@ -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>
@@ -76,6 +77,14 @@ SYSCTL_INT(_hw_cpu_quirks, OID_AUTO, actlr_set,
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 */
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"