From: kernel test robot <lkp@intel.com>
To: Mario Limonciello <mario.limonciello@amd.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-pci@vger.kernel.org, Bjorn Helgaas <helgaas@kernel.org>
Subject: [pci:pm 2/2] arch/x86/pci/fixup.c:929:6: error: use of undeclared identifier 'pm_suspend_target_state'
Date: Fri, 6 Oct 2023 18:32:45 +0800 [thread overview]
Message-ID: <202310061830.A7jaXxeG-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git pm
head: 624306d2c241c274e498619cabc2ae1dc7112ad1
commit: 624306d2c241c274e498619cabc2ae1dc7112ad1 [2/2] x86/PCI: Avoid PME from D3hot/D3cold for AMD Rembrandt and Phoenix USB4
config: x86_64-rhel-8.3-rust (https://download.01.org/0day-ci/archive/20231006/202310061830.A7jaXxeG-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231006/202310061830.A7jaXxeG-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/202310061830.A7jaXxeG-lkp@intel.com/
All errors (new ones prefixed by >>):
>> arch/x86/pci/fixup.c:929:6: error: use of undeclared identifier 'pm_suspend_target_state'
if (pm_suspend_target_state == PM_SUSPEND_ON)
^
>> arch/x86/pci/fixup.c:929:33: error: use of undeclared identifier 'PM_SUSPEND_ON'
if (pm_suspend_target_state == PM_SUSPEND_ON)
^
>> arch/x86/pci/fixup.c:951:20: error: call to undeclared function 'FIELD_GET'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
rp->pme_support = FIELD_GET(PCI_PM_CAP_PME_MASK, pmc);
^
3 errors generated.
vim +/pm_suspend_target_state +929 arch/x86/pci/fixup.c
907
908 #ifdef CONFIG_SUSPEND
909 /*
910 * Root Ports on some AMD SoCs advertise PME_Support for D3hot and D3cold, but
911 * if the SoC is put into a hardware sleep state by the amd-pmc driver, the
912 * Root Ports don't generate wakeup interrupts for USB devices.
913 *
914 * When suspending, remove D3hot and D3cold from the PME_Support advertised
915 * by the Root Port so we don't use those states if we're expecting wakeup
916 * interrupts. Restore the advertised PME_Support when resuming.
917 */
918 static void amd_rp_pme_suspend(struct pci_dev *dev)
919 {
920 struct pci_dev *rp;
921
922 /*
923 * PM_SUSPEND_ON means we're doing runtime suspend, which means
924 * amd-pmc will not be involved so PMEs during D3 work as advertised.
925 *
926 * The PMEs *do* work if amd-pmc doesn't put the SoC in the hardware
927 * sleep state, but we assume amd-pmc is always present.
928 */
> 929 if (pm_suspend_target_state == PM_SUSPEND_ON)
930 return;
931
932 rp = pcie_find_root_port(dev);
933 if (!rp->pm_cap)
934 return;
935
936 rp->pme_support &= ~((PCI_PM_CAP_PME_D3hot|PCI_PM_CAP_PME_D3cold) >>
937 PCI_PM_CAP_PME_SHIFT);
938 dev_info_once(&rp->dev, "quirk: disabling D3cold for suspend\n");
939 }
940
941 static void amd_rp_pme_resume(struct pci_dev *dev)
942 {
943 struct pci_dev *rp;
944 u16 pmc;
945
946 rp = pcie_find_root_port(dev);
947 if (!rp->pm_cap)
948 return;
949
950 pci_read_config_word(rp, rp->pm_cap + PCI_PM_PMC, &pmc);
> 951 rp->pme_support = FIELD_GET(PCI_PM_CAP_PME_MASK, pmc);
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-10-06 10:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202310061830.A7jaXxeG-lkp@intel.com \
--to=lkp@intel.com \
--cc=helgaas@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mario.limonciello@amd.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.