tree: git://git.infradead.org/linux-platform-drivers-x86.git review-andy head: 60accc011af0ff869875b1ded81cbd0948267f05 commit: c3bfcd4c676238e198d5a798b50e5d424bf05497 [43/55] platform/x86: thinkpad_acpi: Add platform profile support config: i386-randconfig-a003-20210202 (attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 reproduce (this is a W=1 build): git remote add platform-drivers-x86 git://git.infradead.org/linux-platform-drivers-x86.git git fetch --no-tags platform-drivers-x86 review-andy git checkout c3bfcd4c676238e198d5a798b50e5d424bf05497 # save the attached .config to linux build tree make W=1 ARCH=i386 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All errors (new ones prefixed by >>): ld: drivers/platform/x86/thinkpad_acpi.o: in function `dytc_profile_exit': >> drivers/platform/x86/thinkpad_acpi.c:10246: undefined reference to `platform_profile_remove' ld: drivers/platform/x86/thinkpad_acpi.o: in function `dytc_profile_refresh': >> drivers/platform/x86/thinkpad_acpi.c:10186: undefined reference to `platform_profile_notify' ld: drivers/platform/x86/thinkpad_acpi.o: in function `tpacpi_dytc_profile_init': >> drivers/platform/x86/thinkpad_acpi.c:10226: undefined reference to `platform_profile_register' vim +10246 drivers/platform/x86/thinkpad_acpi.c 10169 10170 static void dytc_profile_refresh(void) 10171 { 10172 enum platform_profile_option profile; 10173 int output, err; 10174 int perfmode; 10175 10176 mutex_lock(&dytc_mutex); 10177 err = dytc_cql_command(DYTC_CMD_GET, &output); 10178 mutex_unlock(&dytc_mutex); 10179 if (err) 10180 return; 10181 10182 perfmode = (output >> DYTC_GET_MODE_BIT) & 0xF; 10183 convert_dytc_to_profile(perfmode, &profile); 10184 if (profile != dytc_current_profile) { 10185 dytc_current_profile = profile; 10186 platform_profile_notify(); 10187 } 10188 } 10189 10190 static struct platform_profile_handler dytc_profile = { 10191 .profile_get = dytc_profile_get, 10192 .profile_set = dytc_profile_set, 10193 }; 10194 10195 static int tpacpi_dytc_profile_init(struct ibm_init_struct *iibm) 10196 { 10197 int err, output; 10198 10199 /* Setup supported modes */ 10200 set_bit(PLATFORM_PROFILE_LOW_POWER, dytc_profile.choices); 10201 set_bit(PLATFORM_PROFILE_BALANCED, dytc_profile.choices); 10202 set_bit(PLATFORM_PROFILE_PERFORMANCE, dytc_profile.choices); 10203 10204 dytc_profile_available = false; 10205 err = dytc_command(DYTC_CMD_QUERY, &output); 10206 /* 10207 * If support isn't available (ENODEV) then don't return an error 10208 * and don't create the sysfs group 10209 */ 10210 if (err == -ENODEV) 10211 return 0; 10212 /* For all other errors we can flag the failure */ 10213 if (err) 10214 return err; 10215 10216 /* Check DYTC is enabled and supports mode setting */ 10217 if (output & BIT(DYTC_QUERY_ENABLE_BIT)) { 10218 /* Only DYTC v5.0 and later has this feature. */ 10219 int dytc_version; 10220 10221 dytc_version = (output >> DYTC_QUERY_REV_BIT) & 0xF; 10222 if (dytc_version >= 5) { 10223 dbg_printk(TPACPI_DBG_INIT, 10224 "DYTC version %d: thermal mode available\n", dytc_version); 10225 /* Create platform_profile structure and register */ 10226 err = platform_profile_register(&dytc_profile); 10227 /* 10228 * If for some reason platform_profiles aren't enabled 10229 * don't quit terminally. 10230 */ 10231 if (err) 10232 return 0; 10233 10234 dytc_profile_available = true; 10235 /* Ensure initial values are correct */ 10236 dytc_profile_refresh(); 10237 } 10238 } 10239 return 0; 10240 } 10241 10242 static void dytc_profile_exit(void) 10243 { 10244 if (dytc_profile_available) { 10245 dytc_profile_available = false; 10246 platform_profile_remove(); 10247 } 10248 } 10249 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip