Skip to content

[PW_SID:1102480] riscv: Some misaligned cleanups#2031

Open
linux-riscv-bot wants to merge 2 commits into
workflow__riscv__fixesfrom
pw1102480
Open

[PW_SID:1102480] riscv: Some misaligned cleanups#2031
linux-riscv-bot wants to merge 2 commits into
workflow__riscv__fixesfrom
pw1102480

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

PR for series 1102480 applied to workflow__riscv__fixes

Name: riscv: Some misaligned cleanups
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1102480
Version: 1

covanam added 2 commits May 28, 2026 22:25
When booting with unaligned_scalar_speed=fast,
fast_unaligned_access_speed_key is initialized incorrectly.

The key is currently derived from the fast_misaligned_access cpumask, but
that mask is only populated when the unaligned access speed probe runs.
Specifying unaligned_scalar_speed=fast skips the probe entirely, leaving
the mask uninitialized.

The information tracked by fast_misaligned_access is already available in
the misaligned_access_speed per-CPU variable. Use that to initialize
fast_unaligned_access_speed_key instead and remove the redundant cpumask.

Signed-off-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
When a CPU is taken offline and then is brought back online, unaligned
access speed probe always runs even though the unaligned access speed is
already known, wasting CPU cycles.

This is because when a CPU becomes online, the following happen:

  1. check_unaligned_access_emulated() is called, which clears
     misaligned_access_speed if there is no emulation.

  2. check_unaligned_access() is called because misaligned_access_speed is
     cleared, wasting CPU cycles determining something already previous
     known.

Avoid the redundant access speed probe by stop clearing
misaligned_access_speed in (1). If access speed is already known, just
reuse it.

On my Visionfive 2, this reduces CPU bring-up time from 26ms to 0.8ms.

Signed-off-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: misaligned: Fix fast_unaligned_access_speed_key init"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 114.05 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: misaligned: Fix fast_unaligned_access_speed_key init"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1125.84 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: misaligned: Fix fast_unaligned_access_speed_key init"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1640.27 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: misaligned: Fix fast_unaligned_access_speed_key init"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 19.54 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: misaligned: Fix fast_unaligned_access_speed_key init"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 20.73 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: misaligned: Fix fast_unaligned_access_speed_key init"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.63 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: misaligned: Fix fast_unaligned_access_speed_key init"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 75.95 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: misaligned: Fix fast_unaligned_access_speed_key init"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: misaligned: Fix fast_unaligned_access_speed_key init"
kdoc
Desc: Detects for kdoc errors
Duration: 0.69 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: misaligned: Fix fast_unaligned_access_speed_key init"
module-param
Desc: Detect module_param changes
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: misaligned: Fix fast_unaligned_access_speed_key init"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: misaligned: Fix fast_unaligned_access_speed_key init"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: traps_misaligned: Avoid redundant unaligned access speed probe"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 117.60 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: traps_misaligned: Avoid redundant unaligned access speed probe"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1115.39 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: traps_misaligned: Avoid redundant unaligned access speed probe"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1644.70 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: traps_misaligned: Avoid redundant unaligned access speed probe"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 19.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: traps_misaligned: Avoid redundant unaligned access speed probe"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 20.92 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: traps_misaligned: Avoid redundant unaligned access speed probe"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.61 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: traps_misaligned: Avoid redundant unaligned access speed probe"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 76.54 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: traps_misaligned: Avoid redundant unaligned access speed probe"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: traps_misaligned: Avoid redundant unaligned access speed probe"
kdoc
Desc: Detects for kdoc errors
Duration: 0.69 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: traps_misaligned: Avoid redundant unaligned access speed probe"
module-param
Desc: Detect module_param changes
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: traps_misaligned: Avoid redundant unaligned access speed probe"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: traps_misaligned: Avoid redundant unaligned access speed probe"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.26 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