mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
51781ce8f4
patch_text_nosync() already handles an arbitrary length of code, so this removes a superfluous loop and reduces the number of icache flushes. Reviewed-by: Björn Töpel <bjorn@rivosinc.com> Signed-off-by: Samuel Holland <samuel.holland@sifive.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20240327160520.791322-6-samuel.holland@sifive.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
17 lines
449 B
C
17 lines
449 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (C) 2020 SiFive
|
|
*/
|
|
|
|
#ifndef _ASM_RISCV_PATCH_H
|
|
#define _ASM_RISCV_PATCH_H
|
|
|
|
int patch_insn_write(void *addr, const void *insn, size_t len);
|
|
int patch_text_nosync(void *addr, const void *insns, size_t len);
|
|
int patch_text_set_nosync(void *addr, u8 c, size_t len);
|
|
int patch_text(void *addr, u32 *insns, size_t len);
|
|
|
|
extern int riscv_patch_in_stop_machine;
|
|
|
|
#endif /* _ASM_RISCV_PATCH_H */
|