From 8563c840b54263435c65ca68a111163dce90d536 Mon Sep 17 00:00:00 2001 From: sobomax Date: Wed, 6 Dec 2006 18:27:17 +0000 Subject: [PATCH] Allow machdep.cpu_idle_hlt to be set from the loader. This should allow to workaround the problem with SMP kernels on Turion64 X2 processors described in kern/104678 and may be useful in other situations too. MFC after: 3 days --- sys/amd64/amd64/machdep.c | 1 + sys/i386/i386/machdep.c | 1 + sys/pc98/pc98/machdep.c | 1 + 3 files changed, 3 insertions(+) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 348bfef78dc3..c7dd71f36c89 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -514,6 +514,7 @@ cpu_halt(void) * help lock contention somewhat, and this is critical for HTT. -Peter */ static int cpu_idle_hlt = 1; +TUNABLE_INT("machdep.cpu_idle_hlt", &cpu_idle_hlt); SYSCTL_INT(_machdep, OID_AUTO, cpu_idle_hlt, CTLFLAG_RW, &cpu_idle_hlt, 0, "Idle loop HLT enable"); diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 2dc54ecc5f50..ef64b95ecb0b 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -1112,6 +1112,7 @@ cpu_halt(void) * help lock contention somewhat, and this is critical for HTT. -Peter */ static int cpu_idle_hlt = 1; +TUNABLE_INT("machdep.cpu_idle_hlt", &cpu_idle_hlt); SYSCTL_INT(_machdep, OID_AUTO, cpu_idle_hlt, CTLFLAG_RW, &cpu_idle_hlt, 0, "Idle loop HLT enable"); diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index 1bd8c251e0ae..7bc00801b91a 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/machdep.c @@ -1109,6 +1109,7 @@ cpu_halt(void) * help lock contention somewhat, and this is critical for HTT. -Peter */ static int cpu_idle_hlt = 1; +TUNABLE_INT("machdep.cpu_idle_hlt", &cpu_idle_hlt); SYSCTL_INT(_machdep, OID_AUTO, cpu_idle_hlt, CTLFLAG_RW, &cpu_idle_hlt, 0, "Idle loop HLT enable");