mirror of
https://github.com/torvalds/linux.git
synced 2024-11-18 18:11:56 +00:00
7c0eda1a04
Building callchain.c with !COMPAT proved quite ugly with all the defines. Splitting out the 32bit and 64bit parts looks better. No code change intended. Signed-off-by: Michal Suchanek <msuchanek@suse.de> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/a20027bf1074935a7934ee2a6757c99ea047e70d.1584699455.git.msuchanek@suse.de
20 lines
628 B
C
20 lines
628 B
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
#ifndef _POWERPC_PERF_CALLCHAIN_H
|
|
#define _POWERPC_PERF_CALLCHAIN_H
|
|
|
|
int read_user_stack_slow(void __user *ptr, void *buf, int nb);
|
|
void perf_callchain_user_64(struct perf_callchain_entry_ctx *entry,
|
|
struct pt_regs *regs);
|
|
void perf_callchain_user_32(struct perf_callchain_entry_ctx *entry,
|
|
struct pt_regs *regs);
|
|
|
|
static inline bool invalid_user_sp(unsigned long sp)
|
|
{
|
|
unsigned long mask = is_32bit_task() ? 3 : 7;
|
|
unsigned long top = STACK_TOP - (is_32bit_task() ? 16 : 32);
|
|
|
|
return (!sp || (sp & mask) || (sp > top));
|
|
}
|
|
|
|
#endif /* _POWERPC_PERF_CALLCHAIN_H */
|