[powerpc:topic/cpu-smt 6/9] kernel/cpu.c:2583:36: error: 'cpu_smt_max_threads' undeclared; did you mean 'cpu_smt_num_threads'?
kernel test robot
lkp at intel.com
Thu Jun 1 01:32:25 AEST 2023
tree: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git topic/cpu-smt
head: 7bb712baeffc4640f5511feec68add6f1767413f
commit: 570b70824d468facd197e44b6d40c9e79886b81c [6/9] cpu/SMT: Allow enabling partial SMT states via sysfs
config: parisc-defconfig (https://download.01.org/0day-ci/archive/20230531/202305312356.SfvJ8Iwh-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 12.3.0
reproduce (this is a W=1 build):
mkdir -p ~/bin
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id=570b70824d468facd197e44b6d40c9e79886b81c
git remote add powerpc https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
git fetch --no-tags powerpc topic/cpu-smt
git checkout 570b70824d468facd197e44b6d40c9e79886b81c
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=parisc olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=parisc SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202305312356.SfvJ8Iwh-lkp@intel.com/
All errors (new ones prefixed by >>):
kernel/cpu.c: In function 'control_show':
>> kernel/cpu.c:2583:36: error: 'cpu_smt_max_threads' undeclared (first use in this function); did you mean 'cpu_smt_num_threads'?
2583 | cpu_smt_num_threads != cpu_smt_max_threads)
| ^~~~~~~~~~~~~~~~~~~
| cpu_smt_num_threads
kernel/cpu.c:2583:36: note: each undeclared identifier is reported only once for each function it appears in
vim +2583 kernel/cpu.c
2571
2572 static ssize_t control_show(struct device *dev,
2573 struct device_attribute *attr, char *buf)
2574 {
2575 const char *state = smt_states[cpu_smt_control];
2576
2577 /*
2578 * If SMT is enabled but not all threads are enabled then show the
2579 * number of threads. If all threads are enabled show "on". Otherwise
2580 * show the state name.
2581 */
2582 if (cpu_smt_control == CPU_SMT_ENABLED &&
> 2583 cpu_smt_num_threads != cpu_smt_max_threads)
2584 return sysfs_emit(buf, "%d\n", cpu_smt_num_threads);
2585
2586 return snprintf(buf, PAGE_SIZE - 2, "%s\n", state);
2587 }
2588
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the Linuxppc-dev
mailing list