Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
b5cfeac9
Commit
b5cfeac9
authored
Dec 08, 2008
by
Paul Mundt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sh: Provide ftrace_make_call()/ftrace_make_nop().
Signed-off-by:
Paul Mundt
<
lethal@linux-sh.org
>
parent
4bc3e719
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
arch/sh/kernel/ftrace.c
arch/sh/kernel/ftrace.c
+24
-0
No files found.
arch/sh/kernel/ftrace.c
View file @
b5cfeac9
/*
* Copyright (C) 2008 Matt Fleming <mjf@gentoo.org>
* Copyright (C) 2008 Paul Mundt <lethal@linux-sh.org>
*
* Code for replacing ftrace calls with jumps.
*
...
...
@@ -100,6 +101,29 @@ int ftrace_update_ftrace_func(ftrace_func_t func)
return
ftrace_modify_code
(
ip
+
MCOUNT_INSN_OFFSET
,
old
,
new
);
}
int
ftrace_make_nop
(
struct
module
*
mod
,
struct
dyn_ftrace
*
rec
,
unsigned
long
addr
)
{
unsigned
char
*
new
,
*
old
;
unsigned
long
ip
=
rec
->
ip
;
old
=
ftrace_call_replace
(
ip
,
addr
);
new
=
ftrace_nop_replace
();
return
ftrace_modify_code
(
rec
->
ip
,
old
,
new
);
}
int
ftrace_make_call
(
struct
dyn_ftrace
*
rec
,
unsigned
long
addr
)
{
unsigned
char
*
new
,
*
old
;
unsigned
long
ip
=
rec
->
ip
;
old
=
ftrace_nop_replace
();
new
=
ftrace_call_replace
(
ip
,
addr
);
return
ftrace_modify_code
(
rec
->
ip
,
old
,
new
);
}
int
__init
ftrace_dyn_arch_init
(
void
*
data
)
{
/* The return code is retured via data */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment