Skip to content

[PW_SID:1068416] Fix get cpu steer-tag fail on ARM64 platform#1633

Open
linux-riscv-bot wants to merge 3 commits intoworkflow__riscv__fixesfrom
pw1068416
Open

[PW_SID:1068416] Fix get cpu steer-tag fail on ARM64 platform#1633
linux-riscv-bot wants to merge 3 commits intoworkflow__riscv__fixesfrom
pw1068416

Conversation

@linux-riscv-bot
Copy link

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

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>
@linux-riscv-bot
Copy link
Author

Patch 1: "[v8,1/3] ACPI: Refactor get_acpi_id_for_cpu() to acpi_get_cpu_uid() on non-x86"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 138.98 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[v8,1/3] ACPI: Refactor get_acpi_id_for_cpu() to acpi_get_cpu_uid() on non-x86"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1324.78 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[v8,1/3] ACPI: Refactor get_acpi_id_for_cpu() to acpi_get_cpu_uid() on non-x86"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1943.07 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[v8,1/3] ACPI: Refactor get_acpi_id_for_cpu() to acpi_get_cpu_uid() on non-x86"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 26.87 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[v8,1/3] ACPI: Refactor get_acpi_id_for_cpu() to acpi_get_cpu_uid() on non-x86"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 28.01 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[v8,1/3] ACPI: Refactor get_acpi_id_for_cpu() to acpi_get_cpu_uid() on non-x86"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 3.73 seconds
Result: WARNING
Output:

WARNING: The commit message has 'stable@', perhaps it also needs a 'Fixes:' tag?

total: 0 errors, 1 warnings, 0 checks, 308 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit 91a01534bf5b ("ACPI: Refactor get_acpi_id_for_cpu() to acpi_get_cpu_uid() on non-x86") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 1 warnings, 0 checks, 308 lines checked
WARNING: The commit message has 'stable@', perhaps it also needs a 'Fixes:' tag?


@linux-riscv-bot
Copy link
Author

Patch 1: "[v8,1/3] ACPI: Refactor get_acpi_id_for_cpu() to acpi_get_cpu_uid() on non-x86"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 84.58 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[v8,1/3] ACPI: Refactor get_acpi_id_for_cpu() to acpi_get_cpu_uid() on non-x86"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[v8,1/3] ACPI: Refactor get_acpi_id_for_cpu() to acpi_get_cpu_uid() on non-x86"
kdoc
Desc: Detects for kdoc errors
Duration: 0.89 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[v8,1/3] ACPI: Refactor get_acpi_id_for_cpu() to acpi_get_cpu_uid() on non-x86"
module-param
Desc: Detect module_param changes
Duration: 0.52 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[v8,1/3] ACPI: Refactor get_acpi_id_for_cpu() to acpi_get_cpu_uid() on non-x86"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.51 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[v8,1/3] ACPI: Refactor get_acpi_id_for_cpu() to acpi_get_cpu_uid() on non-x86"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.29 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 2: "[v8,2/3] x86: Implement acpi_get_cpu_uid()"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 137.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 2: "[v8,2/3] x86: Implement acpi_get_cpu_uid()"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1322.03 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 2: "[v8,2/3] x86: Implement acpi_get_cpu_uid()"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1962.10 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 2: "[v8,2/3] x86: Implement acpi_get_cpu_uid()"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 26.91 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 2: "[v8,2/3] x86: Implement acpi_get_cpu_uid()"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 28.49 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 2: "[v8,2/3] x86: Implement acpi_get_cpu_uid()"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 2.49 seconds
Result: WARNING
Output:

WARNING: The commit message has 'stable@', perhaps it also needs a 'Fixes:' tag?

total: 0 errors, 1 warnings, 0 checks, 68 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit 84997404680e ("x86: Implement acpi_get_cpu_uid()") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 1 warnings, 0 checks, 68 lines checked
WARNING: The commit message has 'stable@', perhaps it also needs a 'Fixes:' tag?


@linux-riscv-bot
Copy link
Author

Patch 2: "[v8,2/3] x86: Implement acpi_get_cpu_uid()"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 84.37 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 2: "[v8,2/3] x86: Implement acpi_get_cpu_uid()"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 2: "[v8,2/3] x86: Implement acpi_get_cpu_uid()"
kdoc
Desc: Detects for kdoc errors
Duration: 0.89 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 2: "[v8,2/3] x86: Implement acpi_get_cpu_uid()"
module-param
Desc: Detect module_param changes
Duration: 0.28 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 2: "[v8,2/3] x86: Implement acpi_get_cpu_uid()"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 2: "[v8,2/3] x86: Implement acpi_get_cpu_uid()"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 3: "[v8,3/3] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 138.12 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 3: "[v8,3/3] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1156.58 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 3: "[v8,3/3] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1687.75 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 3: "[v8,3/3] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 27.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 3: "[v8,3/3] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 28.77 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 3: "[v8,3/3] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.31 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 3: "[v8,3/3] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 83.74 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 3: "[v8,3/3] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 3: "[v8,3/3] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform"
kdoc
Desc: Detects for kdoc errors
Duration: 0.89 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 3: "[v8,3/3] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 3: "[v8,3/3] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.27 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 3: "[v8,3/3] PCI/TPH: Fix get cpu steer-tag fail on ARM64 platform"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants