mirror of
https://github.com/torvalds/linux.git
synced 2026-11-28 01:13:11 +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 <[email protected]> Reviewed-by: Charlie Jenkins <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
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 */
|