Skip to content

[PW_SID:1163154] riscv: runtime enablement for native misaligned ucopy - #2646

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

[PW_SID:1163154] riscv: runtime enablement for native misaligned ucopy#2646
linux-riscv-bot wants to merge 2 commits into
workflow__riscv__fixesfrom
pw1163154

Conversation

@linux-riscv-bot

Copy link
Copy Markdown

PR for series 1163154 applied to workflow__riscv__fixes

Name: riscv: runtime enablement for native misaligned ucopy
URL: https://patchwork.kernel.org/series/1163154/
Version: 1

This is the introductary patch for us to call the user copy that
supports fast unaligned access after the runtime detection.

Signed-off-by: Andy Chiu <tchiu@tenstorrent.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Skipping the software aligning code increases the ucopy bandwidth by up
to 11.4%. Commit b94cec5 ("riscv: skip software algning code for
HAVE_EFFICIENT_UNALIGNED_ACCESS") provides this optimization at compile
time, which depends on NONPORTABLE. This patch extends it such that the
optimization can be enabled at runtime, after the unaligned access speed
is resolved.

To do so, we utilize the assembly version of static key and connect it
to fast_unaligned_access_speed_key. The kernel jumps to the software
aligning code as the default behavior, then the jump is optimized to an
nop if the platform supports native misaligned access.

Signed-off-by: Andy Chiu <tchiu@tenstorrent.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
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