aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAbhishek Sagar <sagar.abhishek@gmail.com>2008-06-01 12:17:42 -0400
committerIngo Molnar <mingo@elte.hu>2008-06-10 05:57:49 -0400
commit1d74f2a0f64b4091e5e91b55ac1b17dff93f4b59 (patch)
tree8777ee5d38cf27939687adf2dc3d2a9a5f60b33d /arch
parent0eb967012ea15e6e8cfab483d9fa37bc602d400c (diff)
ftrace: remove ftrace_ip_converted()
Remove the unneeded function ftrace_ip_converted(). Signed-off-by: Abhishek Sagar <sagar.abhishek@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/kernel/ftrace.c10
-rw-r--r--arch/powerpc/kernel/ftrace.c10
-rw-r--r--arch/sparc64/kernel/ftrace.c7
-rw-r--r--arch/x86/kernel/ftrace.c10
4 files changed, 0 insertions, 37 deletions
diff --git a/arch/arm/kernel/ftrace.c b/arch/arm/kernel/ftrace.c
index f4cb4cc3fa0c..22f3d6e309f9 100644
--- a/arch/arm/kernel/ftrace.c
+++ b/arch/arm/kernel/ftrace.c
@@ -22,16 +22,6 @@
22static unsigned long bl_insn; 22static unsigned long bl_insn;
23static const unsigned long NOP = 0xe1a00000; /* mov r0, r0 */ 23static const unsigned long NOP = 0xe1a00000; /* mov r0, r0 */
24 24
25/* return true if mcount call site is already patched/no-op'ed */
26int ftrace_ip_converted(unsigned long pc)
27{
28 unsigned long save;
29
30 pc -= INSN_SIZE;
31 save = *(unsigned long *)pc;
32 return save == NOP;
33}
34
35unsigned char *ftrace_nop_replace(void) 25unsigned char *ftrace_nop_replace(void)
36{ 26{
37 return (char *)&NOP; 27 return (char *)&NOP;
diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c
index 69ed41223468..e12c593ab9ca 100644
--- a/arch/powerpc/kernel/ftrace.c
+++ b/arch/powerpc/kernel/ftrace.c
@@ -27,16 +27,6 @@ static unsigned int ftrace_nop = 0x60000000;
27# define GET_ADDR(addr) *(unsigned long *)addr 27# define GET_ADDR(addr) *(unsigned long *)addr
28#endif 28#endif
29 29
30notrace int ftrace_ip_converted(unsigned long ip)
31{
32 unsigned int save;
33
34 ip -= CALL_BACK;
35 save = *(unsigned int *)ip;
36
37 return save == ftrace_nop;
38}
39
40static unsigned int notrace ftrace_calc_offset(long ip, long addr) 30static unsigned int notrace ftrace_calc_offset(long ip, long addr)
41{ 31{
42 return (int)((addr + CALL_BACK) - ip); 32 return (int)((addr + CALL_BACK) - ip);
diff --git a/arch/sparc64/kernel/ftrace.c b/arch/sparc64/kernel/ftrace.c
index f449e6df6c4a..c17373195b1e 100644
--- a/arch/sparc64/kernel/ftrace.c
+++ b/arch/sparc64/kernel/ftrace.c
@@ -7,13 +7,6 @@
7 7
8static const u32 ftrace_nop = 0x01000000; 8static const u32 ftrace_nop = 0x01000000;
9 9
10notrace int ftrace_ip_converted(unsigned long ip)
11{
12 u32 insn = *(u32 *) ip;
13
14 return (insn == ftrace_nop);
15}
16
17notrace unsigned char *ftrace_nop_replace(void) 10notrace unsigned char *ftrace_nop_replace(void)
18{ 11{
19 return (char *)&ftrace_nop; 12 return (char *)&ftrace_nop;
diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
index 498608c015fb..bc5cf8d46742 100644
--- a/arch/x86/kernel/ftrace.c
+++ b/arch/x86/kernel/ftrace.c
@@ -31,16 +31,6 @@ union ftrace_code_union {
31 } __attribute__((packed)); 31 } __attribute__((packed));
32}; 32};
33 33
34notrace int ftrace_ip_converted(unsigned long ip)
35{
36 unsigned long save;
37
38 ip -= CALL_BACK;
39 save = *(long *)ip;
40
41 return save == *ftrace_nop;
42}
43
44static int notrace ftrace_calc_offset(long ip, long addr) 34static int notrace ftrace_calc_offset(long ip, long addr)
45{ 35{
46 return (int)(addr - ip); 36 return (int)(addr - ip);