tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 2376e5fe91bcad74b997d2cc0535abff79ec73c5 commit: 59348401ebed9f0e8ffe2d5b9cf1de30ecb24dde [9945/11483] platform/x86: amd-pmc: Add special handling for timer based S0i3 wakeup config: x86_64-randconfig-a003-20211027 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5db7568a6a1fcb408eb8988abdaff2a225a8eb72) reproduce (this is a W=1 build): 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/next/linux-next.git/commit/?id=59348401ebed9f0e8ffe2d5b9cf1de30ecb24dde git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout 59348401ebed9f0e8ffe2d5b9cf1de30ecb24dde # save the attached .config to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All errors (new ones prefixed by >>): >> drivers/platform/x86/amd-pmc.c:428:30: error: use of undeclared identifier 'CONFIG_RTC_SYSTOHC_DEVICE' rtc_device = rtc_class_open(CONFIG_RTC_SYSTOHC_DEVICE); ^ 1 error generated. vim +/CONFIG_RTC_SYSTOHC_DEVICE +428 drivers/platform/x86/amd-pmc.c 416 417 static int amd_pmc_verify_czn_rtc(struct amd_pmc_dev *pdev, u32 *arg) 418 { 419 struct rtc_device *rtc_device; 420 time64_t then, now, duration; 421 struct rtc_wkalrm alarm; 422 struct rtc_time tm; 423 int rc; 424 425 if (pdev->major < 64 || (pdev->major == 64 && pdev->minor < 53)) 426 return 0; 427 > 428 rtc_device = rtc_class_open(CONFIG_RTC_SYSTOHC_DEVICE); 429 if (!rtc_device) 430 return 0; 431 rc = rtc_read_alarm(rtc_device, &alarm); 432 if (rc) 433 return rc; 434 if (!alarm.enabled) { 435 dev_dbg(pdev->dev, "alarm not enabled\n"); 436 return 0; 437 } 438 rc = rtc_valid_tm(&alarm.time); 439 if (rc) 440 return rc; 441 rc = rtc_read_time(rtc_device, &tm); 442 if (rc) 443 return rc; 444 then = rtc_tm_to_time64(&alarm.time); 445 now = rtc_tm_to_time64(&tm); 446 duration = then-now; 447 448 /* in the past */ 449 if (then < now) 450 return 0; 451 452 /* will be stored in upper 16 bits of s0i3 hint argument, 453 * so timer wakeup from s0i3 is limited to ~18 hours or less 454 */ 455 if (duration <= 4 || duration > U16_MAX) 456 return -EINVAL; 457 458 *arg |= (duration << 16); 459 rc = rtc_alarm_irq_enable(rtc_device, 0); 460 dev_info(pdev->dev, "wakeup timer programmed for %lld seconds\n", duration); 461 462 return rc; 463 } 464 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip