[ltt-dev] [PATCH 5/5] sh: spare fixes for LTTng
Giuseppe CAVALLARO
peppe.cavallaro at st.com
Thu Jul 30 05:54:49 EDT 2009
This patch fixes some missed include headers and DEFINE_TRACE
for SH code.
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro at st.com>
---
arch/sh/kernel/ptrace_32.c | 4 ++++
arch/sh/kernel/ptrace_64.c | 4 ++++
arch/sh/kernel/sys_sh.c | 5 +++--
arch/sh/kernel/traps_32.c | 6 ++----
arch/sh/mm/fault_32.c | 14 ++++++--------
5 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c
index b71d0e7..1835fd1 100644
--- a/arch/sh/kernel/ptrace_32.c
+++ b/arch/sh/kernel/ptrace_32.c
@@ -26,6 +26,7 @@
#include <linux/tracehook.h>
#include <linux/elf.h>
#include <linux/regset.h>
+#include <trace/syscall.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
#include <asm/system.h>
@@ -34,6 +35,9 @@
#include <asm/syscalls.h>
#include <asm/fpu.h>
+DEFINE_TRACE(syscall_entry);
+DEFINE_TRACE(syscall_exit);
+
/*
* This routine will get a word off of the process kernel stack.
*/
diff --git a/arch/sh/kernel/ptrace_64.c b/arch/sh/kernel/ptrace_64.c
index 6950974..6e7816d 100644
--- a/arch/sh/kernel/ptrace_64.c
+++ b/arch/sh/kernel/ptrace_64.c
@@ -31,6 +31,7 @@
#include <linux/tracehook.h>
#include <linux/elf.h>
#include <linux/regset.h>
+#include <trace/syscall.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
@@ -40,6 +41,9 @@
#include <asm/syscalls.h>
#include <asm/fpu.h>
+DEFINE_TRACE(syscall_entry);
+DEFINE_TRACE(syscall_exit);
+
/* This mask defines the bits of the SR which the user is not allowed to
change, which are everything except S, Q, M, PR, SZ, FR. */
#define SR_MASK (0xffff8cfd)
diff --git a/arch/sh/kernel/sys_sh.c b/arch/sh/kernel/sys_sh.c
index 1798bb4..e6a6534 100644
--- a/arch/sh/kernel/sys_sh.c
+++ b/arch/sh/kernel/sys_sh.c
@@ -27,6 +27,9 @@
#include <asm/unistd.h>
#include <asm/cachectl.h>
#include <asm/cacheflush.h>
+#include <trace/ipc.h>
+
+DEFINE_TRACE(ipc_call);
static inline long
do_mmap2(unsigned long addr, unsigned long len, unsigned long prot,
@@ -90,8 +93,6 @@ asmlinkage int sys_ipc(uint call, int first, int second,
version = call >> 16; /* hack for backward compatibility */
call &= 0xffff;
- trace_mark(kernel_arch_ipc_call, "call %u first %d", call, first);
-
trace_ipc_call(call, first);
if (call <= SEMTIMEDOP)
diff --git a/arch/sh/kernel/traps_32.c b/arch/sh/kernel/traps_32.c
index 3fa7e41..cb87faa 100644
--- a/arch/sh/kernel/traps_32.c
+++ b/arch/sh/kernel/traps_32.c
@@ -31,6 +31,8 @@
#include <asm/fpu.h>
#include <asm/kprobes.h>
+#include <trace/trap.h>
+
#ifdef CONFIG_CPU_SH2
# define TRAP_RESERVED_INST 4
# define TRAP_ILLEGAL_SLOT_INST 6
@@ -126,9 +128,6 @@ static int proc_alignment_kern_write(struct file *file, const char __user *buffe
}
#endif
-/*
- * Also used in fault_32.c.
- */
DEFINE_TRACE(trap_entry);
DEFINE_TRACE(trap_exit);
@@ -658,7 +657,6 @@ asmlinkage void do_address_error(struct pt_regs *regs,
goto uspace_segv;
else {
/* ignore */
- trace_mark(kernel_arch_trap_exit, MARK_NOARGS);
regs->pc += instruction_size(instruction);
return;
}
diff --git a/arch/sh/mm/fault_32.c b/arch/sh/mm/fault_32.c
index 34e5fab..3e803f2 100644
--- a/arch/sh/mm/fault_32.c
+++ b/arch/sh/mm/fault_32.c
@@ -21,6 +21,11 @@
#include <asm/mmu_context.h>
#include <asm/tlbflush.h>
+DEFINE_TRACE(page_fault_entry);
+DEFINE_TRACE(page_fault_exit);
+DEFINE_TRACE(page_fault_nosem_entry);
+DEFINE_TRACE(page_fault_nosem_exit);
+
/*
* This routine handles page faults. It determines the address,
* and the problem, and then passes it off to one of the appropriate
@@ -95,13 +100,6 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
mm = tsk->mm;
- trace_trap_entry(regs,
- ({
- unsigned long trapnr;
- asm volatile("stc r2_bank,%0": "=r" (trapnr));
- trapnr;
- }) >> 5);
-
/*
* If we're in an interrupt or have no user
* context, we must not take the fault..
@@ -145,7 +143,7 @@ survive:
unsigned long trapnr;
asm volatile("stc r2_bank,%0": "=r" (trapnr));
trapnr;
- }) >> 5, mm, vma, address, write);
+ }) >> 5, mm, vma, address, writeaccess);
fault = handle_mm_fault(mm, vma, address, writeaccess);
trace_page_fault_exit(fault);
if (unlikely(fault & VM_FAULT_ERROR)) {
--
1.6.0.4
More information about the lttng-dev
mailing list