aboutsummaryrefslogtreecommitdiff
path: root/arch/riscv/kernel/copy-unaligned.h
diff options
context:
space:
mode:
authorJesse Taube <[email protected]>2024-10-17 12:00:22 -0700
committerPalmer Dabbelt <[email protected]>2024-10-18 12:38:34 -0700
commite7c9d66e313bc0f7cb185c4972c3c9383a0da70f (patch)
treebba7ec456197fa9ee5bc9aabb6e78b97180f83d6 /arch/riscv/kernel/copy-unaligned.h
parentd1703dc7bc8ec7adb91f5ceaf1556ff1ed212858 (diff)
RISC-V: Report vector unaligned access speed hwprobe
Detect if vector misaligned accesses are faster or slower than equivalent vector byte accesses. This is useful for usermode to know whether vector byte accesses or vector misaligned accesses have a better bandwidth for operations like memcpy. Signed-off-by: Jesse Taube <[email protected]> Reviewed-by: Charlie Jenkins <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
Diffstat (limited to 'arch/riscv/kernel/copy-unaligned.h')
-rw-r--r--arch/riscv/kernel/copy-unaligned.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/riscv/kernel/copy-unaligned.h b/arch/riscv/kernel/copy-unaligned.h
index e3d70d35b708..85d4d11450cb 100644
--- a/arch/riscv/kernel/copy-unaligned.h
+++ b/arch/riscv/kernel/copy-unaligned.h
@@ -10,4 +10,9 @@
void __riscv_copy_words_unaligned(void *dst, const void *src, size_t size);
void __riscv_copy_bytes_unaligned(void *dst, const void *src, size_t size);
+#ifdef CONFIG_RISCV_PROBE_VECTOR_UNALIGNED_ACCESS
+void __riscv_copy_vec_words_unaligned(void *dst, const void *src, size_t size);
+void __riscv_copy_vec_bytes_unaligned(void *dst, const void *src, size_t size);
+#endif
+
#endif /* __RISCV_KERNEL_COPY_UNALIGNED_H */