Re: [PATCH 06/16] x86/amd_nb: Simplify root device search

From: Yazen Ghannam
Date: Thu Oct 31 2024 - 11:31:29 EST


On Thu, Oct 31, 2024 at 12:20:27PM +0100, Borislav Petkov wrote:
> On Wed, Oct 23, 2024 at 05:21:40PM +0000, Yazen Ghannam wrote:
> > The "root" device search was introduced to support SMN access for Zen
> > systems. This device represents a PCIe root complex. It is not the
> > same as the "CPU/node" devices found at slots 0x18-0x1F.
> >
> > There may be multiple PCIe root complexes within an AMD node. Such is
> > the case with server or HEDT systems, etc. Therefore it is not enough to
>
> HEDT?
>

Sorry, forgot to spell it: High-end Desktop.

> ...
>
> > +struct pci_dev *amd_node_get_root(u16 node)
> > +{
> > + struct pci_dev *df_f0 __free(pci_dev_put) = NULL;
> > + struct pci_dev *root;
> > + u16 cntl_off;
> > + u8 bus;
> > +
> > + if (!boot_cpu_has(X86_FEATURE_ZEN))
>
> check_for_deprecated_apis: WARNING: arch/x86/kernel/amd_node.c:67: Do not use boot_cpu_has() - use cpu_feature_enabled() instead
>

Ack.

Thanks,
Yazen