[PW_SID:1068416] Fix get cpu steer-tag fail on ARM64 platform#1633
[PW_SID:1068416] Fix get cpu steer-tag fail on ARM64 platform#1633linux-riscv-bot wants to merge 3 commits intoworkflow__riscv__fixesfrom
Conversation
Unify CPU ACPI ID retrieval interface across architectures by
refactoring get_acpi_id_for_cpu() to acpi_get_cpu_uid() on
arm64/riscv/loongarch:
- Add input parameter validation
- Adjust interface to int acpi_get_cpu_uid(unsigned int cpu, u32 *uid)
(old: u32 get_acpi_id_for_cpu(unsigned int cpu), no input check)
This refactoring (not a pure rename) enhances interface robustness while
preparing for consistent ACPI Processor UID retrieval across all
ACPI-enabled platforms. Valid inputs retain original behavior.
Note: Move the ARM64-specific get_cpu_for_acpi_id() implementation to
arch/arm64/kernel/acpi.c to fix compilation errors from circular
header dependencies introduced by the rename.
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>
Add acpi_get_cpu_uid() implementation for x86, replacing the existing cpu_acpi_id() function. This completes the unified ACPI Processor UID retrieval interface across all ACPI-enabled architectures. 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. Use acpi_get_cpu_uid() in pcie_tph_get_cpu_st() to translate from
logical CPU ID to ACPI Processor UID needed for the DSM call.
2. 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: "[v8,1/3] ACPI: Refactor get_acpi_id_for_cpu() to acpi_get_cpu_uid() on non-x86" |
|
Patch 1: "[v8,1/3] ACPI: Refactor get_acpi_id_for_cpu() to acpi_get_cpu_uid() on non-x86" |
|
Patch 1: "[v8,1/3] ACPI: Refactor get_acpi_id_for_cpu() to acpi_get_cpu_uid() on non-x86" |
|
Patch 1: "[v8,1/3] ACPI: Refactor get_acpi_id_for_cpu() to acpi_get_cpu_uid() on non-x86" |
|
Patch 1: "[v8,1/3] ACPI: Refactor get_acpi_id_for_cpu() to acpi_get_cpu_uid() on non-x86" |
|
Patch 1: "[v8,1/3] ACPI: Refactor get_acpi_id_for_cpu() to acpi_get_cpu_uid() on non-x86" |
|
Patch 1: "[v8,1/3] ACPI: Refactor get_acpi_id_for_cpu() to acpi_get_cpu_uid() on non-x86" |
|
Patch 1: "[v8,1/3] ACPI: Refactor get_acpi_id_for_cpu() to acpi_get_cpu_uid() on non-x86" |
|
Patch 1: "[v8,1/3] ACPI: Refactor get_acpi_id_for_cpu() to acpi_get_cpu_uid() on non-x86" |
|
Patch 1: "[v8,1/3] ACPI: Refactor get_acpi_id_for_cpu() to acpi_get_cpu_uid() on non-x86" |
|
Patch 1: "[v8,1/3] ACPI: Refactor get_acpi_id_for_cpu() to acpi_get_cpu_uid() on non-x86" |
|
Patch 1: "[v8,1/3] ACPI: Refactor get_acpi_id_for_cpu() to acpi_get_cpu_uid() on non-x86" |
|
Patch 2: "[v8,2/3] x86: Implement acpi_get_cpu_uid()" |
|
Patch 2: "[v8,2/3] x86: Implement acpi_get_cpu_uid()" |
|
Patch 2: "[v8,2/3] x86: Implement acpi_get_cpu_uid()" |
|
Patch 2: "[v8,2/3] x86: Implement acpi_get_cpu_uid()" |
|
Patch 2: "[v8,2/3] x86: Implement acpi_get_cpu_uid()" |
|
Patch 2: "[v8,2/3] x86: Implement acpi_get_cpu_uid()" |
|
Patch 2: "[v8,2/3] x86: Implement acpi_get_cpu_uid()" |
|
Patch 2: "[v8,2/3] x86: Implement acpi_get_cpu_uid()" |
|
Patch 2: "[v8,2/3] x86: Implement acpi_get_cpu_uid()" |
|
Patch 2: "[v8,2/3] x86: Implement acpi_get_cpu_uid()" |
|
Patch 2: "[v8,2/3] x86: Implement acpi_get_cpu_uid()" |
|
Patch 2: "[v8,2/3] x86: Implement acpi_get_cpu_uid()" |
|
Patch 3: "[v8,3/3] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform" |
|
Patch 3: "[v8,3/3] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform" |
|
Patch 3: "[v8,3/3] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform" |
|
Patch 3: "[v8,3/3] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform" |
|
Patch 3: "[v8,3/3] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform" |
|
Patch 3: "[v8,3/3] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform" |
|
Patch 3: "[v8,3/3] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform" |
|
Patch 3: "[v8,3/3] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform" |
|
Patch 3: "[v8,3/3] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform" |
|
Patch 3: "[v8,3/3] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform" |
|
Patch 3: "[v8,3/3] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform" |
|
Patch 3: "[v8,3/3] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform" |
PR for series 1068416 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=1068416
Version: 8