svn commit: r320054 - head/sys/arm/arm

Michal Meloun mmel at FreeBSD.org
Sat Jun 17 14:36:27 UTC 2017


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 */


More information about the svn-src-head mailing list