sh: Enable HAVE_ARCH_TRACEHOOK for all SH, now that SH-5 supports it too.
authorPaul Mundt <lethal@linux-sh.org>
Wed, 10 Dec 2008 11:17:15 +0000 (20:17 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 22 Dec 2008 09:44:04 +0000 (18:44 +0900)
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/Kconfig
arch/sh/include/asm/processor_64.h
arch/sh/include/asm/syscall_64.h

index 6462109acc700122130af5e08db56175545b52b2..ff7a1f358a364b0721d3e4b659b4e862703cccdc 100644 (file)
@@ -13,6 +13,7 @@ config SUPERH
        select HAVE_OPROFILE
        select HAVE_GENERIC_DMA_COHERENT
        select HAVE_IOREMAP_PROT if MMU
+       select HAVE_ARCH_TRACEHOOK
        help
          The SuperH is a RISC processor targeted for use in embedded systems
          and consumer electronics; it was also used in the Sega Dreamcast
@@ -23,7 +24,6 @@ config SUPERH32
        def_bool !SUPERH64
        select HAVE_KPROBES
        select HAVE_KRETPROBES
-       select HAVE_ARCH_TRACEHOOK
        select HAVE_FUNCTION_TRACER
        select HAVE_FTRACE_MCOUNT_RECORD
        select HAVE_DYNAMIC_FTRACE
index 96067e9397ea8133902c650ad2c45039ecd9f711..803177fcf0868b1e5f3a84462a6d3fe514f101c8 100644 (file)
@@ -226,7 +226,7 @@ extern unsigned long get_wchan(struct task_struct *p);
 #define KSTK_EIP(tsk)  ((tsk)->thread.pc)
 #define KSTK_ESP(tsk)  ((tsk)->thread.sp)
 
-#define user_stack_pointer(regs)       ((regs)->sp)
+#define user_stack_pointer(regs)       ((regs)->regs[15])
 
 #endif /* __ASSEMBLY__ */
 #endif /* __ASM_SH_PROCESSOR_64_H */
index e95f3ae30affc237308a463ab39cda8c7b6f2bdf..e1143b9784d62d9247760efe5738b8ba4c642d92 100644 (file)
@@ -65,7 +65,7 @@ static inline void syscall_get_arguments(struct task_struct *task,
                                         unsigned long *args)
 {
        BUG_ON(i + n > 6);
-       memcpy(args, &regs->reg[2 + i], n * sizeof(args[0]));
+       memcpy(args, &regs->regs[2 + i], n * sizeof(args[0]));
 }
 
 static inline void syscall_set_arguments(struct task_struct *task,
@@ -74,7 +74,7 @@ static inline void syscall_set_arguments(struct task_struct *task,
                                         const unsigned long *args)
 {
        BUG_ON(i + n > 6);
-       memcpy(&regs->reg[2 + i], args, n * sizeof(args[0]));
+       memcpy(&regs->regs[2 + i], args, n * sizeof(args[0]));
 }
 
 #endif /* __ASM_SH_SYSCALL_64_H */