mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 05:31:15 +00:00
tracing/syscalls: Make arch_syscall_addr weak
Some architectures use non-trivial system call tables and will not work with the generic arch_syscall_addr code. For example, PowerPC64 uses a table of twin long longs. This patch makes the generic arch_syscall_addr weak to allow architectures with non-trivial system call tables to override it. Signed-off-by: Ian Munsie <imunsie@au1.ibm.com> LKML-Reference: <1296703645-18718-4-git-send-email-imunsie@au1.ibm.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
parent
3773b389b6
commit
c763ba06bd
2 changed files with 4 additions and 1 deletions
|
@ -247,6 +247,9 @@ You need very few things to get the syscalls tracing in an arch.
|
||||||
- Support the TIF_SYSCALL_TRACEPOINT thread flags.
|
- Support the TIF_SYSCALL_TRACEPOINT thread flags.
|
||||||
- Put the trace_sys_enter() and trace_sys_exit() tracepoints calls from ptrace
|
- Put the trace_sys_enter() and trace_sys_exit() tracepoints calls from ptrace
|
||||||
in the ptrace syscalls tracing path.
|
in the ptrace syscalls tracing path.
|
||||||
|
- If the system call table on this arch is more complicated than a simple array
|
||||||
|
of addresses of the system calls, implement an arch_syscall_addr to return
|
||||||
|
the address of a given system call.
|
||||||
- Tag this arch as HAVE_SYSCALL_TRACEPOINTS.
|
- Tag this arch as HAVE_SYSCALL_TRACEPOINTS.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -446,7 +446,7 @@ int init_syscall_trace(struct ftrace_event_call *call)
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long __init arch_syscall_addr(int nr)
|
unsigned long __init __weak arch_syscall_addr(int nr)
|
||||||
{
|
{
|
||||||
return (unsigned long)sys_call_table[nr];
|
return (unsigned long)sys_call_table[nr];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue