Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100561
b: refs/heads/master
c: ccbfac2
h: refs/heads/master
i:
  100559: a2cba0c
v: v3
  • Loading branch information
Steven Rostedt authored and Thomas Gleixner committed May 26, 2008
1 parent 0b75440 commit 27b2013
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 41bc8144d02028133bcd1d545023c6f49e8b2411
refs/heads/master: ccbfac2923c9febaeaf07a50054027a92b502718
11 changes: 2 additions & 9 deletions trunk/arch/powerpc/kernel/entry_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -1129,18 +1129,11 @@ _GLOBAL(_mcount)
stw r5, 8(r1)

LOAD_REG_ADDR(r5, ftrace_trace_function)
#if 0
mtctr r3
mr r1, r5
bctrl
#endif
lwz r5,0(r5)
#if 1

mtctr r5
bctrl
#else
bl ftrace_stub
#endif

nop

lwz r6, 8(r1)
Expand Down
8 changes: 7 additions & 1 deletion trunk/arch/powerpc/kernel/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,16 @@ notrace unsigned char *ftrace_call_replace(unsigned long ip, unsigned long addr)
{
static unsigned int op;

/*
* It would be nice to just use create_function_call, but that will
* update the code itself. Here we need to just return the
* instruction that is going to be modified, without modifying the
* code.
*/
addr = GET_ADDR(addr);

/* Set to "bl addr" */
op = 0x48000001 | (ftrace_calc_offset(ip, addr) & 0x03fffffe);
op = 0x48000001 | (ftrace_calc_offset(ip, addr) & 0x03fffffc);

/*
* No locking needed, this must be called via kstop_machine
Expand Down
5 changes: 5 additions & 0 deletions trunk/arch/powerpc/kernel/ppc_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include <asm/div64.h>
#include <asm/signal.h>
#include <asm/dcr.h>
#include <asm/ftrace.h>

#ifdef CONFIG_PPC32
extern void transfer_to_handler(void);
Expand All @@ -68,6 +69,10 @@ EXPORT_SYMBOL(single_step_exception);
EXPORT_SYMBOL(sys_sigreturn);
#endif

#ifdef CONFIG_FTRACE
EXPORT_SYMBOL(_mcount);
#endif

EXPORT_SYMBOL(strcpy);
EXPORT_SYMBOL(strncpy);
EXPORT_SYMBOL(strcat);
Expand Down
5 changes: 0 additions & 5 deletions trunk/arch/powerpc/kernel/setup_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@
#include <asm/kgdb.h>
#endif

#ifdef CONFIG_FTRACE
extern void _mcount(void);
EXPORT_SYMBOL(_mcount);
#endif

extern void bootx_init(unsigned long r4, unsigned long phys);

int boot_cpuid;
Expand Down
5 changes: 0 additions & 5 deletions trunk/arch/powerpc/kernel/setup_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,6 @@ struct ppc64_caches ppc64_caches = {
};
EXPORT_SYMBOL_GPL(ppc64_caches);

#ifdef CONFIG_FTRACE
extern void _mcount(void);
EXPORT_SYMBOL(_mcount);
#endif

/*
* These are used in binfmt_elf.c to put aux entries on the stack
* for each elf executable being started.
Expand Down
6 changes: 6 additions & 0 deletions trunk/include/asm-powerpc/ftrace.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef _ASM_POWERPC_FTRACE
#define _ASM_POWERPC_FTRACE

extern void _mcount(void);

#endif

0 comments on commit 27b2013

Please sign in to comment.