1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 22bcd355bSJiri Olsa #ifndef ARCH_PERF_REGS_H 32bcd355bSJiri Olsa #define ARCH_PERF_REGS_H 42bcd355bSJiri Olsa 52bcd355bSJiri Olsa #include <stdlib.h> 6d944c4eeSBorislav Petkov #include <linux/types.h> 7d2709c7cSDavid Howells #include <asm/perf_regs.h> 82bcd355bSJiri Olsa 93c8b06f9SJiri Olsa void perf_regs_load(u64 *regs); 103c8b06f9SJiri Olsa 11*ca138a7aSAndi Kleen #define PERF_REGS_MAX PERF_REG_X86_XMM_MAX 1289fe808aSIngo Molnar #ifndef HAVE_ARCH_X86_64_SUPPORT 132bcd355bSJiri Olsa #define PERF_REGS_MASK ((1ULL << PERF_REG_X86_32_MAX) - 1) 14aa16b81fSJiri Olsa #define PERF_SAMPLE_REGS_ABI PERF_SAMPLE_REGS_ABI_32 152bcd355bSJiri Olsa #else 162bcd355bSJiri Olsa #define REG_NOSUPPORT ((1ULL << PERF_REG_X86_DS) | \ 172bcd355bSJiri Olsa (1ULL << PERF_REG_X86_ES) | \ 182bcd355bSJiri Olsa (1ULL << PERF_REG_X86_FS) | \ 192bcd355bSJiri Olsa (1ULL << PERF_REG_X86_GS)) 202bcd355bSJiri Olsa #define PERF_REGS_MASK (((1ULL << PERF_REG_X86_64_MAX) - 1) & ~REG_NOSUPPORT) 21aa16b81fSJiri Olsa #define PERF_SAMPLE_REGS_ABI PERF_SAMPLE_REGS_ABI_64 222bcd355bSJiri Olsa #endif 232bcd355bSJiri Olsa 242bcd355bSJiri Olsa #endif /* ARCH_PERF_REGS_H */ 25