From: kernel test robot <lkp@intel.com>
To: Marek Maslanka <mmaslanka@google.com>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Hans de Goede <hdegoede@redhat.com>
Subject: [linux-next:master 7987/10296] drivers/platform/x86/intel/pmc/core.c:1501:17: error: implicit declaration of function 'acpi_pmtmr_register_suspend_resume_callback'
Date: Mon, 9 Sep 2024 02:59:38 +0800 [thread overview]
Message-ID: <202409090259.6vsS5Bni-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 9aaeb87ce1e966169a57f53a02ba05b30880ffb8
commit: e774696b1f95cc758fa7fdf2b700733cfc7b6fb9 [7987/10296] platform/x86:intel/pmc: Enable the ACPI PM Timer to be turned off when suspended
config: x86_64-buildonly-randconfig-002-20240514 (https://download.01.org/0day-ci/archive/20240909/202409090259.6vsS5Bni-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240909/202409090259.6vsS5Bni-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/202409090259.6vsS5Bni-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/platform/x86/intel/pmc/core.c: In function 'pmc_core_probe':
>> drivers/platform/x86/intel/pmc/core.c:1501:17: error: implicit declaration of function 'acpi_pmtmr_register_suspend_resume_callback' [-Werror=implicit-function-declaration]
1501 | acpi_pmtmr_register_suspend_resume_callback(pmc_core_acpi_pm_timer_suspend_resume,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/platform/x86/intel/pmc/core.c: In function 'pmc_core_remove':
>> drivers/platform/x86/intel/pmc/core.c:1517:17: error: implicit declaration of function 'acpi_pmtmr_unregister_suspend_resume_callback' [-Werror=implicit-function-declaration]
1517 | acpi_pmtmr_unregister_suspend_resume_callback();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/acpi_pmtmr_register_suspend_resume_callback +1501 drivers/platform/x86/intel/pmc/core.c
1433
1434 static int pmc_core_probe(struct platform_device *pdev)
1435 {
1436 static bool device_initialized;
1437 struct pmc_dev *pmcdev;
1438 const struct x86_cpu_id *cpu_id;
1439 int (*core_init)(struct pmc_dev *pmcdev);
1440 const struct pmc_reg_map *map;
1441 struct pmc *primary_pmc;
1442 int ret;
1443
1444 if (device_initialized)
1445 return -ENODEV;
1446
1447 pmcdev = devm_kzalloc(&pdev->dev, sizeof(*pmcdev), GFP_KERNEL);
1448 if (!pmcdev)
1449 return -ENOMEM;
1450
1451 pmcdev->crystal_freq = pmc_core_get_crystal_freq();
1452
1453 platform_set_drvdata(pdev, pmcdev);
1454 pmcdev->pdev = pdev;
1455
1456 cpu_id = x86_match_cpu(intel_pmc_core_ids);
1457 if (!cpu_id)
1458 return -ENODEV;
1459
1460 core_init = (int (*)(struct pmc_dev *))cpu_id->driver_data;
1461
1462 /* Primary PMC */
1463 primary_pmc = devm_kzalloc(&pdev->dev, sizeof(*primary_pmc), GFP_KERNEL);
1464 if (!primary_pmc)
1465 return -ENOMEM;
1466 pmcdev->pmcs[PMC_IDX_MAIN] = primary_pmc;
1467
1468 /* The last element in msr_map is empty */
1469 pmcdev->num_of_pkgc = ARRAY_SIZE(msr_map) - 1;
1470 pmcdev->pkgc_res_cnt = devm_kcalloc(&pdev->dev,
1471 pmcdev->num_of_pkgc,
1472 sizeof(*pmcdev->pkgc_res_cnt),
1473 GFP_KERNEL);
1474 if (!pmcdev->pkgc_res_cnt)
1475 return -ENOMEM;
1476
1477 /*
1478 * Coffee Lake has CPU ID of Kaby Lake and Cannon Lake PCH. So here
1479 * Sunrisepoint PCH regmap can't be used. Use Cannon Lake PCH regmap
1480 * in this case.
1481 */
1482 if (core_init == spt_core_init && !pci_dev_present(pmc_pci_ids))
1483 core_init = cnp_core_init;
1484
1485 mutex_init(&pmcdev->lock);
1486 ret = core_init(pmcdev);
1487 if (ret) {
1488 pmc_core_clean_structure(pdev);
1489 return ret;
1490 }
1491
1492 pmcdev->pmc_xram_read_bit = pmc_core_check_read_lock_bit(primary_pmc);
1493 pmc_core_do_dmi_quirks(primary_pmc);
1494
1495 pmc_core_dbgfs_register(pmcdev);
1496 pm_report_max_hw_sleep(FIELD_MAX(SLP_S0_RES_COUNTER_MASK) *
1497 pmc_core_adjust_slp_s0_step(primary_pmc, 1));
1498
1499 map = primary_pmc->map;
1500 if (map->acpi_pm_tmr_ctl_offset)
> 1501 acpi_pmtmr_register_suspend_resume_callback(pmc_core_acpi_pm_timer_suspend_resume,
1502 pmcdev);
1503
1504 device_initialized = true;
1505 dev_info(&pdev->dev, " initialized\n");
1506
1507 return 0;
1508 }
1509
1510 static void pmc_core_remove(struct platform_device *pdev)
1511 {
1512 struct pmc_dev *pmcdev = platform_get_drvdata(pdev);
1513 const struct pmc *pmc = pmcdev->pmcs[PMC_IDX_MAIN];
1514 const struct pmc_reg_map *map = pmc->map;
1515
1516 if (map->acpi_pm_tmr_ctl_offset)
> 1517 acpi_pmtmr_unregister_suspend_resume_callback();
1518
1519 pmc_core_dbgfs_unregister(pmcdev);
1520 pmc_core_clean_structure(pdev);
1521 }
1522
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2024-09-08 19:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-08 18:59 kernel test robot [this message]
2024-09-08 20:01 ` [PATCH] platform/x86:intel/pmc: Encapsulate callbacks registration in CONFIG_X86_PM_TIMER check Marek Maslanka
2024-09-09 11:40 ` Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202409090259.6vsS5Bni-lkp@intel.com \
--to=lkp@intel.com \
--cc=daniel.lezcano@linaro.org \
--cc=hdegoede@redhat.com \
--cc=linux-mm@kvack.org \
--cc=mmaslanka@google.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox