Date: Wed, 11 Feb 2026 20:44:11 +0000 From: Olivier Certner <olce@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 2b728d3bbfbc - main - hwpstate_amd(4): Move 'struct get_cppc_regs_data' & co. closer to use Message-ID: <698cea1b.477a4.4849a649@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=2b728d3bbfbc61e014cdfa7940227e46027329b9 commit 2b728d3bbfbc61e014cdfa7940227e46027329b9 Author: Olivier Certner <olce@FreeBSD.org> AuthorDate: 2026-02-09 10:39:53 +0000 Commit: Olivier Certner <olce@FreeBSD.org> CommitDate: 2026-02-11 20:43:23 +0000 hwpstate_amd(4): Move 'struct get_cppc_regs_data' & co. closer to use No functional change (intended). Sponsored by: The FreeBSD Foundation --- sys/x86/cpufreq/hwpstate_amd.c | 44 +++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/sys/x86/cpufreq/hwpstate_amd.c b/sys/x86/cpufreq/hwpstate_amd.c index 1548227faacf..7e845e172620 100644 --- a/sys/x86/cpufreq/hwpstate_amd.c +++ b/sys/x86/cpufreq/hwpstate_amd.c @@ -227,28 +227,6 @@ check_cppc_in_use(const struct hwpstate_softc *const sc, const char *const func) ": %s() called but HWPFL_USE_CPPC not set", func)); } -/* - * Internal errors conveyed by code executing on another CPU. - */ -#define HWP_ERROR_CPPC_ENABLE (1 << 0) -#define HWP_ERROR_CPPC_CAPS (1 << 1) -#define HWP_ERROR_CPPC_REQUEST (1 << 2) -#define HWP_ERROR_CPPC_REQUEST_WRITE (1 << 3) - -static inline bool -hwp_has_error(u_int res, u_int err) -{ - return ((res & err) != 0); -} - -struct get_cppc_regs_data { - uint64_t enable; - uint64_t caps; - uint64_t req; - /* HWP_ERROR_CPPC_* except HWP_ERROR_*_WRITE */ - u_int res; -}; - static void print_msr_bits(struct sbuf *const sb, const char *const legend, const uint64_t bits, const uint64_t msr_value) @@ -300,6 +278,28 @@ print_cppc_no_request(struct sbuf *const sb) sbuf_printf(sb, MSR_AMD_CPPC_REQUEST_NAME ": " MSR_NOT_READ_MSG "\n"); } +/* + * Internal errors conveyed by code executing on another CPU. + */ +#define HWP_ERROR_CPPC_ENABLE (1 << 0) +#define HWP_ERROR_CPPC_CAPS (1 << 1) +#define HWP_ERROR_CPPC_REQUEST (1 << 2) +#define HWP_ERROR_CPPC_REQUEST_WRITE (1 << 3) + +static inline bool +hwp_has_error(u_int res, u_int err) +{ + return ((res & err) != 0); +} + +struct get_cppc_regs_data { + uint64_t enable; + uint64_t caps; + uint64_t req; + /* HWP_ERROR_CPPC_* except HWP_ERROR_*_WRITE */ + u_int res; +}; + static void get_cppc_regs_cb(void *args) {home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?698cea1b.477a4.4849a649>
