18c2ecf20Sopenharmony_ci#ifndef ARCH_PERF_REGS_H 28c2ecf20Sopenharmony_ci#define ARCH_PERF_REGS_H 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ci#include <stdlib.h> 58c2ecf20Sopenharmony_ci#include <linux/types.h> 68c2ecf20Sopenharmony_ci#include <asm/perf_regs.h> 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_civoid perf_regs_load(u64 *regs); 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#define PERF_REGS_MASK ((1ULL << PERF_REG_S390_MAX) - 1) 118c2ecf20Sopenharmony_ci#define PERF_REGS_MAX PERF_REG_S390_MAX 128c2ecf20Sopenharmony_ci#define PERF_SAMPLE_REGS_ABI PERF_SAMPLE_REGS_ABI_64 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci#define PERF_REG_IP PERF_REG_S390_PC 158c2ecf20Sopenharmony_ci#define PERF_REG_SP PERF_REG_S390_R15 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_cistatic inline const char *__perf_reg_name(int id) 188c2ecf20Sopenharmony_ci{ 198c2ecf20Sopenharmony_ci switch (id) { 208c2ecf20Sopenharmony_ci case PERF_REG_S390_R0: 218c2ecf20Sopenharmony_ci return "R0"; 228c2ecf20Sopenharmony_ci case PERF_REG_S390_R1: 238c2ecf20Sopenharmony_ci return "R1"; 248c2ecf20Sopenharmony_ci case PERF_REG_S390_R2: 258c2ecf20Sopenharmony_ci return "R2"; 268c2ecf20Sopenharmony_ci case PERF_REG_S390_R3: 278c2ecf20Sopenharmony_ci return "R3"; 288c2ecf20Sopenharmony_ci case PERF_REG_S390_R4: 298c2ecf20Sopenharmony_ci return "R4"; 308c2ecf20Sopenharmony_ci case PERF_REG_S390_R5: 318c2ecf20Sopenharmony_ci return "R5"; 328c2ecf20Sopenharmony_ci case PERF_REG_S390_R6: 338c2ecf20Sopenharmony_ci return "R6"; 348c2ecf20Sopenharmony_ci case PERF_REG_S390_R7: 358c2ecf20Sopenharmony_ci return "R7"; 368c2ecf20Sopenharmony_ci case PERF_REG_S390_R8: 378c2ecf20Sopenharmony_ci return "R8"; 388c2ecf20Sopenharmony_ci case PERF_REG_S390_R9: 398c2ecf20Sopenharmony_ci return "R9"; 408c2ecf20Sopenharmony_ci case PERF_REG_S390_R10: 418c2ecf20Sopenharmony_ci return "R10"; 428c2ecf20Sopenharmony_ci case PERF_REG_S390_R11: 438c2ecf20Sopenharmony_ci return "R11"; 448c2ecf20Sopenharmony_ci case PERF_REG_S390_R12: 458c2ecf20Sopenharmony_ci return "R12"; 468c2ecf20Sopenharmony_ci case PERF_REG_S390_R13: 478c2ecf20Sopenharmony_ci return "R13"; 488c2ecf20Sopenharmony_ci case PERF_REG_S390_R14: 498c2ecf20Sopenharmony_ci return "R14"; 508c2ecf20Sopenharmony_ci case PERF_REG_S390_R15: 518c2ecf20Sopenharmony_ci return "R15"; 528c2ecf20Sopenharmony_ci case PERF_REG_S390_FP0: 538c2ecf20Sopenharmony_ci return "FP0"; 548c2ecf20Sopenharmony_ci case PERF_REG_S390_FP1: 558c2ecf20Sopenharmony_ci return "FP1"; 568c2ecf20Sopenharmony_ci case PERF_REG_S390_FP2: 578c2ecf20Sopenharmony_ci return "FP2"; 588c2ecf20Sopenharmony_ci case PERF_REG_S390_FP3: 598c2ecf20Sopenharmony_ci return "FP3"; 608c2ecf20Sopenharmony_ci case PERF_REG_S390_FP4: 618c2ecf20Sopenharmony_ci return "FP4"; 628c2ecf20Sopenharmony_ci case PERF_REG_S390_FP5: 638c2ecf20Sopenharmony_ci return "FP5"; 648c2ecf20Sopenharmony_ci case PERF_REG_S390_FP6: 658c2ecf20Sopenharmony_ci return "FP6"; 668c2ecf20Sopenharmony_ci case PERF_REG_S390_FP7: 678c2ecf20Sopenharmony_ci return "FP7"; 688c2ecf20Sopenharmony_ci case PERF_REG_S390_FP8: 698c2ecf20Sopenharmony_ci return "FP8"; 708c2ecf20Sopenharmony_ci case PERF_REG_S390_FP9: 718c2ecf20Sopenharmony_ci return "FP9"; 728c2ecf20Sopenharmony_ci case PERF_REG_S390_FP10: 738c2ecf20Sopenharmony_ci return "FP10"; 748c2ecf20Sopenharmony_ci case PERF_REG_S390_FP11: 758c2ecf20Sopenharmony_ci return "FP11"; 768c2ecf20Sopenharmony_ci case PERF_REG_S390_FP12: 778c2ecf20Sopenharmony_ci return "FP12"; 788c2ecf20Sopenharmony_ci case PERF_REG_S390_FP13: 798c2ecf20Sopenharmony_ci return "FP13"; 808c2ecf20Sopenharmony_ci case PERF_REG_S390_FP14: 818c2ecf20Sopenharmony_ci return "FP14"; 828c2ecf20Sopenharmony_ci case PERF_REG_S390_FP15: 838c2ecf20Sopenharmony_ci return "FP15"; 848c2ecf20Sopenharmony_ci case PERF_REG_S390_MASK: 858c2ecf20Sopenharmony_ci return "MASK"; 868c2ecf20Sopenharmony_ci case PERF_REG_S390_PC: 878c2ecf20Sopenharmony_ci return "PC"; 888c2ecf20Sopenharmony_ci default: 898c2ecf20Sopenharmony_ci return NULL; 908c2ecf20Sopenharmony_ci } 918c2ecf20Sopenharmony_ci 928c2ecf20Sopenharmony_ci return NULL; 938c2ecf20Sopenharmony_ci} 948c2ecf20Sopenharmony_ci 958c2ecf20Sopenharmony_ci#endif /* ARCH_PERF_REGS_H */ 96