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
5852b203
Commit
5852b203
authored
Oct 13, 2009
by
Paul Mundt
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'sh/stable-updates'
parents
913df445
99222622
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
10 deletions
+27
-10
arch/sh/kernel/ftrace.c
arch/sh/kernel/ftrace.c
+27
-10
No files found.
arch/sh/kernel/ftrace.c
View file @
5852b203
...
...
@@ -291,31 +291,48 @@ struct syscall_metadata *syscall_nr_to_meta(int nr)
return
syscalls_metadata
[
nr
];
}
void
arch_init_ftrace_syscalls
(
void
)
int
syscall_name_to_nr
(
char
*
name
)
{
int
i
;
if
(
!
syscalls_metadata
)
return
-
1
;
for
(
i
=
0
;
i
<
NR_syscalls
;
i
++
)
if
(
syscalls_metadata
[
i
])
if
(
!
strcmp
(
syscalls_metadata
[
i
]
->
name
,
name
))
return
i
;
return
-
1
;
}
void
set_syscall_enter_id
(
int
num
,
int
id
)
{
syscalls_metadata
[
num
]
->
enter_id
=
id
;
}
void
set_syscall_exit_id
(
int
num
,
int
id
)
{
syscalls_metadata
[
num
]
->
exit_id
=
id
;
}
static
int
__init
arch_init_ftrace_syscalls
(
void
)
{
int
i
;
struct
syscall_metadata
*
meta
;
unsigned
long
**
psys_syscall_table
=
&
sys_call_table
;
static
atomic_t
refs
;
if
(
atomic_inc_return
(
&
refs
)
!=
1
)
goto
end
;
syscalls_metadata
=
kzalloc
(
sizeof
(
*
syscalls_metadata
)
*
FTRACE_SYSCALL_MAX
,
GFP_KERNEL
);
if
(
!
syscalls_metadata
)
{
WARN_ON
(
1
);
return
;
return
-
ENOMEM
;
}
for
(
i
=
0
;
i
<
FTRACE_SYSCALL_MAX
;
i
++
)
{
meta
=
find_syscall_meta
(
psys_syscall_table
[
i
]);
syscalls_metadata
[
i
]
=
meta
;
}
return
;
/* Paranoid: avoid overflow */
end:
atomic_dec
(
&
refs
);
return
0
;
}
arch_initcall
(
arch_init_ftrace_syscalls
);
#endif
/* CONFIG_FTRACE_SYSCALLS */
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