Re: [PATCH v7] ACPI: button: Report wakeup key only for power button wakeups
From: kernel test robot
Date: Mon Nov 09 2026 - 16:12:20 EST
Hi Baorui.Liu,
kernel test robot noticed the following build errors:
[auto build test ERROR on ee3b82351a306b559fd132b9b168185fee641a18]
url: https://github.com/intel-lab-lkp/linux/commits/Baorui-Liu/ACPI-button-Report-wakeup-key-only-for-power-button-wakeups/20261109-162832
base: ee3b82351a306b559fd132b9b168185fee641a18
patch link: https://lore.kernel.org/r/20261109082832.496-1-baorliu%40amd.com
patch subject: [PATCH v7] ACPI: button: Report wakeup key only for power button wakeups
config: x86_64-randconfig-1015-20261109 (https://download.01.org/0day-ci/archive/20261110/202611100542.1xljQv20-lkp@xxxxxxxxx/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261110/202611100542.1xljQv20-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611100542.1xljQv20-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
ld: drivers/acpi/button.o: in function `acpi_button_resume':
>> drivers/acpi/button.c:568:(.text+0x2384): undefined reference to `acpi_sleep_pwr_btn_wakeup_pending'
vim +568 drivers/acpi/button.c
544
545 static int acpi_button_resume(struct device *dev)
546 {
547 struct acpi_button *button = dev_get_drvdata(dev);
548 struct input_dev *input;
549 bool report_wakeup = false;
550
551 /*
552 * Drain notify work queued while suspended so a late power-button
553 * notify still observes suspended == true, sets wakeup_pending, and
554 * does not synthesize KEY_POWER for userspace.
555 */
556 acpi_os_wait_events_complete();
557
558 /*
559 * Sample and report KEY_WAKEUP before clearing suspended. Otherwise a
560 * notify that arrives after sampling but before suspended is cleared
561 * can set wakeup_pending and then be dropped without KEY_WAKEUP or
562 * KEY_POWER. Clear suspended before wakeup_pending so a new SCI sees
563 * suspended == false and takes the normal KEY_POWER path; barrier()
564 * keeps that store order.
565 */
566 if (button->type == ACPI_BUTTON_TYPE_POWER) {
567 report_wakeup = READ_ONCE(button->wakeup_pending) ||
> 568 acpi_sleep_pwr_btn_wakeup_pending();
569 if (report_wakeup) {
570 input = button->input;
571 input_report_key(input, KEY_WAKEUP, 1);
572 input_sync(input);
573 input_report_key(input, KEY_WAKEUP, 0);
574 input_sync(input);
575 }
576 }
577
578 WRITE_ONCE(button->suspended, false);
579 barrier();
580 WRITE_ONCE(button->wakeup_pending, false);
581
582 if (button->type == ACPI_BUTTON_TYPE_LID) {
583 button->last_state = !!acpi_lid_evaluate_state(ACPI_HANDLE(dev));
584 button->last_time = ktime_get();
585 acpi_lid_initialize_state(button);
586 }
587
588 return 0;
589 }
590 #endif
591
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki