mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-08-26 02:47:36 +00:00

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 <jesse@rivosinc.com> Reviewed-by: Charlie Jenkins <charlie@rivosinc.com> Link: https://lore.kernel.org/r/20241017-jesse_unaligned_vector-v10-5-5b33500160f8@rivosinc.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
19 lines
603 B
C
19 lines
603 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (C) 2023 Rivos, Inc.
|
|
*/
|
|
#ifndef __RISCV_KERNEL_COPY_UNALIGNED_H
|
|
#define __RISCV_KERNEL_COPY_UNALIGNED_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
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 */
|