Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
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
Show 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 Matt Fleming <mjf@gentoo.org>
* Copyright (C) 2008 Paul Mundt <lethal@linux-sh.org>
*
*
* Code for replacing ftrace calls with jumps.
* Code for replacing ftrace calls with jumps.
*
*
...
@@ -100,6 +101,29 @@ int ftrace_update_ftrace_func(ftrace_func_t func)
...
@@ -100,6 +101,29 @@ int ftrace_update_ftrace_func(ftrace_func_t func)
return
ftrace_modify_code
(
ip
+
MCOUNT_INSN_OFFSET
,
old
,
new
);
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
)
int
__init
ftrace_dyn_arch_init
(
void
*
data
)
{
{
/* The return code is retured via 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