[PW_SID:1064058] Fix get cpu steer-tag fail on ARM64 platform#1583
[PW_SID:1064058] Fix get cpu steer-tag fail on ARM64 platform#1583linux-riscv-bot wants to merge 2 commits into
Conversation
To unify the CPU ACPI ID retrieval interface across architectures, rename the existing get_acpi_id_for_cpu() function to acpi_get_cpu_acpi_id() on arm64/riscv/loongarch platforms. This is a pure rename with no functional change, preparing for a consistent ACPI Processor UID retrieval interface across all ACPI-enabled platforms. Cc: stable@vger.kernel.org Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
pcie_tph_get_cpu_st() is broken on ARM64:
1. pcie_tph_get_cpu_st() passes cpu_uid to the PCI ACPI DSM method.
cpu_uid should be the ACPI Processor UID [1].
2. In BNXT, pcie_tph_get_cpu_st() is passed a cpu_uid obtained via
cpumask_first(irq->cpu_mask) - the logical CPU ID of a CPU core,
generated and managed by kernel (e.g., [0,255] for a system with 256
logical CPU cores).
3. On ARM64 platforms, ACPI assigns Processor UID to cores listed in the
MADT table, and this UID may not match the kernel's logical CPU ID.
When this occurs, the mismatch results in the wrong CPU steer-tag.
4. On AMD x86 the logical CPU ID is identical to the ACPI Processor UID
so the mismatch is not seen.
Resolution:
1. Implement acpi_get_cpu_acpi_id() for x86, which replaces
cpu_acpi_id(). All ACPI platforms now have an implementation.
2. Use acpi_get_cpu_acpi_id() in pcie_tph_get_cpu_st() to translate from
logical CPU ID to ACPI Processor UID needed for the DSM call.
3. Rename pcie_tpu_get_cpu_st() parameter from cpu_uid to cpu to
reflect that it is a logical CPU_ID.
[1] According to ECN_TPH-ST_Revision_20200924
(https://members.pcisig.com/wg/PCI-SIG/document/15470), the input
is defined as: "If the target is a processor, then this field
represents the ACPI Processor UID of the processor as specified in
the MADT. If the target is a processor container, then this field
represents the ACPI Processor UID of the processor container as
specified in the PPTT."
Fixes: d2e8a34 ("PCI/TPH: Add Steering Tag support")
Cc: stable@vger.kernel.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[v5,1/2] ACPI: Rename get_acpi_id_for_cpu() to acpi_get_cpu_acpi_id() on non-x86" |
|
Patch 1: "[v5,1/2] ACPI: Rename get_acpi_id_for_cpu() to acpi_get_cpu_acpi_id() on non-x86" |
|
Patch 1: "[v5,1/2] ACPI: Rename get_acpi_id_for_cpu() to acpi_get_cpu_acpi_id() on non-x86" |
|
Patch 1: "[v5,1/2] ACPI: Rename get_acpi_id_for_cpu() to acpi_get_cpu_acpi_id() on non-x86" |
|
Patch 1: "[v5,1/2] ACPI: Rename get_acpi_id_for_cpu() to acpi_get_cpu_acpi_id() on non-x86" |
|
Patch 1: "[v5,1/2] ACPI: Rename get_acpi_id_for_cpu() to acpi_get_cpu_acpi_id() on non-x86" |
|
Patch 1: "[v5,1/2] ACPI: Rename get_acpi_id_for_cpu() to acpi_get_cpu_acpi_id() on non-x86" |
|
Patch 1: "[v5,1/2] ACPI: Rename get_acpi_id_for_cpu() to acpi_get_cpu_acpi_id() on non-x86" |
|
Patch 1: "[v5,1/2] ACPI: Rename get_acpi_id_for_cpu() to acpi_get_cpu_acpi_id() on non-x86" |
|
Patch 1: "[v5,1/2] ACPI: Rename get_acpi_id_for_cpu() to acpi_get_cpu_acpi_id() on non-x86" |
|
Patch 1: "[v5,1/2] ACPI: Rename get_acpi_id_for_cpu() to acpi_get_cpu_acpi_id() on non-x86" |
|
Patch 1: "[v5,1/2] ACPI: Rename get_acpi_id_for_cpu() to acpi_get_cpu_acpi_id() on non-x86" |
|
Patch 2: "[v5,2/2] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform" |
|
Patch 2: "[v5,2/2] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform" |
|
Patch 2: "[v5,2/2] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform" |
|
Patch 2: "[v5,2/2] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform" |
|
Patch 2: "[v5,2/2] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform" |
|
Patch 2: "[v5,2/2] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform" |
|
Patch 2: "[v5,2/2] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform" |
|
Patch 2: "[v5,2/2] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform" |
|
Patch 2: "[v5,2/2] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform" |
|
Patch 2: "[v5,2/2] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform" |
|
Patch 2: "[v5,2/2] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform" |
|
Patch 2: "[v5,2/2] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform" |
PR for series 1064058 applied to workflow__riscv__fixes
Name: Fix get cpu steer-tag fail on ARM64 platform
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1064058
Version: 5