public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yazen Ghannam <yazen.ghannam@amd.com>
To: Borislav Petkov <bp@alien8.de>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
	Mario Limonciello <mario.limonciello@amd.com>,
	Filip Barczyk <filip.barczyk@pico.net>
Subject: Re: [PATCH 1/2] x86/amd_node: Fix AMD root device caching
Date: Tue, 21 Oct 2025 09:37:45 -0400	[thread overview]
Message-ID: <20251021133745.GA3976@yaz-khff2.amd.com> (raw)
In-Reply-To: <20251021122909.GKaPd8ldoGqAf5JPfQ@fat_crate.local>

On Tue, Oct 21, 2025 at 02:29:09PM +0200, Borislav Petkov wrote:
> On Tue, Sep 30, 2025 at 04:45:45PM +0000, Yazen Ghannam wrote:
> > Recent AMD node rework removed the "search and count" method of caching
> > AMD root devices. This depended on the value from a Data Fabric register
> > that was expected to hold the PCI bus of one of the root devices
> > attached to that fabric.
> > 
> > However, this expectation is incorrect. The register, when read from PCI
> > config space, returns the bitwise-OR of the buses of all attached root
> > devices.
> > 
> > This behavior is benign on AMD reference design boards, since the bus
> > numbers are aligned. This results in a bitwise-OR value matching one of
> > the buses. For example, 0x00 | 0x40 | 0xA0 | 0xE0 = 0xE0.
> > 
> > This behavior breaks on boards where the bus numbers are not exactly
> > aligned. For example, 0x00 | 0x07 | 0xE0 | 0x15 = 0x1F.
> 
> Do I see it correctly that one of the root device's PCI bus is always 0x0 so
> you can simply read that one and you can keep the current code?
> 

It's correct that one of the root devices will be on bus 0x0. But that
device will be part of AMD node 0. So we still need to pick a root
device for the other, if any, AMD nodes in the system.

For example, a system with 2 AMD nodes could have this:
Node 0 : 0x00 0x07 0x0e 0x15
Node 1 : 0x1c 0x23 0x2a 0x31

Thanks,
Yazen

  reply	other threads:[~2025-10-21 13:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-30 16:45 [PATCH 0/2] AMD root search fix Yazen Ghannam
2025-09-30 16:45 ` [PATCH 1/2] x86/amd_node: Fix AMD root device caching Yazen Ghannam
2025-09-30 18:07   ` Mario Limonciello (AMD) (kernel.org)
2025-10-01 13:46     ` Yazen Ghannam
2025-10-07 17:30       ` Filip Barczyk
2025-10-07 17:37       ` Filip Barczyk
2025-10-21 12:29   ` Borislav Petkov
2025-10-21 13:37     ` Yazen Ghannam [this message]
2025-10-21 14:15       ` Borislav Petkov
2025-10-21 14:25         ` Yazen Ghannam
2025-10-22 11:13   ` Borislav Petkov
2025-10-22 13:19     ` Yazen Ghannam
2025-10-22 18:48       ` Borislav Petkov
2025-09-30 16:45 ` [PATCH 2/2] x86/amd_node: Use new root search helper Yazen Ghannam
2025-09-30 18:07 ` [PATCH 0/2] AMD root search fix Mario Limonciello (AMD) (kernel.org)

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=20251021133745.GA3976@yaz-khff2.amd.com \
    --to=yazen.ghannam@amd.com \
    --cc=bp@alien8.de \
    --cc=filip.barczyk@pico.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=x86@kernel.org \
    /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