From: fengchengwen <fengchengwen@huawei.com>
To: Wei Huang <wei.huang2@amd.com>
Cc: Bjorn Helgaas <helgaas@kernel.org>, <linux-pci@vger.kernel.org>,
<Eric.VanTassell@amd.com>, <bhelgaas@google.com>,
<jonathan.cameron@huawei.com>, <wangzhou1@hisilicon.com>,
<wanghuiqiang@huawei.com>, <liuyonglong@huawei.com>
Subject: Re: RFC about how to obtain PCIE TPH steer-tag on ARM64 platform
Date: Fri, 16 Jan 2026 08:14:02 +0800 [thread overview]
Message-ID: <843cc325-c41b-4e19-99fd-bb65e984fa1f@huawei.com> (raw)
In-Reply-To: <aWfF-ZNp55n5DHR5@weiserver>
On 1/15/2026 12:36 AM, Wei Huang wrote:
> On Wed, Jan 14, 2026 at 11:52:50AM +0800, fengchengwen wrote:
>> On 1/14/2026 6:38 AM, Wei Huang wrote:
>>> On Tue, Jan 13, 2026 at 01:07:13PM -0600, Bjorn Helgaas wrote:
>>>> On Mon, Jan 12, 2026 at 11:01:31AM +0800, fengchengwen wrote:
>>>>> Hi all,
>>>>>
>>>>> We want to enable PCIE TPH feature on ARM64 platform, but we encounter the
>>>>> following problem:
>>>>>
>>>>> 1. The pcie_tph_get_cpu_st() function invokes the ACPI DSM method to
>>>>> obtain the steer-tag of the CPU. According to the definition of
>>>>> the DSM method [1], the cpu_uid should be "ACPI processor uid".
>>>>
>>>>> 2. In the current implementation, the ACPI DSM method is invoked
>>>>> directly using the logical core number, which works on the x86
>>>>> platform but does not work on the ARM64 platform because the
>>>>> logical core ID is not the same as the ACPI processor ID when the
>>>>> PG exists.
>>>>
>>>> PG?
>>>>
>>>>> Because the ARM64 platform generates steer-tag based on the MPIDR
>>>>> information (at least for the Kunpeng platform). Therefore, we have
>>>>> two option:
>>>>>
>>>>> Option-1: convert logic core ID to ACPI process ID: use
>>>>> get_acpi_id_for_cpu() to get ACPI process ID in
>>>>> pcie_tph_get_cpu_st() before invoke dsm [2], and BIOS/ACPI
>>>>> use process ID to get corresponding MPIDR, and then
>>>>> generate steer-tag from MPIDR.
>>>
>>> In my opinion, if this is achievable in your BIOS/ACPI, it is clean vs. Option-2 and preferred.
>>
>> Yes, it's achievable for out BIOS/ACPI, and we will adopt this option.
>>
>>>
>>>>>
>>>>> Option-2: convert logic core ID to MPIDR: use cpu_logical_map() to
>>>>> get MPIDR in pcie_tph_get_cpu_st() before invoke dsm, and
>>>>> BIOS/ACPI use it to generate steer-tag directly.
>>>
>>> This solution requires you to change the ECN and ratify it (as suggested by Bjorn below). The implementation can also be complicated.
>>
>> Indeed, and it may take a long time.
>>
>> @Wei, I have another question:
>> The cache is hierarchical, for example, L2 or L3. Does the DSM mode support the specified cache level?
>> I checked the ECN doc and there are "Cache Reference" fields, but the kernel code don't enable them.
>
> ECN does provide the "Cache Reference" field as part of argument2. Our platforms don't use it and don't plan to use it soon. You can explore the use cases if your platforms need it.
>
> I want to point out that PCIe TLP header doesn't have a field for cache level. So no matter what, TLP header will stuck with 8- or 16-bit STs.
Okay, I will try to understand how to use "Cache Reference" as cache level parameter.
I think this would give the user a more refined ability.
>
>>
>
>
next prev parent reply other threads:[~2026-01-16 0:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-12 3:01 RFC about how to obtain PCIE TPH steer-tag on ARM64 platform fengchengwen
2026-01-13 19:07 ` Bjorn Helgaas
2026-01-13 22:38 ` Wei Huang
2026-01-14 3:52 ` fengchengwen
2026-01-14 16:36 ` Wei Huang
2026-01-16 0:14 ` fengchengwen [this message]
2026-01-14 3:39 ` fengchengwen
2026-01-14 17:03 ` Bjorn Helgaas
2026-01-16 0:21 ` fengchengwen
2026-01-16 19:32 ` Bjorn Helgaas
2026-01-19 0:17 ` fengchengwen
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=843cc325-c41b-4e19-99fd-bb65e984fa1f@huawei.com \
--to=fengchengwen@huawei.com \
--cc=Eric.VanTassell@amd.com \
--cc=bhelgaas@google.com \
--cc=helgaas@kernel.org \
--cc=jonathan.cameron@huawei.com \
--cc=linux-pci@vger.kernel.org \
--cc=liuyonglong@huawei.com \
--cc=wanghuiqiang@huawei.com \
--cc=wangzhou1@hisilicon.com \
--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