2020-03-10 00:55:43 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
|
|
/*
|
|
|
|
* Copyright (C) 2020 SiFive
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _ASM_RISCV_PATCH_H
|
|
|
|
#define _ASM_RISCV_PATCH_H
|
|
|
|
|
2024-02-29 20:10:56 +08:00
|
|
|
int patch_insn_write(void *addr, const void *insn, size_t len);
|
2020-04-21 15:29:59 +08:00
|
|
|
int patch_text_nosync(void *addr, const void *insns, size_t len);
|
2023-08-31 21:12:28 +08:00
|
|
|
int patch_text_set_nosync(void *addr, u8 c, size_t len);
|
2024-03-28 00:04:44 +08:00
|
|
|
int patch_text(void *addr, u32 *insns, size_t len);
|
2020-03-10 00:55:43 +08:00
|
|
|
|
2023-03-03 22:37:55 +08:00
|
|
|
extern int riscv_patch_in_stop_machine;
|
|
|
|
|
2020-03-10 00:55:43 +08:00
|
|
|
#endif /* _ASM_RISCV_PATCH_H */
|