162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci/* Copyright (C) 2019 Hangzhou C-SKY Microsystems co.,ltd. */
362306a36Sopenharmony_ci
462306a36Sopenharmony_ci#ifndef ARCH_PERF_REGS_H
562306a36Sopenharmony_ci#define ARCH_PERF_REGS_H
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci#include <stdlib.h>
862306a36Sopenharmony_ci#include <linux/types.h>
962306a36Sopenharmony_ci#include <asm/perf_regs.h>
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci#define PERF_REGS_MASK	((1ULL << PERF_REG_RISCV_MAX) - 1)
1262306a36Sopenharmony_ci#define PERF_REGS_MAX	PERF_REG_RISCV_MAX
1362306a36Sopenharmony_ci#if __riscv_xlen == 64
1462306a36Sopenharmony_ci#define PERF_SAMPLE_REGS_ABI    PERF_SAMPLE_REGS_ABI_64
1562306a36Sopenharmony_ci#else
1662306a36Sopenharmony_ci#define PERF_SAMPLE_REGS_ABI	PERF_SAMPLE_REGS_ABI_32
1762306a36Sopenharmony_ci#endif
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ci#endif /* ARCH_PERF_REGS_H */
20