File tree 4 files changed +16
-8
lines changed
4 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 20
20
#ifndef __ASSEMBLY__
21
21
extern void _mcount (void );
22
22
23
- static inline unsigned long ftrace_call_adjust (unsigned long addr )
24
- {
25
- if (IS_ENABLED (CONFIG_ARCH_USING_PATCHABLE_FUNCTION_ENTRY ))
26
- addr += MCOUNT_INSN_SIZE ;
27
-
28
- return addr ;
29
- }
30
-
23
+ unsigned long ftrace_call_adjust (unsigned long addr );
31
24
unsigned long prepare_ftrace_return (unsigned long parent , unsigned long ip ,
32
25
unsigned long sp );
33
26
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ typedef struct func_desc func_desc_t;
14
14
15
15
extern char __head_end [];
16
16
extern char __srwx_boundary [];
17
+ extern char _sexittext [], _eexittext [];
17
18
18
19
/* Patch sites */
19
20
extern s32 patch__call_flush_branch_caches1 ;
Original file line number Diff line number Diff line change 27
27
#include <asm/ftrace.h>
28
28
#include <asm/syscall.h>
29
29
#include <asm/inst.h>
30
+ #include <asm/sections.h>
30
31
31
32
#define NUM_FTRACE_TRAMPS 2
32
33
static unsigned long ftrace_tramps [NUM_FTRACE_TRAMPS ];
33
34
35
+ unsigned long ftrace_call_adjust (unsigned long addr )
36
+ {
37
+ if (addr >= (unsigned long )_sexittext && addr < (unsigned long )_eexittext )
38
+ return 0 ;
39
+
40
+ if (IS_ENABLED (CONFIG_ARCH_USING_PATCHABLE_FUNCTION_ENTRY ))
41
+ addr += MCOUNT_INSN_SIZE ;
42
+
43
+ return addr ;
44
+ }
45
+
34
46
static ppc_inst_t ftrace_create_branch_inst (unsigned long ip , unsigned long addr , int link )
35
47
{
36
48
ppc_inst_t op ;
Original file line number Diff line number Diff line change @@ -281,7 +281,9 @@ SECTIONS
281
281
* to deal with references from __bug_table
282
282
*/
283
283
.exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) {
284
+ _sexittext = .;
284
285
EXIT_TEXT
286
+ _eexittext = .;
285
287
}
286
288
287
289
. = ALIGN(PAGE_SIZE);
You can’t perform that action at this time.
0 commit comments