d2912cb15b
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
73 lines
1.8 KiB
C
73 lines
1.8 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* arch/arm64/include/asm/ftrace.h
|
|
*
|
|
* Copyright (C) 2013 Linaro Limited
|
|
* Author: AKASHI Takahiro <takahiro.akashi@linaro.org>
|
|
*/
|
|
#ifndef __ASM_FTRACE_H
|
|
#define __ASM_FTRACE_H
|
|
|
|
#include <asm/insn.h>
|
|
|
|
#define HAVE_FUNCTION_GRAPH_FP_TEST
|
|
#define MCOUNT_ADDR ((unsigned long)_mcount)
|
|
#define MCOUNT_INSN_SIZE AARCH64_INSN_SIZE
|
|
|
|
#ifndef __ASSEMBLY__
|
|
#include <linux/compat.h>
|
|
|
|
extern void _mcount(unsigned long);
|
|
extern void *return_address(unsigned int);
|
|
|
|
struct dyn_arch_ftrace {
|
|
/* No extra data needed for arm64 */
|
|
};
|
|
|
|
extern unsigned long ftrace_graph_call;
|
|
|
|
extern void return_to_handler(void);
|
|
|
|
static inline unsigned long ftrace_call_adjust(unsigned long addr)
|
|
{
|
|
/*
|
|
* addr is the address of the mcount call instruction.
|
|
* recordmcount does the necessary offset calculation.
|
|
*/
|
|
return addr;
|
|
}
|
|
|
|
#define ftrace_return_address(n) return_address(n)
|
|
|
|
/*
|
|
* Because AArch32 mode does not share the same syscall table with AArch64,
|
|
* tracing compat syscalls may result in reporting bogus syscalls or even
|
|
* hang-up, so just do not trace them.
|
|
* See kernel/trace/trace_syscalls.c
|
|
*
|
|
* x86 code says:
|
|
* If the user really wants these, then they should use the
|
|
* raw syscall tracepoints with filtering.
|
|
*/
|
|
#define ARCH_TRACE_IGNORE_COMPAT_SYSCALLS
|
|
static inline bool arch_trace_is_compat_syscall(struct pt_regs *regs)
|
|
{
|
|
return is_compat_task();
|
|
}
|
|
|
|
#define ARCH_HAS_SYSCALL_MATCH_SYM_NAME
|
|
|
|
static inline bool arch_syscall_match_sym_name(const char *sym,
|
|
const char *name)
|
|
{
|
|
/*
|
|
* Since all syscall functions have __arm64_ prefix, we must skip it.
|
|
* However, as we described above, we decided to ignore compat
|
|
* syscalls, so we don't care about __arm64_compat_ prefix here.
|
|
*/
|
|
return !strcmp(sym + 8, name);
|
|
}
|
|
#endif /* ifndef __ASSEMBLY__ */
|
|
|
|
#endif /* __ASM_FTRACE_H */
|