Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 138470
b: refs/heads/master
c: bb9b903
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt authored and Benjamin Herrenschmidt committed Feb 22, 2009
1 parent 75bbf6b commit 88baf2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 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: b54dcfe108b1b72c9d891dce1034aa5679c0d7db
refs/heads/master: bb9b903527eb16c8fdad59a562c29e89f5dcf233
14 changes: 1 addition & 13 deletions trunk/arch/powerpc/kernel/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@
#endif

#ifdef CONFIG_DYNAMIC_FTRACE
static unsigned int ftrace_calc_offset(long ip, long addr)
{
return (int)(addr - ip);
}

static unsigned int ftrace_nop_replace(void)
{
return PPC_NOP_INSTR;
Expand All @@ -46,17 +41,10 @@ ftrace_call_replace(unsigned long ip, unsigned long addr, int link)
{
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);

/* if (link) set op to 'bl' else 'b' */
op = 0x48000000 | (link ? 1 : 0);
op |= (ftrace_calc_offset(ip, addr) & 0x03fffffc);
op = create_branch((unsigned int *)ip, addr, link ? 1 : 0);

return op;
}
Expand Down

0 comments on commit 88baf2f

Please sign in to comment.