~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/perf/arch/powerpc/util/unwind-libunwind.c

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0-or-later
  2 /*
  3  * Copyright 2016 Chandan Kumar, IBM Corporation.
  4  */
  5 
  6 #include <errno.h>
  7 #include <libunwind.h>
  8 #include <asm/perf_regs.h>
  9 #include "../../util/unwind.h"
 10 #include "../../util/debug.h"
 11 
 12 int libunwind__arch_reg_id(int regnum)
 13 {
 14         switch (regnum) {
 15         case UNW_PPC64_R0:
 16                 return PERF_REG_POWERPC_R0;
 17         case UNW_PPC64_R1:
 18                 return PERF_REG_POWERPC_R1;
 19         case UNW_PPC64_R2:
 20                 return PERF_REG_POWERPC_R2;
 21         case UNW_PPC64_R3:
 22                 return PERF_REG_POWERPC_R3;
 23         case UNW_PPC64_R4:
 24                 return PERF_REG_POWERPC_R4;
 25         case UNW_PPC64_R5:
 26                 return PERF_REG_POWERPC_R5;
 27         case UNW_PPC64_R6:
 28                 return PERF_REG_POWERPC_R6;
 29         case UNW_PPC64_R7:
 30                 return PERF_REG_POWERPC_R7;
 31         case UNW_PPC64_R8:
 32                 return PERF_REG_POWERPC_R8;
 33         case UNW_PPC64_R9:
 34                 return PERF_REG_POWERPC_R9;
 35         case UNW_PPC64_R10:
 36                 return PERF_REG_POWERPC_R10;
 37         case UNW_PPC64_R11:
 38                 return PERF_REG_POWERPC_R11;
 39         case UNW_PPC64_R12:
 40                 return PERF_REG_POWERPC_R12;
 41         case UNW_PPC64_R13:
 42                 return PERF_REG_POWERPC_R13;
 43         case UNW_PPC64_R14:
 44                 return PERF_REG_POWERPC_R14;
 45         case UNW_PPC64_R15:
 46                 return PERF_REG_POWERPC_R15;
 47         case UNW_PPC64_R16:
 48                 return PERF_REG_POWERPC_R16;
 49         case UNW_PPC64_R17:
 50                 return PERF_REG_POWERPC_R17;
 51         case UNW_PPC64_R18:
 52                 return PERF_REG_POWERPC_R18;
 53         case UNW_PPC64_R19:
 54                 return PERF_REG_POWERPC_R19;
 55         case UNW_PPC64_R20:
 56                 return PERF_REG_POWERPC_R20;
 57         case UNW_PPC64_R21:
 58                 return PERF_REG_POWERPC_R21;
 59         case UNW_PPC64_R22:
 60                 return PERF_REG_POWERPC_R22;
 61         case UNW_PPC64_R23:
 62                 return PERF_REG_POWERPC_R23;
 63         case UNW_PPC64_R24:
 64                 return PERF_REG_POWERPC_R24;
 65         case UNW_PPC64_R25:
 66                 return PERF_REG_POWERPC_R25;
 67         case UNW_PPC64_R26:
 68                 return PERF_REG_POWERPC_R26;
 69         case UNW_PPC64_R27:
 70                 return PERF_REG_POWERPC_R27;
 71         case UNW_PPC64_R28:
 72                 return PERF_REG_POWERPC_R28;
 73         case UNW_PPC64_R29:
 74                 return PERF_REG_POWERPC_R29;
 75         case UNW_PPC64_R30:
 76                 return PERF_REG_POWERPC_R30;
 77         case UNW_PPC64_R31:
 78                 return PERF_REG_POWERPC_R31;
 79         case UNW_PPC64_LR:
 80                 return PERF_REG_POWERPC_LINK;
 81         case UNW_PPC64_CTR:
 82                 return PERF_REG_POWERPC_CTR;
 83         case UNW_PPC64_XER:
 84                 return PERF_REG_POWERPC_XER;
 85         case UNW_PPC64_NIP:
 86                 return PERF_REG_POWERPC_NIP;
 87         default:
 88                 pr_err("unwind: invalid reg id %d\n", regnum);
 89                 return -EINVAL;
 90         }
 91         return -EINVAL;
 92 }
 93 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php