Skip to content

Commit

Permalink
sh: Fix an off-by-1 in FTRACE_SYSCALL_MAX.
Browse files Browse the repository at this point in the history
This is supposed to be the equivalent of __NR_syscalls, not
__NR_syscalls -1. The x86 code this was based on had simply fallen
out of sync at the time this was implemented. Fix it up now.

As a result, tracing of __NR_perf_counter_open works as advertised.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Aug 25, 2009
1 parent 12cceb6 commit c68e320
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/sh/include/asm/ftrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#ifdef CONFIG_FUNCTION_TRACER

#define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */
#define FTRACE_SYSCALL_MAX (NR_syscalls - 1)
#define FTRACE_SYSCALL_MAX NR_syscalls

#ifndef __ASSEMBLY__
extern void mcount(void);
Expand Down

0 comments on commit c68e320

Please sign in to comment.