15000e7f6SLeo Yan // SPDX-License-Identifier: GPL-2.0 25000e7f6SLeo Yan 35000e7f6SLeo Yan #ifdef HAVE_PERF_REGS_SUPPORT 45000e7f6SLeo Yan 55000e7f6SLeo Yan #include "../perf_regs.h" 65000e7f6SLeo Yan #include "../../../arch/s390/include/uapi/asm/perf_regs.h" 75000e7f6SLeo Yan 85000e7f6SLeo Yan const char *__perf_reg_name_s390(int id) 95000e7f6SLeo Yan { 105000e7f6SLeo Yan switch (id) { 115000e7f6SLeo Yan case PERF_REG_S390_R0: 125000e7f6SLeo Yan return "R0"; 135000e7f6SLeo Yan case PERF_REG_S390_R1: 145000e7f6SLeo Yan return "R1"; 155000e7f6SLeo Yan case PERF_REG_S390_R2: 165000e7f6SLeo Yan return "R2"; 175000e7f6SLeo Yan case PERF_REG_S390_R3: 185000e7f6SLeo Yan return "R3"; 195000e7f6SLeo Yan case PERF_REG_S390_R4: 205000e7f6SLeo Yan return "R4"; 215000e7f6SLeo Yan case PERF_REG_S390_R5: 225000e7f6SLeo Yan return "R5"; 235000e7f6SLeo Yan case PERF_REG_S390_R6: 245000e7f6SLeo Yan return "R6"; 255000e7f6SLeo Yan case PERF_REG_S390_R7: 265000e7f6SLeo Yan return "R7"; 275000e7f6SLeo Yan case PERF_REG_S390_R8: 285000e7f6SLeo Yan return "R8"; 295000e7f6SLeo Yan case PERF_REG_S390_R9: 305000e7f6SLeo Yan return "R9"; 315000e7f6SLeo Yan case PERF_REG_S390_R10: 325000e7f6SLeo Yan return "R10"; 335000e7f6SLeo Yan case PERF_REG_S390_R11: 345000e7f6SLeo Yan return "R11"; 355000e7f6SLeo Yan case PERF_REG_S390_R12: 365000e7f6SLeo Yan return "R12"; 375000e7f6SLeo Yan case PERF_REG_S390_R13: 385000e7f6SLeo Yan return "R13"; 395000e7f6SLeo Yan case PERF_REG_S390_R14: 405000e7f6SLeo Yan return "R14"; 415000e7f6SLeo Yan case PERF_REG_S390_R15: 425000e7f6SLeo Yan return "R15"; 435000e7f6SLeo Yan case PERF_REG_S390_FP0: 445000e7f6SLeo Yan return "FP0"; 455000e7f6SLeo Yan case PERF_REG_S390_FP1: 465000e7f6SLeo Yan return "FP1"; 475000e7f6SLeo Yan case PERF_REG_S390_FP2: 485000e7f6SLeo Yan return "FP2"; 495000e7f6SLeo Yan case PERF_REG_S390_FP3: 505000e7f6SLeo Yan return "FP3"; 515000e7f6SLeo Yan case PERF_REG_S390_FP4: 525000e7f6SLeo Yan return "FP4"; 535000e7f6SLeo Yan case PERF_REG_S390_FP5: 545000e7f6SLeo Yan return "FP5"; 555000e7f6SLeo Yan case PERF_REG_S390_FP6: 565000e7f6SLeo Yan return "FP6"; 575000e7f6SLeo Yan case PERF_REG_S390_FP7: 585000e7f6SLeo Yan return "FP7"; 595000e7f6SLeo Yan case PERF_REG_S390_FP8: 605000e7f6SLeo Yan return "FP8"; 615000e7f6SLeo Yan case PERF_REG_S390_FP9: 625000e7f6SLeo Yan return "FP9"; 635000e7f6SLeo Yan case PERF_REG_S390_FP10: 645000e7f6SLeo Yan return "FP10"; 655000e7f6SLeo Yan case PERF_REG_S390_FP11: 665000e7f6SLeo Yan return "FP11"; 675000e7f6SLeo Yan case PERF_REG_S390_FP12: 685000e7f6SLeo Yan return "FP12"; 695000e7f6SLeo Yan case PERF_REG_S390_FP13: 705000e7f6SLeo Yan return "FP13"; 715000e7f6SLeo Yan case PERF_REG_S390_FP14: 725000e7f6SLeo Yan return "FP14"; 735000e7f6SLeo Yan case PERF_REG_S390_FP15: 745000e7f6SLeo Yan return "FP15"; 755000e7f6SLeo Yan case PERF_REG_S390_MASK: 765000e7f6SLeo Yan return "MASK"; 775000e7f6SLeo Yan case PERF_REG_S390_PC: 785000e7f6SLeo Yan return "PC"; 795000e7f6SLeo Yan default: 805000e7f6SLeo Yan return NULL; 815000e7f6SLeo Yan } 825000e7f6SLeo Yan 835000e7f6SLeo Yan return NULL; 845000e7f6SLeo Yan } 855000e7f6SLeo Yan 86*34af56afSLeo Yan uint64_t __perf_reg_ip_s390(void) 87*34af56afSLeo Yan { 88*34af56afSLeo Yan return PERF_REG_S390_PC; 89*34af56afSLeo Yan } 90*34af56afSLeo Yan 91*34af56afSLeo Yan uint64_t __perf_reg_sp_s390(void) 92*34af56afSLeo Yan { 93*34af56afSLeo Yan return PERF_REG_S390_R15; 94*34af56afSLeo Yan } 95*34af56afSLeo Yan 965000e7f6SLeo Yan #endif 97