diff options
author | Steven Rostedt <srostedt@redhat.com> | 2008-11-14 20:47:03 -0800 |
---|---|---|
committer | Steven Rostedt <srostedt@redhat.com> | 2008-11-20 10:52:28 -0800 |
commit | f48cb8b48b0b10025ca9c451b9b32cac3fcd33ba (patch) | |
tree | e95f858bcf155d2000e57d2a6cda78dc0ffc791f /arch/powerpc/include/asm/module.h | |
parent | e4486fe316895e87672a563c4f36393218f84ff1 (diff) | |
download | talos-op-linux-f48cb8b48b0b10025ca9c451b9b32cac3fcd33ba.tar.gz talos-op-linux-f48cb8b48b0b10025ca9c451b9b32cac3fcd33ba.zip |
powerpc/ppc64: ftrace, handle module trampolines for dyn ftrace
Impact: Allow 64 bit PowerPC to trace modules with dynamic ftrace
This adds code to handle the PPC64 module trampolines, and allows for
PPC64 to use dynamic ftrace.
Thanks to Paul Mackerras for these updates:
- fix the mod and rec->arch.mod NULL checks.
- fix to is_bl_op compare.
Thanks to Milton Miller for:
- finding the nasty race with using two nops, and recommending
instead that I use a branch 8 forward.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'arch/powerpc/include/asm/module.h')
-rw-r--r-- | arch/powerpc/include/asm/module.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/module.h b/arch/powerpc/include/asm/module.h index e5f14b13ccf0..340bc699b620 100644 --- a/arch/powerpc/include/asm/module.h +++ b/arch/powerpc/include/asm/module.h @@ -34,6 +34,11 @@ struct mod_arch_specific { #ifdef __powerpc64__ unsigned int stubs_section; /* Index of stubs section in module */ unsigned int toc_section; /* What section is the TOC? */ +#ifdef CONFIG_DYNAMIC_FTRACE + unsigned long toc; + unsigned long tramp; +#endif + #else /* Indices of PLT sections within module. */ unsigned int core_plt_section; @@ -68,6 +73,12 @@ struct mod_arch_specific { # endif /* MODULE */ #endif +#ifdef CONFIG_DYNAMIC_FTRACE +# ifdef MODULE + asm(".section .ftrace.tramp,\"ax\",@nobits; .align 3; .previous"); +# endif /* MODULE */ +#endif + struct exception_table_entry; void sort_ex_table(struct exception_table_entry *start, |