powerpc/ppc64: ftrace, handle module trampolines for dyn ftrace
[safe/jmp/linux-2.6] / arch / powerpc / include / asm / module.h
index e5f14b1..340bc69 100644 (file)
@@ -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,