Re: [PATCH PATCH 2/9] cpufreq: intel_pstate: Use topology_cpu_type() to get cpu-type

kernel test robot
2024-06-17T14:01:58Z

Hi Pawan,

kernel test robot noticed the following build errors:

[auto build test ERROR on 83a7eefedc9b56fe7bfeff13b6c7356688ffa670]

url: https://github.com/intel-lab-lkp/linux/commits/Pawan-Gupta/x86-cpu-topology-Add-x86_cpu_type-to-struct-cpuinfo_topology/20240617-172542
base: 83a7eefedc9b56fe7bfeff13b6c7356688ffa670
patch link: https://lore.kernel.org/r/20240617-add-cpu-type-v1-2-b88998c01e76%40linux.intel.com
patch subject: [PATCH PATCH 2/9] cpufreq: intel_pstate: Use topology_cpu_type() to get cpu-type
config: i386-buildonly-randconfig-001-20240617 (https://download.01.org/0day-ci/archive/20240617/202406172134.ICqkbkNm-lkp@intel.com/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240617/202406172134.ICqkbkNm-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/202406172134.ICqkbkNm-lkp@intel.com/

All errors (new ones prefixed by >>):

drivers/cpufreq/intel_pstate.c: In function 'hwp_get_cpu_scaling':
>> drivers/cpufreq/intel_pstate.c:1959:25: error: 'X86_CPU_TYPE_INTEL_CORE' undeclared (first use in this function)
1959 | if (cpu_type == X86_CPU_TYPE_INTEL_CORE)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/cpufreq/intel_pstate.c:1959:25: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/cpufreq/intel_pstate.c:1963:25: error: 'X86_CPU_TYPE_INTEL_ATOM' undeclared (first use in this function)
1963 | if (cpu_type == X86_CPU_TYPE_INTEL_ATOM)
| ^~~~~~~~~~~~~~~~~~~~~~~

vim +/X86_CPU_TYPE_INTEL_CORE +1959 drivers/cpufreq/intel_pstate.c

1953
1954 static int hwp_get_cpu_scaling(int cpu)
1955 {
1956 u8 cpu_type = topology_cpu_type(cpu);
1957
1958 /* P-cores have a smaller perf level-to-freqency scaling factor. */
> 1959 if (cpu_type == X86_CPU_TYPE_INTEL_CORE)
1960 return hybrid_scaling_factor;
1961
1962 /* Use default core scaling for E-cores */
> 1963 if (cpu_type == X86_CPU_TYPE_INTEL_ATOM)
1964 return core_get_scaling();
1965
1966 /*
1967 * If reached here, this system is either non-hybrid (like Tiger
1968 * Lake) or hybrid-capable (like Alder Lake or Raptor Lake) with
1969 * no E cores (in which case CPUID for hybrid support is 0).
1970 *
1971 * The CPPC nominal_frequency field is 0 for non-hybrid systems,
1972 * so the default core scaling will be used for them.
1973 */
1974 return intel_pstate_cppc_get_scaling(cpu);
1975 }
1976

--
0-DAY CI Kernel Test Service