Skip to contentSkip to conversation

Fix the __riscv_copy_vec_words_unaligned implementation

PATCH Applied Tingbo Liao 3 participants 3 messages Feb 27, 2025 – Mar 27, 2025 RISC-V

v1 of 2 Applied 1/1 Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix the __riscv_copy_vec_words_unaligned implementation

Correct the VEC_S macro definition to fix the implementation of vector words copy in the case of unalignment in RISC-V.

---
 arch/riscv/kernel/vec-copy-unaligned.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/kernel/vec-copy-unaligned.S +1 -1
index d16f19f1b3b6..7ce4de6f6e69 100644
@@ -11,7 +11,7 @@
 
 #define WORD_SEW CONCATENATE(e, WORD_EEW)
 #define VEC_L CONCATENATE(vle, WORD_EEW).v
-#define VEC_S CONCATENATE(vle, WORD_EEW).v
+#define VEC_S CONCATENATE(vse, WORD_EEW).v
 
 /* void __riscv_copy_vec_words_unaligned(void *, const void *, size_t) */
 /* Performs a memcpy without aligning buffers, using word loads and stores. */
Signature · 1 line
2.46.0
reviewer Reviewed-by on v1 1/1
#1 lore raw

Hi Tingbo,

Quoted 13 lines · Tingbo Liao

Correct the VEC_S macro definition to fix the implementation of vector words copy in the case of unalignment in RISC-V.

---
  arch/riscv/kernel/vec-copy-unaligned.S | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/kernel/vec-copy-unaligned.S +0 -0
index d16f19f1b3b6..7ce4de6f6e69 100644

arch/riscv/kernel/vec-copy-unaligned.S line 17

Quoted 8 lines
arch/riscv/kernel/vec-copy-unaligned.S +1 -1
@@ -11,7 +11,7 @@
 
  #define WORD_SEW CONCATENATE(e, WORD_EEW)
  #define VEC_L CONCATENATE(vle, WORD_EEW).v
-#define VEC_S CONCATENATE(vle, WORD_EEW).v
+#define VEC_S CONCATENATE(vse, WORD_EEW).v
 
  /* void __riscv_copy_vec_words_unaligned(void *, const void *, size_t) */
  /* Performs a memcpy without aligning buffers, using word loads and stores. */

That's a good catch, thanks.

However, your patch title should be prefixed with "riscv:" :

"[PATCH] riscv: Fix the __riscv_copy_vec_words_unaligned implementation"

And you miss the following Fixes tag:

Fixes e7c9d66e313b ("RISC-V: Report vector unaligned access speed hwprobe")

And then you can add:

Can you respin a v2 with all those modifications please?

Thanks,

Alex

#2 lore raw
In reply to Tingbo Liao
This patch was applied to riscv/linux.git (for-next) by Alexandre Ghiti <[email protected]>:

Hello:

This patch was applied to riscv/linux.git (for-next) by Alexandre Ghiti <[email protected]>:

Quoted 7 lines · On Wed, 26 Feb 2025 23:27:21 -0800 you wrote:

Correct the VEC_S macro definition to fix the implementation of vector words copy in the case of unalignment in RISC-V.

---
 arch/riscv/kernel/vec-copy-unaligned.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
- Fix the __riscv_copy_vec_words_unaligned implementation

    https://git.kernel.org/riscv/c/475afa39b123

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html