Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F164563795
D57377.id179058.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D57377.id179058.diff
View Options
diff --git a/sys/x86/cpufreq/hwpstate_intel.c b/sys/x86/cpufreq/hwpstate_intel.c
--- a/sys/x86/cpufreq/hwpstate_intel.c
+++ b/sys/x86/cpufreq/hwpstate_intel.c
@@ -321,9 +321,19 @@
return (ret);
}
+static void
+intel_hwpstate_hybrid_cb(void *ctx)
+{
+ uint32_t *small_cores = ctx;
+
+ atomic_add_32(small_cores, PCPU_GET(small_core));
+}
+
void
intel_hwpstate_identify(driver_t *driver, device_t parent)
{
+ uint32_t small_cores = 0;
+
if (device_find_child(parent, "hwpstate_intel", DEVICE_UNIT_ANY) != NULL)
return;
@@ -343,6 +353,17 @@
if ((cpu_power_eax & CPUTPM1_HWP) == 0)
return;
+ /*
+ * On hybrid-core systems, package-level control cannot be used.
+ * It may cause all cores to run at the E-core frequency because
+ * the resulting package frequency depends on the last core that
+ * sets the frequency.
+ */
+ smp_rendezvous_cpus(all_cpus, smp_no_rendezvous_barrier,
+ intel_hwpstate_hybrid_cb, smp_no_rendezvous_barrier, &small_cores);
+ if (small_cores > 0 && small_cores < mp_ncores)
+ hwpstate_pkg_ctrl_enable = false;
+
if (BUS_ADD_CHILD(parent, 10, "hwpstate_intel", device_get_unit(parent))
== NULL)
device_printf(parent, "hwpstate_intel: add child failed\n");
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Aug 3, 2:59 AM (18 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33695592
Default Alt Text
D57377.id179058.diff (1 KB)
Attached To
Mode
D57377: hwpstate_intel: Disable package control on hybrid CPU
Attached
Detach File
Event Timeline
Log In to Comment