Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c658ad1b authored by David S. Miller's avatar David S. Miller
Browse files

sparc64: Add syscall tracepoint support.

parent 4d14a459
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ config SPARC64
	select HAVE_SYSCALL_WRAPPERS
	select HAVE_DYNAMIC_FTRACE
	select HAVE_FTRACE_MCOUNT_RECORD
	select HAVE_SYSCALL_TRACEPOINTS
	select USE_GENERIC_SMP_HELPERS if SMP
	select RTC_DRV_CMOS
	select RTC_DRV_BQ4802
+2 −0
Original line number Diff line number Diff line
@@ -227,6 +227,7 @@ register struct thread_info *current_thread_info_reg asm("g6");
/* flag bit 8 is available */
#define TIF_SECCOMP		9	/* secure computing */
#define TIF_SYSCALL_AUDIT	10	/* syscall auditing active */
#define TIF_SYSCALL_TRACEPOINT	11	/* syscall tracepoint instrumentation */
/* flag bit 11 is available */
/* NOTE: Thread flags >= 12 should be ones we have no interest
 *       in using in assembly, else we can't use the mask as
@@ -246,6 +247,7 @@ register struct thread_info *current_thread_info_reg asm("g6");
#define _TIF_32BIT		(1<<TIF_32BIT)
#define _TIF_SECCOMP		(1<<TIF_SECCOMP)
#define _TIF_SYSCALL_AUDIT	(1<<TIF_SYSCALL_AUDIT)
#define _TIF_SYSCALL_TRACEPOINT	(1<<TIF_SYSCALL_TRACEPOINT)
#define _TIF_ABI_PENDING	(1<<TIF_ABI_PENDING)
#define _TIF_POLLING_NRFLAG	(1<<TIF_POLLING_NRFLAG)
#define _TIF_FREEZE		(1<<TIF_FREEZE)
+1 −1
Original line number Diff line number Diff line
@@ -398,7 +398,7 @@
#define __NR_perf_event_open	327
#define __NR_recvmmsg		328

#define NR_SYSCALLS		329
#define NR_syscalls		329

#ifdef __32bit_syscall_numbers__
/* Sparc 32-bit only has the "setresuid32", "getresuid32" variants,
+1 −1
Original line number Diff line number Diff line
@@ -1294,7 +1294,7 @@ linux_sparc_syscall:
	sethi	%hi(PSR_SYSCALL), %l4
	or	%l0, %l4, %l0
	/* Direct access to user regs, must faster. */
	cmp	%g1, NR_SYSCALLS
	cmp	%g1, NR_syscalls
	bgeu	linux_sparc_ni_syscall
	 sll	%g1, 2, %l4
	ld	[%l7 + %l4], %l7
+11 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
#include <linux/percpu.h>
#include <linux/init.h>
#include <linux/list.h>
#include <trace/syscall.h>

#include <asm/ftrace.h>

@@ -91,3 +92,13 @@ int __init ftrace_dyn_arch_init(void *data)
}
#endif

#ifdef CONFIG_FTRACE_SYSCALLS

extern unsigned int sys_call_table[];

unsigned long __init arch_syscall_addr(int nr)
{
	return (unsigned long)sys_call_table[nr];
}

#endif
Loading