diff options
author | Abhishek Sagar <sagar.abhishek@gmail.com> | 2008-06-01 12:17:42 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-06-10 05:57:49 -0400 |
commit | 1d74f2a0f64b4091e5e91b55ac1b17dff93f4b59 (patch) | |
tree | 8777ee5d38cf27939687adf2dc3d2a9a5f60b33d /arch | |
parent | 0eb967012ea15e6e8cfab483d9fa37bc602d400c (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.c | 10 | ||||
-rw-r--r-- | arch/powerpc/kernel/ftrace.c | 10 | ||||
-rw-r--r-- | arch/sparc64/kernel/ftrace.c | 7 | ||||
-rw-r--r-- | arch/x86/kernel/ftrace.c | 10 |
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 @@ | |||
22 | static unsigned long bl_insn; | 22 | static unsigned long bl_insn; |
23 | static const unsigned long NOP = 0xe1a00000; /* mov r0, r0 */ | 23 | static const unsigned long NOP = 0xe1a00000; /* mov r0, r0 */ |
24 | 24 | ||
25 | /* return true if mcount call site is already patched/no-op'ed */ | ||
26 | int 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 | |||
35 | unsigned char *ftrace_nop_replace(void) | 25 | unsigned 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 | ||
30 | notrace 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 | |||
40 | static unsigned int notrace ftrace_calc_offset(long ip, long addr) | 30 | static 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 | ||
8 | static const u32 ftrace_nop = 0x01000000; | 8 | static const u32 ftrace_nop = 0x01000000; |
9 | 9 | ||
10 | notrace int ftrace_ip_converted(unsigned long ip) | ||
11 | { | ||
12 | u32 insn = *(u32 *) ip; | ||
13 | |||
14 | return (insn == ftrace_nop); | ||
15 | } | ||
16 | |||
17 | notrace unsigned char *ftrace_nop_replace(void) | 10 | notrace 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 | ||
34 | notrace 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 | |||
44 | static int notrace ftrace_calc_offset(long ip, long addr) | 34 | static int notrace ftrace_calc_offset(long ip, long addr) |
45 | { | 35 | { |
46 | return (int)(addr - ip); | 36 | return (int)(addr - ip); |