From: fengchengwen <fengchengwen@huawei.com>
To: Wei Huang <wei.huang2@amd.com>, <bhelgaas@google.com>
Cc: <linux-pci@vger.kernel.org>, <linux-doc@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <skhan@linuxfoundation.org>,
<corbet@lwn.net>, <rdunlap@infradead.org>
Subject: Re: [PATCH RFC 3/3] Expose the CPU/Steering Tag mapping via debugfs
Date: Thu, 19 Nov 2026 08:59:52 +0800 [thread overview]
Message-ID: <975e32a9-357f-4550-8309-54259b78c26a@huawei.com> (raw)
In-Reply-To: <20261001155551.4182899-4-wei.huang2@amd.com>
Hi Wei,
1. Should we consider cpu hotplug ? How about add cpus_read_lock() in start() and
release it in stop()
2. Does this support RCiEP device?
Other LGTM
Thanks,
Chengwen
On 10/1/2026 11:55 PM, Wei Huang wrote:
> Steering Tags (ST) are opaque, platform specific values obtained from the
> ACPI ST _DSM, and are only visible to the driver that asks for them. That
> makes it hard to validate whether firmware reports a sane mapping at all.
>
> Expose the mapping read-only in the debugfs directory of each Root Port
> that has ST _DSM support:
>
> # cat /sys/kernel/debug/pci/0000:00:01.1/tph_cpu_st
> cpu vm_st vm_xst vm_ph_ignore pm_st pm_xst pm_ph_ignore
> 0 0x03 0x0103 0 - - 0
> 1 0x03 0x0103 0 - - 0
>
> Each line holds the raw ST info the _DSM returns for one online CPU;
> invalid tags and failed queries are reported as "-".
>
> The interface is per Root Port because the _DSM is evaluated on the ACPI
> device of the host bridge above it. A system with multiple host bridges may
> return different tags for the same CPU, and the value that matters to a
> driver is the one for the Root Port its device sits below. Root Ports below
> the same host bridge report identical contents.
>
> The file is created during enumeration and removed with the device's
> debugfs directory in pci_destroy_dev(), which returns only once no read is
> running, so the pci_dev the file refers to stays valid.
>
> Signed-off-by: Wei Huang <wei.huang2@amd.com>
next prev parent reply other threads:[~2026-11-19 1:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 15:55 [PATCH RFC 0/3] PCI/TPH: Expose CPU-to-Steering Tag mappings " Wei Huang
2026-10-01 15:55 ` [PATCH RFC 1/3] PCI/TPH: Factor out the ST _DSM evaluation Wei Huang
2026-11-19 0:18 ` fengchengwen
2026-10-01 15:55 ` [PATCH RFC 2/3] PCI: Add per-device debugfs directories Wei Huang
2026-11-19 0:31 ` fengchengwen
2026-10-01 15:55 ` [PATCH RFC 3/3] Expose the CPU/Steering Tag mapping via debugfs Wei Huang
2026-11-19 0:59 ` fengchengwen [this message]
2026-11-04 21:32 ` [PATCH RFC 0/3] PCI/TPH: Expose CPU-to-Steering Tag mappings " Wei Huang
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=975e32a9-357f-4550-8309-54259b78c26a@huawei.com \
--to=fengchengwen@huawei.com \
--cc=bhelgaas@google.com \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=skhan@linuxfoundation.org \
--cc=wei.huang2@amd.com \
/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
all inboxes | Powered by JetHome®