From: kernel test robot <lkp@intel.com>
To: "Gautham R. Shenoy" <gautham.shenoy@amd.com>,
Mario Limonciello <mario.limonciello@amd.com>,
"Rafael J . Wysocki" <rafael@kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
K Prateek Nayak <kprateek.nayak@amd.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
"Gautham R. Shenoy" <gautham.shenoy@amd.com>
Subject: Re: [PATCH 5/9] amd-pstate: Add support for CPPC_REQ2 and FLOOR_PERF
Date: Sat, 7 Mar 2026 04:22:50 +0800 [thread overview]
Message-ID: <202603070431.ykswVnpp-lkp@intel.com> (raw)
In-Reply-To: <20260306095753.17155-6-gautham.shenoy@amd.com>
Hi Gautham,
kernel test robot noticed the following build warnings:
[auto build test WARNING on rafael-pm/linux-next]
[also build test WARNING on rafael-pm/bleeding-edge tip/x86/core amd-pstate/linux-next amd-pstate/bleeding-edge linus/master v7.0-rc2 next-20260306]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Gautham-R-Shenoy/amd-pstate-Fix-memory-leak-in-amd_pstate_epp_cpu_init/20260306-180651
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
patch link: https://lore.kernel.org/r/20260306095753.17155-6-gautham.shenoy%40amd.com
patch subject: [PATCH 5/9] amd-pstate: Add support for CPPC_REQ2 and FLOOR_PERF
config: i386-defconfig (https://download.01.org/0day-ci/archive/20260307/202603070431.ykswVnpp-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260307/202603070431.ykswVnpp-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603070431.ykswVnpp-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/cpufreq/amd-pstate.c:497:48: warning: shift count >= width of type [-Wshift-count-overflow]
497 | WRITE_ONCE(cpudata->floor_perf_cnt, FIELD_GET(AMD_CPPC_FLOOR_PERF_CNT_MASK, cap1));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/msr-index.h:772:38: note: expanded from macro 'AMD_CPPC_FLOOR_PERF_CNT_MASK'
772 | #define AMD_CPPC_FLOOR_PERF_CNT_MASK GENMASK(39, 32)
| ^
include/linux/bits.h:51:24: note: expanded from macro 'GENMASK'
51 | #define GENMASK(h, l) GENMASK_TYPE(unsigned long, h, l)
| ^
include/linux/bits.h:48:20: note: expanded from macro 'GENMASK_TYPE'
48 | (type_max(t) << (l) & \
| ^
note: (skipping 6 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:686:9: note: expanded from macro '__compiletime_assert'
686 | if (!(condition)) \
| ^
include/asm-generic/rwonce.h:61:18: note: expanded from macro 'WRITE_ONCE'
61 | __WRITE_ONCE(x, val); \
| ~~~~~~~~~~~~~~~~^~~~
include/asm-generic/rwonce.h:55:33: note: expanded from macro '__WRITE_ONCE'
55 | *(volatile typeof(x) *)&(x) = (val); \
| ^~~
>> drivers/cpufreq/amd-pstate.c:497:48: warning: shift count >= width of type [-Wshift-count-overflow]
497 | WRITE_ONCE(cpudata->floor_perf_cnt, FIELD_GET(AMD_CPPC_FLOOR_PERF_CNT_MASK, cap1));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/msr-index.h:772:38: note: expanded from macro 'AMD_CPPC_FLOOR_PERF_CNT_MASK'
772 | #define AMD_CPPC_FLOOR_PERF_CNT_MASK GENMASK(39, 32)
| ^
include/linux/bits.h:51:24: note: expanded from macro 'GENMASK'
51 | #define GENMASK(h, l) GENMASK_TYPE(unsigned long, h, l)
| ^
include/linux/bits.h:49:20: note: expanded from macro 'GENMASK_TYPE'
49 | type_max(t) >> (BITS_PER_TYPE(t) - 1 - (h)))))
| ^
note: (skipping 6 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:686:9: note: expanded from macro '__compiletime_assert'
686 | if (!(condition)) \
| ^
include/asm-generic/rwonce.h:61:18: note: expanded from macro 'WRITE_ONCE'
61 | __WRITE_ONCE(x, val); \
| ~~~~~~~~~~~~~~~~^~~~
include/asm-generic/rwonce.h:55:33: note: expanded from macro '__WRITE_ONCE'
55 | *(volatile typeof(x) *)&(x) = (val); \
| ^~~
>> drivers/cpufreq/amd-pstate.c:497:48: warning: shift count >= width of type [-Wshift-count-overflow]
497 | WRITE_ONCE(cpudata->floor_perf_cnt, FIELD_GET(AMD_CPPC_FLOOR_PERF_CNT_MASK, cap1));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/msr-index.h:772:38: note: expanded from macro 'AMD_CPPC_FLOOR_PERF_CNT_MASK'
772 | #define AMD_CPPC_FLOOR_PERF_CNT_MASK GENMASK(39, 32)
| ^
include/linux/bits.h:51:24: note: expanded from macro 'GENMASK'
51 | #define GENMASK(h, l) GENMASK_TYPE(unsigned long, h, l)
| ^
include/linux/bits.h:48:20: note: expanded from macro 'GENMASK_TYPE'
48 | (type_max(t) << (l) & \
| ^
note: (skipping 6 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:686:9: note: expanded from macro '__compiletime_assert'
686 | if (!(condition)) \
| ^
include/asm-generic/rwonce.h:61:18: note: expanded from macro 'WRITE_ONCE'
61 | __WRITE_ONCE(x, val); \
| ~~~~~~~~~~~~~~~~^~~~
include/asm-generic/rwonce.h:55:33: note: expanded from macro '__WRITE_ONCE'
55 | *(volatile typeof(x) *)&(x) = (val); \
| ^~~
>> drivers/cpufreq/amd-pstate.c:497:48: warning: shift count >= width of type [-Wshift-count-overflow]
497 | WRITE_ONCE(cpudata->floor_perf_cnt, FIELD_GET(AMD_CPPC_FLOOR_PERF_CNT_MASK, cap1));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/msr-index.h:772:38: note: expanded from macro 'AMD_CPPC_FLOOR_PERF_CNT_MASK'
772 | #define AMD_CPPC_FLOOR_PERF_CNT_MASK GENMASK(39, 32)
| ^
include/linux/bits.h:51:24: note: expanded from macro 'GENMASK'
51 | #define GENMASK(h, l) GENMASK_TYPE(unsigned long, h, l)
| ^
include/linux/bits.h:49:20: note: expanded from macro 'GENMASK_TYPE'
49 | type_max(t) >> (BITS_PER_TYPE(t) - 1 - (h)))))
| ^
note: (skipping 6 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:686:9: note: expanded from macro '__compiletime_assert'
686 | if (!(condition)) \
| ^
include/asm-generic/rwonce.h:61:18: note: expanded from macro 'WRITE_ONCE'
61 | __WRITE_ONCE(x, val); \
| ~~~~~~~~~~~~~~~~^~~~
include/asm-generic/rwonce.h:55:33: note: expanded from macro '__WRITE_ONCE'
55 | *(volatile typeof(x) *)&(x) = (val); \
| ^~~
>> drivers/cpufreq/amd-pstate.c:497:48: warning: shift count >= width of type [-Wshift-count-overflow]
497 | WRITE_ONCE(cpudata->floor_perf_cnt, FIELD_GET(AMD_CPPC_FLOOR_PERF_CNT_MASK, cap1));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/msr-index.h:772:38: note: expanded from macro 'AMD_CPPC_FLOOR_PERF_CNT_MASK'
772 | #define AMD_CPPC_FLOOR_PERF_CNT_MASK GENMASK(39, 32)
| ^
include/linux/bits.h:51:24: note: expanded from macro 'GENMASK'
51 | #define GENMASK(h, l) GENMASK_TYPE(unsigned long, h, l)
| ^
include/linux/bits.h:48:20: note: expanded from macro 'GENMASK_TYPE'
48 | (type_max(t) << (l) & \
| ^
note: (skipping 6 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:686:9: note: expanded from macro '__compiletime_assert'
686 | if (!(condition)) \
| ^
include/asm-generic/rwonce.h:61:18: note: expanded from macro 'WRITE_ONCE'
61 | __WRITE_ONCE(x, val); \
| ~~~~~~~~~~~~~~~~^~~~
include/asm-generic/rwonce.h:55:33: note: expanded from macro '__WRITE_ONCE'
55 | *(volatile typeof(x) *)&(x) = (val); \
| ^~~
>> drivers/cpufreq/amd-pstate.c:497:48: warning: shift count >= width of type [-Wshift-count-overflow]
497 | WRITE_ONCE(cpudata->floor_perf_cnt, FIELD_GET(AMD_CPPC_FLOOR_PERF_CNT_MASK, cap1));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/msr-index.h:772:38: note: expanded from macro 'AMD_CPPC_FLOOR_PERF_CNT_MASK'
772 | #define AMD_CPPC_FLOOR_PERF_CNT_MASK GENMASK(39, 32)
| ^
include/linux/bits.h:51:24: note: expanded from macro 'GENMASK'
51 | #define GENMASK(h, l) GENMASK_TYPE(unsigned long, h, l)
| ^
include/linux/bits.h:49:20: note: expanded from macro 'GENMASK_TYPE'
49 | type_max(t) >> (BITS_PER_TYPE(t) - 1 - (h)))))
| ^
note: (skipping 6 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:686:9: note: expanded from macro '__compiletime_assert'
686 | if (!(condition)) \
| ^
include/asm-generic/rwonce.h:61:18: note: expanded from macro 'WRITE_ONCE'
61 | __WRITE_ONCE(x, val); \
| ~~~~~~~~~~~~~~~~^~~~
include/asm-generic/rwonce.h:55:33: note: expanded from macro '__WRITE_ONCE'
55 | *(volatile typeof(x) *)&(x) = (val); \
| ^~~
6 warnings generated.
vim +497 drivers/cpufreq/amd-pstate.c
457
458 static int msr_init_perf(struct amd_cpudata *cpudata)
459 {
460 union perf_cached perf = READ_ONCE(cpudata->perf);
461 u64 cap1, numerator, cppc_req;
462 u8 min_perf;
463
464 int ret = rdmsrq_safe_on_cpu(cpudata->cpu, MSR_AMD_CPPC_CAP1,
465 &cap1);
466 if (ret)
467 return ret;
468
469 ret = amd_get_boost_ratio_numerator(cpudata->cpu, &numerator);
470 if (ret)
471 return ret;
472
473 ret = rdmsrl_on_cpu(cpudata->cpu, MSR_AMD_CPPC_REQ, &cppc_req);
474 if (ret)
475 return ret;
476
477 WRITE_ONCE(cpudata->cppc_req_cached, cppc_req);
478 min_perf = FIELD_GET(AMD_CPPC_MIN_PERF_MASK, cppc_req);
479
480 /*
481 * Clear out the min_perf part to check if the rest of the MSR is 0, if yes, this is an
482 * indication that the min_perf value is the one specified through the BIOS option
483 */
484 cppc_req &= ~(AMD_CPPC_MIN_PERF_MASK);
485
486 if (!cppc_req)
487 perf.bios_min_perf = min_perf;
488
489 perf.highest_perf = numerator;
490 perf.max_limit_perf = numerator;
491 perf.min_limit_perf = FIELD_GET(AMD_CPPC_LOWEST_PERF_MASK, cap1);
492 perf.nominal_perf = FIELD_GET(AMD_CPPC_NOMINAL_PERF_MASK, cap1);
493 perf.lowest_nonlinear_perf = FIELD_GET(AMD_CPPC_LOWNONLIN_PERF_MASK, cap1);
494 perf.lowest_perf = FIELD_GET(AMD_CPPC_LOWEST_PERF_MASK, cap1);
495 WRITE_ONCE(cpudata->perf, perf);
496 WRITE_ONCE(cpudata->prefcore_ranking, FIELD_GET(AMD_CPPC_HIGHEST_PERF_MASK, cap1));
> 497 WRITE_ONCE(cpudata->floor_perf_cnt, FIELD_GET(AMD_CPPC_FLOOR_PERF_CNT_MASK, cap1));
498
499 return 0;
500 }
501
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-03-06 20:23 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-06 9:57 [PATCH 0/9] amd-pstate: Introduce AMD CPPC Performance Priority Gautham R. Shenoy
2026-03-06 9:57 ` [PATCH 1/9] amd-pstate: Fix memory leak in amd_pstate_epp_cpu_init() Gautham R. Shenoy
2026-03-07 2:29 ` Mario Limonciello (AMD) (kernel.org)
2026-03-06 9:57 ` [PATCH 2/9] amd-pstate: Update cppc_req_cached in fast_switch case Gautham R. Shenoy
2026-03-06 9:57 ` [PATCH 3/9] amd-pstate: Make certain freq_attrs conditionally visible Gautham R. Shenoy
2026-03-06 9:57 ` [PATCH 4/9] x86/cpufeatures: Add AMD CPPC Performance Priority feature Gautham R. Shenoy
2026-03-06 10:45 ` Borislav Petkov
2026-03-06 9:57 ` [PATCH 5/9] amd-pstate: Add support for CPPC_REQ2 and FLOOR_PERF Gautham R. Shenoy
2026-03-06 17:54 ` kernel test robot
2026-03-06 20:22 ` kernel test robot [this message]
2026-03-07 0:08 ` kernel test robot
2026-03-06 9:57 ` [PATCH 6/9] amd-pstate: Add sysfs support for floor_freq and floor_count Gautham R. Shenoy
2026-03-06 9:57 ` [PATCH 7/9] amd-pstate: Introduce a tracepoint trace_amd_pstate_cppc_req2() Gautham R. Shenoy
2026-03-06 9:57 ` [PATCH 8/9] Documentation/amd-pstate: List prefcore related sysfs files Gautham R. Shenoy
2026-03-06 9:57 ` [PATCH 9/9] Documentation/amd-pstate: Add documentation for amd_pstate_floor_{freq,count} Gautham R. Shenoy
2026-03-10 3:45 ` K Prateek Nayak
2026-03-11 10:32 ` Gautham R. Shenoy
2026-03-10 3:38 ` [PATCH 0/9] amd-pstate: Introduce AMD CPPC Performance Priority K Prateek Nayak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202603070431.ykswVnpp-lkp@intel.com \
--to=lkp@intel.com \
--cc=gautham.shenoy@amd.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mario.limonciello@amd.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=rafael@kernel.org \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox