blob: 924af13f85557bd0e7790d1282ea701fc0a6ca9d [file] [log] [blame]
David Brazdil0f672f62019-12-10 10:32:29 +00001/* SPDX-License-Identifier: GPL-2.0-only */
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00002/*
3 * Copyright (C) 2013 Regents of the University of California
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00004 */
5
6#ifndef _ASM_RISCV_STRING_H
7#define _ASM_RISCV_STRING_H
8
9#include <linux/types.h>
10#include <linux/linkage.h>
11
12#define __HAVE_ARCH_MEMSET
13extern asmlinkage void *memset(void *, int, size_t);
Olivier Deprez157378f2022-04-04 15:47:50 +020014extern asmlinkage void *__memset(void *, int, size_t);
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000015
16#define __HAVE_ARCH_MEMCPY
17extern asmlinkage void *memcpy(void *, const void *, size_t);
Olivier Deprez157378f2022-04-04 15:47:50 +020018extern asmlinkage void *__memcpy(void *, const void *, size_t);
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000019
Olivier Deprez157378f2022-04-04 15:47:50 +020020/* For those files which don't want to check by kasan. */
21#if defined(CONFIG_KASAN) && !defined(__SANITIZE_ADDRESS__)
22
23#define memcpy(dst, src, len) __memcpy(dst, src, len)
24#define memset(s, c, n) __memset(s, c, n)
25
26#endif
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000027#endif /* _ASM_RISCV_STRING_H */