mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-09 15:24:32 +08:00
7755cec63a
Having the ARM PMUv3 driver sitting in arch/arm64/kernel is getting in the way of being able to use perf on ARMv8 cores running a 32bit kernel, such as 32bit KVM guests. This patch moves it into drivers/perf/arm_pmuv3.c, with an include file in include/linux/perf/arm_pmuv3.h. The only thing left in arch/arm64 is some mundane perf stuff. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Zaid Al-Bassam <zalbassam@google.com> Tested-by: Florian Fainelli <f.fainelli@gmail.com> Link: https://lore.kernel.org/r/20230317195027.3746949-2-zalbassam@google.com Signed-off-by: Will Deacon <will@kernel.org>
28 lines
712 B
C
28 lines
712 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (C) 2012 ARM Ltd.
|
|
*/
|
|
|
|
#ifndef __ASM_PERF_EVENT_H
|
|
#define __ASM_PERF_EVENT_H
|
|
|
|
#include <asm/stack_pointer.h>
|
|
#include <asm/ptrace.h>
|
|
|
|
#ifdef CONFIG_PERF_EVENTS
|
|
struct pt_regs;
|
|
extern unsigned long perf_instruction_pointer(struct pt_regs *regs);
|
|
extern unsigned long perf_misc_flags(struct pt_regs *regs);
|
|
#define perf_misc_flags(regs) perf_misc_flags(regs)
|
|
#define perf_arch_bpf_user_pt_regs(regs) ®s->user_regs
|
|
#endif
|
|
|
|
#define perf_arch_fetch_caller_regs(regs, __ip) { \
|
|
(regs)->pc = (__ip); \
|
|
(regs)->regs[29] = (unsigned long) __builtin_frame_address(0); \
|
|
(regs)->sp = current_stack_pointer; \
|
|
(regs)->pstate = PSR_MODE_EL1h; \
|
|
}
|
|
|
|
#endif
|