From: Bjorn Helgaas <helgaas@kernel.org>
To: Erin_Tsao@wistron.com
Cc: "Linux-PCI Mailing List" <linux-pci@vger.kernel.org>,
"Martin Mareš" <mj@ucw.cz>
Subject: Re: Issue about PCI physical slot fetch incorrect number
Date: Fri, 23 Aug 2024 16:03:01 -0500 [thread overview]
Message-ID: <20240823210301.GA385342@bhelgaas> (raw)
In-Reply-To: <mj+md-20240823.185024.10254.nikam@ucw.cz>
Hi Erin, thanks for your question.
On Fri, Aug 23, 2024 at 08:51:58PM +0200, Martin Mareš wrote:
> Hi!
>
> > This is Erin from Taiwan. I have a question about physical slot
> > number. Currently we are working on the PCIE slot number
> > assigning by PCIE switch. In the PCIe slot assignment process, the
> > slot numbers are assigned to bridges first, and then the end
> > devices fetch the slot ID from the bridge in the upper layer.
> >
> > I have observed that under our PCIE switch, GPUs will create a
> > bridge before reaching the end device. If GPUs also fetch the slot
> > ID from the upper bridge layer, they may retrieve incorrect
> > values.
> >
> > Our GPU will get the physical slot number with number “0”, and
> > show the slot number “0”、”0-1” , etc.
> > May I ask
> >
> > 1. Why GPU will fetch the slot number “0”? Is the slot number
> > assigned to GPU related to any register? Or can we set any bit
> > to fetch the right number?
> >
> > 2. Is there any possible for us not to show the physical slot
> > number of GPU?
Can you supply logs showing what you see and what's incorrect?
For example, if lspci is showing the wrong thing, can you provide the
complete output of "sudo lspci -vv" and indicate which things are
wrong?
If the kernel dmesg log is wrong, can you supply that output and point
out what's wrong?
Also, I think slots are exposed in /sys, so please include the output
of "grep . /sys/bus/pci/slots/*/address".
Slot numbering is messy because there are several sources of
information, e.g., the Physical Slot Number in the Slot Capabilities
register, SMBIOS table, ACPI _DSM methods, etc., and they are not all
coordinated. So the kernel goes to some trouble to come up with a
unique "slot number" for each slot.
Bjorn
next prev parent reply other threads:[~2024-08-23 21:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <a600fc09c06d4ca28b045668ad1e63cb@wistron.com>
2024-08-23 18:51 ` Issue about PCI physical slot fetch incorrect number Martin Mareš
2024-08-23 21:03 ` Bjorn Helgaas [this message]
2024-08-26 8:27 ` Erin_Tsao
2024-08-29 16:35 ` Bjorn Helgaas
2024-09-06 2:04 ` Erin_Tsao
2024-09-18 14:09 ` Bjorn Helgaas
2024-08-26 9:05 ` Erin_Tsao
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=20240823210301.GA385342@bhelgaas \
--to=helgaas@kernel.org \
--cc=Erin_Tsao@wistron.com \
--cc=linux-pci@vger.kernel.org \
--cc=mj@ucw.cz \
/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