diff options
author | Palmer Dabbelt <palmerdabbelt@google.com> | 2020-08-24 17:21:22 -0700 |
---|---|---|
committer | Palmer Dabbelt <palmerdabbelt@google.com> | 2020-09-11 12:15:21 -0700 |
commit | 66d18dbda8469a944dfec6c49d26d5946efba218 (patch) | |
tree | 85f71e6b0e4ee323d508fb1ba1bb19a74e8c47a9 /arch/riscv/include | |
parent | d012a7190fc1fd72ed48911e77ca97ba4521bccd (diff) | |
download | linux-66d18dbda8469a944dfec6c49d26d5946efba218.tar.gz linux-66d18dbda8469a944dfec6c49d26d5946efba218.tar.bz2 linux-66d18dbda8469a944dfec6c49d26d5946efba218.zip |
RISC-V: Take text_mutex in ftrace_init_nop()
Without this we get lockdep failures. They're spurious failures as SMP isn't
up when ftrace_init_nop() is called. As far as I can tell the easiest fix is
to just take the lock, which also seems like the safest fix.
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Acked-by: Guo Ren <guoren@kernel.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'arch/riscv/include')
-rw-r--r-- | arch/riscv/include/asm/ftrace.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/ftrace.h b/arch/riscv/include/asm/ftrace.h index ace8a6e2d11d..845002cc2e57 100644 --- a/arch/riscv/include/asm/ftrace.h +++ b/arch/riscv/include/asm/ftrace.h @@ -66,6 +66,13 @@ do { \ * Let auipc+jalr be the basic *mcount unit*, so we make it 8 bytes here. */ #define MCOUNT_INSN_SIZE 8 + +#ifndef __ASSEMBLY__ +struct dyn_ftrace; +int ftrace_init_nop(struct module *mod, struct dyn_ftrace *rec); +#define ftrace_init_nop ftrace_init_nop +#endif + #endif #endif /* _ASM_RISCV_FTRACE_H */ |