162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci#ifndef ARCH_PERF_REGS_H 362306a36Sopenharmony_ci#define ARCH_PERF_REGS_H 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci#include <stdlib.h> 662306a36Sopenharmony_ci#include <linux/types.h> 762306a36Sopenharmony_ci#include <asm/perf_regs.h> 862306a36Sopenharmony_ci 962306a36Sopenharmony_civoid perf_regs_load(u64 *regs); 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci#define PERF_REGS_MAX PERF_REG_X86_XMM_MAX 1262306a36Sopenharmony_ci#ifndef HAVE_ARCH_X86_64_SUPPORT 1362306a36Sopenharmony_ci#define PERF_REGS_MASK ((1ULL << PERF_REG_X86_32_MAX) - 1) 1462306a36Sopenharmony_ci#define PERF_SAMPLE_REGS_ABI PERF_SAMPLE_REGS_ABI_32 1562306a36Sopenharmony_ci#else 1662306a36Sopenharmony_ci#define REG_NOSUPPORT ((1ULL << PERF_REG_X86_DS) | \ 1762306a36Sopenharmony_ci (1ULL << PERF_REG_X86_ES) | \ 1862306a36Sopenharmony_ci (1ULL << PERF_REG_X86_FS) | \ 1962306a36Sopenharmony_ci (1ULL << PERF_REG_X86_GS)) 2062306a36Sopenharmony_ci#define PERF_REGS_MASK (((1ULL << PERF_REG_X86_64_MAX) - 1) & ~REG_NOSUPPORT) 2162306a36Sopenharmony_ci#define PERF_SAMPLE_REGS_ABI PERF_SAMPLE_REGS_ABI_64 2262306a36Sopenharmony_ci#endif 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ci#endif /* ARCH_PERF_REGS_H */ 25