mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-11-07 12:48:33 -10:00
hwpstate_intel: Fix i386 build
Reviewed by: olce
Fixes: 7b26353a59
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58208
This commit is contained in:
1 parent
02f174179a
commit
bdc0f76782
1 file changed
+8
@@ -352,13 +352,19 @@ intel_hwpstate_hybrid_cb(void *ctx)
|
||||
{
|
||||
uint32_t *small_cores = ctx;
|
||||
|
||||
#ifdef __i386__
|
||||
(void)small_cores;
|
||||
#else
|
||||
atomic_add_32(small_cores, PCPU_GET(small_core));
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
intel_hwpstate_identify(driver_t *driver, device_t parent)
|
||||
{
|
||||
#ifndef __i386__
|
||||
uint32_t small_cores = 0;
|
||||
#endif
|
||||
|
||||
if (device_find_child(parent, "hwpstate_intel", DEVICE_UNIT_ANY) != NULL)
|
||||
return;
|
||||
@@ -379,6 +385,7 @@ intel_hwpstate_identify(driver_t *driver, device_t parent)
|
||||
if ((cpu_power_eax & CPUTPM1_HWP) == 0)
|
||||
return;
|
||||
|
||||
#ifndef __i386__
|
||||
/*
|
||||
* On hybrid-core systems, package-level control cannot be used.
|
||||
* It may cause all cores to run at the E-core frequency because
|
||||
@@ -389,6 +396,7 @@ intel_hwpstate_identify(driver_t *driver, device_t parent)
|
||||
intel_hwpstate_hybrid_cb, smp_no_rendezvous_barrier, &small_cores);
|
||||
if (small_cores > 0 && small_cores < mp_ncores)
|
||||
hwpstate_pkg_ctrl_enable = false;
|
||||
#endif
|
||||
|
||||
if (BUS_ADD_CHILD(parent, 10, "hwpstate_intel", device_get_unit(parent))
|
||||
== NULL)
|
||||
|
||||
Reference in new issue
Block a user