File tree 5 files changed +22
-8
lines changed
5 files changed +22
-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
-
31
23
unsigned long prepare_ftrace_return (unsigned long parent , unsigned long ip ,
32
24
unsigned long sp );
33
25
@@ -142,8 +134,10 @@ static inline u8 this_cpu_get_ftrace_enabled(void) { return 1; }
142
134
#ifdef CONFIG_FUNCTION_TRACER
143
135
extern unsigned int ftrace_tramp_text [], ftrace_tramp_init [];
144
136
void ftrace_free_init_tramp (void );
137
+ unsigned long ftrace_call_adjust (unsigned long addr );
145
138
#else
146
139
static inline void ftrace_free_init_tramp (void ) { }
140
+ static inline unsigned long ftrace_call_adjust (unsigned long addr ) { return addr ; }
147
141
#endif
148
142
#endif /* !__ASSEMBLY__ */
149
143
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 __exittext_begin [], __exittext_end [];
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 )__exittext_begin && addr < (unsigned long )__exittext_end )
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 37
37
#define NUM_FTRACE_TRAMPS 8
38
38
static unsigned long ftrace_tramps [NUM_FTRACE_TRAMPS ];
39
39
40
+ unsigned long ftrace_call_adjust (unsigned long addr )
41
+ {
42
+ return addr ;
43
+ }
44
+
40
45
static ppc_inst_t
41
46
ftrace_call_replace (unsigned long ip , unsigned long addr , int link )
42
47
{
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
+ __exittext_begin = .;
284
285
EXIT_TEXT
286
+ __exittext_end = .;
285
287
}
286
288
287
289
. = ALIGN(PAGE_SIZE);
You can’t perform that action at this time.
0 commit comments