public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ian Munsie <imunsie@au1.ibm.com>
Subject: [PATCH 03/10] tracing/syscalls: Make arch_syscall_addr weak
Date: Tue, 08 Feb 2011 17:16:15 -0500	[thread overview]
Message-ID: <20110208221719.564787820@goodmis.org> (raw)
In-Reply-To: 20110208221612.084294240@goodmis.org

[-- Attachment #1: 0003-tracing-syscalls-Make-arch_syscall_addr-weak.patch --]
[-- Type: text/plain, Size: 1815 bytes --]

From: Ian Munsie <imunsie@au1.ibm.com>

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>
---
 Documentation/trace/ftrace-design.txt |    3 +++
 kernel/trace/trace_syscalls.c         |    2 +-
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/Documentation/trace/ftrace-design.txt b/Documentation/trace/ftrace-design.txt
index dc52bd4..6fca17b 100644
--- a/Documentation/trace/ftrace-design.txt
+++ b/Documentation/trace/ftrace-design.txt
@@ -247,6 +247,9 @@ You need very few things to get the syscalls tracing in an arch.
 - Support the TIF_SYSCALL_TRACEPOINT thread flags.
 - Put the trace_sys_enter() and trace_sys_exit() tracepoints calls from ptrace
   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.
 
 
diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c
index 4230942..af83154 100644
--- a/kernel/trace/trace_syscalls.c
+++ b/kernel/trace/trace_syscalls.c
@@ -446,7 +446,7 @@ int init_syscall_trace(struct ftrace_event_call *call)
 	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];
 }
-- 
1.7.2.3



  parent reply	other threads:[~2011-02-08 22:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-08 22:16 [PATCH 00/10] [GIT PULL][v2.6.39] tracing: updates Steven Rostedt
2011-02-08 22:16 ` [PATCH 01/10] tracing/syscalls: Dont add events for unmapped syscalls Steven Rostedt
2011-02-08 22:16 ` [PATCH 02/10] tracing/syscalls: Convert redundant syscall_nr checks into WARN_ON Steven Rostedt
2011-02-08 22:16 ` Steven Rostedt [this message]
2011-02-08 22:16 ` [PATCH 04/10] tracing/syscalls: Allow arch specific syscall symbol matching Steven Rostedt
2011-02-08 22:16 ` [PATCH 05/10] tracing/syscalls: Early terminate search for sys_ni_syscall Steven Rostedt
2011-02-08 22:16 ` [PATCH 06/10] tracing: Add unstable sched clock note to the warning Steven Rostedt
2011-02-08 22:16 ` [PATCH 07/10] trivial: Fix Stevens Copyright typos Steven Rostedt
2011-02-08 22:16 ` [PATCH 08/10] tracing: Compile time initialization for event flags value Steven Rostedt
2011-02-08 22:16 ` [PATCH 09/10] tracing: Remove obsolete sched_switch tracer Steven Rostedt
2011-02-14 19:42   ` Steven Rostedt
2011-02-08 22:16 ` [PATCH 10/10] tracing: Deprecate tracing_enabled for tracing_on Steven Rostedt
2011-02-17 13:50 ` [PATCH 00/10] [GIT PULL][v2.6.39] tracing: updates Ingo Molnar
2011-02-17 14:04   ` Ingo Molnar
2011-02-17 14:55     ` Ingo Molnar
2011-02-17 15:03     ` Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110208221719.564787820@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=fweisbec@gmail.com \
    --cc=imunsie@au1.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox