Subject: Re: linux-next: build failure after merge of the pci tree

From: Bjorn Helgaas <[email-masked]>
Date: Fri, 6 Oct 2023 09:11:55 -0500

On Fri, Oct 06, 2023 at 11:56:04AM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the pci tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
> 
> arch/x86/pci/fixup.c: In function 'amd_rp_pme_suspend':
> arch/x86/pci/fixup.c:929:13: error: 'pm_suspend_target_state' undeclared (first use in this function)
>   929 |         if (pm_suspend_target_state == PM_SUSPEND_ON)
>       |             ^~~~~~~~~~~~~~~~~~~~~~~
> arch/x86/pci/fixup.c:929:13: note: each undeclared identifier is reported only once for each function it appears in
> arch/x86/pci/fixup.c:929:40: error: 'PM_SUSPEND_ON' undeclared (first use in this function); did you mean 'RPM_SUSPENDING'?
>   929 |         if (pm_suspend_target_state == PM_SUSPEND_ON)
>       |                                        ^~~~~~~~~~~~~
>       |                                        RPM_SUSPENDING
> arch/x86/pci/fixup.c: In function 'amd_rp_pme_resume':
> arch/x86/pci/fixup.c:951:27: error: implicit declaration of function 'FIELD_GET' [-Werror=implicit-function-declaration]
>   951 |         rp->pme_support = FIELD_GET(PCI_PM_CAP_PME_MASK, pmc);
>       |                           ^~~~~~~~~
> 
> Caused by commit
> 
>   624306d2c241 ("x86/PCI: Avoid PME from D3hot/D3cold for AMD Rembrandt and Phoenix USB4")

How embarrassing.  I moved this from drivers/pci to arch/x86 and
obviously didn't even compile it afterwards.  Should be fixed now.

Bjorn