aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Certner <olce@FreeBSD.org>2026-02-09 09:30:53 +0000
committerOlivier Certner <olce@FreeBSD.org>2026-02-11 20:43:23 +0000
commitc6a0eb7ada62c7d6e7d4686b2fe32e009311c1aa (patch)
treeac306f5dde8644e6ac8eabaaed09716528dcd508
parentebcd80f76ed117afa90419e5ac60cd558715f584 (diff)
hwpstate_amd(4): Rename '*set_autonomous_hwp*()' => 'enable_cppc*()'
This is to better reflect that we are really enabling CPPC in these functions and because we are likely to stop activating CPPC autonomous mode by default in the near future. No functional change (intended). Sponsored by: The FreeBSD Foundation
-rw-r--r--sys/x86/cpufreq/hwpstate_amd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/x86/cpufreq/hwpstate_amd.c b/sys/x86/cpufreq/hwpstate_amd.c
index 688b86e1ad35..1548227faacf 100644
--- a/sys/x86/cpufreq/hwpstate_amd.c
+++ b/sys/x86/cpufreq/hwpstate_amd.c
@@ -698,7 +698,7 @@ struct set_autonomous_hwp_data {
};
static void
-amd_set_autonomous_hwp_cb(void *args)
+enable_cppc_cb(void *args)
{
struct set_autonomous_hwp_data *const data = args;
struct hwpstate_softc *const sc = data->sc;
@@ -765,7 +765,7 @@ amd_set_autonomous_hwp_cb(void *args)
}
static int
-amd_set_autonomous_hwp(struct hwpstate_softc *sc)
+enable_cppc(struct hwpstate_softc *sc)
{
const device_t dev = sc->dev;
const u_int cpuid = cpu_get_pcpu(dev)->pc_cpuid;
@@ -775,7 +775,7 @@ amd_set_autonomous_hwp(struct hwpstate_softc *sc)
data.sc = sc;
smp_rendezvous_cpu(cpuid, smp_no_rendezvous_barrier,
- amd_set_autonomous_hwp_cb, smp_no_rendezvous_barrier, &data);
+ enable_cppc_cb, smp_no_rendezvous_barrier, &data);
if (hwp_has_error(data.res, HWP_ERROR_CPPC_ENABLE)) {
device_printf(dev, "CPU%u: Failed to enable CPPC!\n", cpuid);
@@ -908,7 +908,7 @@ hwpstate_attach(device_t dev)
sc = device_get_softc(dev);
if ((sc->flags & HWPFL_USE_CPPC) != 0) {
- if ((res = amd_set_autonomous_hwp(sc)))
+ if ((res = enable_cppc(sc)) != 0)
return (res);
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
SYSCTL_STATIC_CHILDREN(_debug), OID_AUTO,