Skip to content

Commit

Permalink
Merge branch 'ppc/ftrace' of git://git.kernel.org/pub/scm/linux/kerne…
Browse files Browse the repository at this point in the history
…l/git/rostedt/linux-2.6-trace into tracing/powerpc
  • Loading branch information
Ingo Molnar committed Nov 23, 2008
2 parents ed31348 + 7cc45e6 commit 813b852
Show file tree
Hide file tree
Showing 6 changed files with 489 additions and 42 deletions.
14 changes: 13 additions & 1 deletion arch/powerpc/include/asm/ftrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,19 @@

#ifndef __ASSEMBLY__
extern void _mcount(void);
#endif

#ifdef CONFIG_DYNAMIC_FTRACE
static inline unsigned long ftrace_call_adjust(unsigned long addr)
{
/* reloction of mcount call site is the same as the address */
return addr;
}

struct dyn_arch_ftrace {
struct module *mod;
};
#endif /* CONFIG_DYNAMIC_FTRACE */
#endif /* __ASSEMBLY__ */

#endif

Expand Down
16 changes: 15 additions & 1 deletion arch/powerpc/include/asm/module.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,19 @@ 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? */
#else
#ifdef CONFIG_DYNAMIC_FTRACE
unsigned long toc;
unsigned long tramp;
#endif

#else /* powerpc64 */
/* Indices of PLT sections within module. */
unsigned int core_plt_section;
unsigned int init_plt_section;
#ifdef CONFIG_DYNAMIC_FTRACE
unsigned long tramp;
#endif
#endif /* powerpc64 */

/* List of BUG addresses, source line numbers and filenames */
struct list_head bug_list;
Expand Down Expand Up @@ -68,6 +76,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,
Expand Down
Loading

0 comments on commit 813b852

Please sign in to comment.