Date: Sat, 17 Jun 2017 14:36:26 +0000 (UTC) From: Michal Meloun <mmel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320054 - head/sys/arm/arm Message-ID: <201706171436.v5HEaQAv097671@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706171436.v5HEaQAv097671>