summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc
diff options
context:
space:
mode:
authorKarl Mehltretter <kmehltretter@gmail.com>2026-09-07 21:07:50 +0200
committerPaul Walmsley <pjw@kernel.org>2026-10-07 20:25:09 -0600
commitd4f25b097e46d82718bb737d4540c99b7ab0a408 (patch)
treeee23f6e2a965d27bb52ccbeb8ee1d2fd84b8f1f7 /tools/lib/python/kdoc
parent4d0697f192975dab5985e921989be1d85cf580e9 (diff)
downloadlinux-next-d4f25b097e46d82718bb737d4540c99b7ab0a408.tar.gz
linux-next-d4f25b097e46d82718bb737d4540c99b7ab0a408.zip
riscv: fix load_unaligned_zeropad() fixup for RV32
The fixup for load_unaligned_zeropad() runs when REG_L crosses into an unmapped page. REG_L is lw on RV32 and ld on RV64, but the fixup assumes an 8-byte load: it rounds the address down to 8 bytes and derives the shift from three address bits. On RV32, a load starting in the last three bytes of a mapped page selects the word four bytes earlier and shifts it by 40, 48, or 56 bits, more than the register width. The caller gets earlier bytes instead of the string tail followed by zeroes. This affects RV32 MMU kernels built with RISCV_EFFICIENT_UNALIGNED_ACCESS=y, which selects DCACHE_WORD_ACCESS and lets dcache name hashing and comparison and strscpy() use this path. Derive the alignment and offset masks from sizeof(data) instead of a fixed 8. This makes RV32 use the correct source word. RV64 code is unchanged: the complete extable.o is byte-for-byte identical before and after. Fixes: d0fdc20b0429 ("riscv: select DCACHE_WORD_ACCESS for efficient unaligned access HW") Cc: stable@vger.kernel.org Assisted-by: LLM Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com> Reviewed-by: Jisheng Zhang <jszhang@kernel.org> Link: https://patch.msgid.link/20260907190750.26303-1-kmehltretter@gmail.com Signed-off-by: Paul Walmsley <pjw@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc')
0 files changed, 0 insertions, 0 deletions