aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
authorSuzuki K. Poulose <suzuki@in.ibm.com>2013-08-29 05:04:10 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2013-10-24 11:16:47 -0400
commitf616d6760716f702b3aa459fd20c8d8cce693abd (patch)
tree462b37d1e3a694a61f86a2afbf804d12f3d5889f /arch/s390/kernel
parent75287430b4af7c22080d02b8cfc8344c4ecafc21 (diff)
s390/dis: rename structures for unique types
Rename 'insn' and 'operand' structures to more canonical names to avoid conflicts. struct insn represents information about an instruction, including the mnemonics, format and opcode. struct operand represents the 'properties' and information on howto interpret the operand value and doesn't contain the value. We rename these structures for avoiding a global conflict. i.e, 1,$s/struct insn/struct s390_insn/g 1,$s/struct operand/struct s390_operand/g Signed-off-by: Suzuki K Poulose <suzuki@in.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/dis.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/arch/s390/kernel/dis.c b/arch/s390/kernel/dis.c
index be87d3e05a5b..5fb278eb5e46 100644
--- a/arch/s390/kernel/dis.c
+++ b/arch/s390/kernel/dis.c
@@ -155,19 +155,19 @@ enum {
155 INSTR_S_00, INSTR_S_RD, 155 INSTR_S_00, INSTR_S_RD,
156}; 156};
157 157
158struct operand { 158struct s390_operand {
159 int bits; /* The number of bits in the operand. */ 159 int bits; /* The number of bits in the operand. */
160 int shift; /* The number of bits to shift. */ 160 int shift; /* The number of bits to shift. */
161 int flags; /* One bit syntax flags. */ 161 int flags; /* One bit syntax flags. */
162}; 162};
163 163
164struct insn { 164struct s390_insn {
165 const char name[5]; 165 const char name[5];
166 unsigned char opfrag; 166 unsigned char opfrag;
167 unsigned char format; 167 unsigned char format;
168}; 168};
169 169
170static const struct operand operands[] = 170static const struct s390_operand operands[] =
171{ 171{
172 [UNUSED] = { 0, 0, 0 }, 172 [UNUSED] = { 0, 0, 0 },
173 [R_8] = { 4, 8, OPERAND_GPR }, 173 [R_8] = { 4, 8, OPERAND_GPR },
@@ -479,7 +479,7 @@ static char *long_insn_name[] = {
479 [LONG_INSN_PCISTB] = "pcistb", 479 [LONG_INSN_PCISTB] = "pcistb",
480}; 480};
481 481
482static struct insn opcode[] = { 482static struct s390_insn opcode[] = {
483#ifdef CONFIG_64BIT 483#ifdef CONFIG_64BIT
484 { "bprp", 0xc5, INSTR_MII_UPI }, 484 { "bprp", 0xc5, INSTR_MII_UPI },
485 { "bpp", 0xc7, INSTR_SMI_U0RDP }, 485 { "bpp", 0xc7, INSTR_SMI_U0RDP },
@@ -668,7 +668,7 @@ static struct insn opcode[] = {
668 { "", 0, INSTR_INVALID } 668 { "", 0, INSTR_INVALID }
669}; 669};
670 670
671static struct insn opcode_01[] = { 671static struct s390_insn opcode_01[] = {
672#ifdef CONFIG_64BIT 672#ifdef CONFIG_64BIT
673 { "ptff", 0x04, INSTR_E }, 673 { "ptff", 0x04, INSTR_E },
674 { "pfpo", 0x0a, INSTR_E }, 674 { "pfpo", 0x0a, INSTR_E },
@@ -684,7 +684,7 @@ static struct insn opcode_01[] = {
684 { "", 0, INSTR_INVALID } 684 { "", 0, INSTR_INVALID }
685}; 685};
686 686
687static struct insn opcode_a5[] = { 687static struct s390_insn opcode_a5[] = {
688#ifdef CONFIG_64BIT 688#ifdef CONFIG_64BIT
689 { "iihh", 0x00, INSTR_RI_RU }, 689 { "iihh", 0x00, INSTR_RI_RU },
690 { "iihl", 0x01, INSTR_RI_RU }, 690 { "iihl", 0x01, INSTR_RI_RU },
@@ -706,7 +706,7 @@ static struct insn opcode_a5[] = {
706 { "", 0, INSTR_INVALID } 706 { "", 0, INSTR_INVALID }
707}; 707};
708 708
709static struct insn opcode_a7[] = { 709static struct s390_insn opcode_a7[] = {
710#ifdef CONFIG_64BIT 710#ifdef CONFIG_64BIT
711 { "tmhh", 0x02, INSTR_RI_RU }, 711 { "tmhh", 0x02, INSTR_RI_RU },
712 { "tmhl", 0x03, INSTR_RI_RU }, 712 { "tmhl", 0x03, INSTR_RI_RU },
@@ -728,7 +728,7 @@ static struct insn opcode_a7[] = {
728 { "", 0, INSTR_INVALID } 728 { "", 0, INSTR_INVALID }
729}; 729};
730 730
731static struct insn opcode_aa[] = { 731static struct s390_insn opcode_aa[] = {
732#ifdef CONFIG_64BIT 732#ifdef CONFIG_64BIT
733 { { 0, LONG_INSN_RINEXT }, 0x00, INSTR_RI_RI }, 733 { { 0, LONG_INSN_RINEXT }, 0x00, INSTR_RI_RI },
734 { "rion", 0x01, INSTR_RI_RI }, 734 { "rion", 0x01, INSTR_RI_RI },
@@ -739,7 +739,7 @@ static struct insn opcode_aa[] = {
739 { "", 0, INSTR_INVALID } 739 { "", 0, INSTR_INVALID }
740}; 740};
741 741
742static struct insn opcode_b2[] = { 742static struct s390_insn opcode_b2[] = {
743#ifdef CONFIG_64BIT 743#ifdef CONFIG_64BIT
744 { "stckf", 0x7c, INSTR_S_RD }, 744 { "stckf", 0x7c, INSTR_S_RD },
745 { "lpp", 0x80, INSTR_S_RD }, 745 { "lpp", 0x80, INSTR_S_RD },
@@ -851,7 +851,7 @@ static struct insn opcode_b2[] = {
851 { "", 0, INSTR_INVALID } 851 { "", 0, INSTR_INVALID }
852}; 852};
853 853
854static struct insn opcode_b3[] = { 854static struct s390_insn opcode_b3[] = {
855#ifdef CONFIG_64BIT 855#ifdef CONFIG_64BIT
856 { "maylr", 0x38, INSTR_RRF_F0FF }, 856 { "maylr", 0x38, INSTR_RRF_F0FF },
857 { "mylr", 0x39, INSTR_RRF_F0FF }, 857 { "mylr", 0x39, INSTR_RRF_F0FF },
@@ -1034,7 +1034,7 @@ static struct insn opcode_b3[] = {
1034 { "", 0, INSTR_INVALID } 1034 { "", 0, INSTR_INVALID }
1035}; 1035};
1036 1036
1037static struct insn opcode_b9[] = { 1037static struct s390_insn opcode_b9[] = {
1038#ifdef CONFIG_64BIT 1038#ifdef CONFIG_64BIT
1039 { "lpgr", 0x00, INSTR_RRE_RR }, 1039 { "lpgr", 0x00, INSTR_RRE_RR },
1040 { "lngr", 0x01, INSTR_RRE_RR }, 1040 { "lngr", 0x01, INSTR_RRE_RR },
@@ -1167,7 +1167,7 @@ static struct insn opcode_b9[] = {
1167 { "", 0, INSTR_INVALID } 1167 { "", 0, INSTR_INVALID }
1168}; 1168};
1169 1169
1170static struct insn opcode_c0[] = { 1170static struct s390_insn opcode_c0[] = {
1171#ifdef CONFIG_64BIT 1171#ifdef CONFIG_64BIT
1172 { "lgfi", 0x01, INSTR_RIL_RI }, 1172 { "lgfi", 0x01, INSTR_RIL_RI },
1173 { "xihf", 0x06, INSTR_RIL_RU }, 1173 { "xihf", 0x06, INSTR_RIL_RU },
@@ -1187,7 +1187,7 @@ static struct insn opcode_c0[] = {
1187 { "", 0, INSTR_INVALID } 1187 { "", 0, INSTR_INVALID }
1188}; 1188};
1189 1189
1190static struct insn opcode_c2[] = { 1190static struct s390_insn opcode_c2[] = {
1191#ifdef CONFIG_64BIT 1191#ifdef CONFIG_64BIT
1192 { "msgfi", 0x00, INSTR_RIL_RI }, 1192 { "msgfi", 0x00, INSTR_RIL_RI },
1193 { "msfi", 0x01, INSTR_RIL_RI }, 1193 { "msfi", 0x01, INSTR_RIL_RI },
@@ -1205,7 +1205,7 @@ static struct insn opcode_c2[] = {
1205 { "", 0, INSTR_INVALID } 1205 { "", 0, INSTR_INVALID }
1206}; 1206};
1207 1207
1208static struct insn opcode_c4[] = { 1208static struct s390_insn opcode_c4[] = {
1209#ifdef CONFIG_64BIT 1209#ifdef CONFIG_64BIT
1210 { "llhrl", 0x02, INSTR_RIL_RP }, 1210 { "llhrl", 0x02, INSTR_RIL_RP },
1211 { "lghrl", 0x04, INSTR_RIL_RP }, 1211 { "lghrl", 0x04, INSTR_RIL_RP },
@@ -1222,7 +1222,7 @@ static struct insn opcode_c4[] = {
1222 { "", 0, INSTR_INVALID } 1222 { "", 0, INSTR_INVALID }
1223}; 1223};
1224 1224
1225static struct insn opcode_c6[] = { 1225static struct s390_insn opcode_c6[] = {
1226#ifdef CONFIG_64BIT 1226#ifdef CONFIG_64BIT
1227 { "exrl", 0x00, INSTR_RIL_RP }, 1227 { "exrl", 0x00, INSTR_RIL_RP },
1228 { "pfdrl", 0x02, INSTR_RIL_UP }, 1228 { "pfdrl", 0x02, INSTR_RIL_UP },
@@ -1240,7 +1240,7 @@ static struct insn opcode_c6[] = {
1240 { "", 0, INSTR_INVALID } 1240 { "", 0, INSTR_INVALID }
1241}; 1241};
1242 1242
1243static struct insn opcode_c8[] = { 1243static struct s390_insn opcode_c8[] = {
1244#ifdef CONFIG_64BIT 1244#ifdef CONFIG_64BIT
1245 { "mvcos", 0x00, INSTR_SSF_RRDRD }, 1245 { "mvcos", 0x00, INSTR_SSF_RRDRD },
1246 { "ectg", 0x01, INSTR_SSF_RRDRD }, 1246 { "ectg", 0x01, INSTR_SSF_RRDRD },
@@ -1251,7 +1251,7 @@ static struct insn opcode_c8[] = {
1251 { "", 0, INSTR_INVALID } 1251 { "", 0, INSTR_INVALID }
1252}; 1252};
1253 1253
1254static struct insn opcode_cc[] = { 1254static struct s390_insn opcode_cc[] = {
1255#ifdef CONFIG_64BIT 1255#ifdef CONFIG_64BIT
1256 { "brcth", 0x06, INSTR_RIL_RP }, 1256 { "brcth", 0x06, INSTR_RIL_RP },
1257 { "aih", 0x08, INSTR_RIL_RI }, 1257 { "aih", 0x08, INSTR_RIL_RI },
@@ -1263,7 +1263,7 @@ static struct insn opcode_cc[] = {
1263 { "", 0, INSTR_INVALID } 1263 { "", 0, INSTR_INVALID }
1264}; 1264};
1265 1265
1266static struct insn opcode_e3[] = { 1266static struct s390_insn opcode_e3[] = {
1267#ifdef CONFIG_64BIT 1267#ifdef CONFIG_64BIT
1268 { "ltg", 0x02, INSTR_RXY_RRRD }, 1268 { "ltg", 0x02, INSTR_RXY_RRRD },
1269 { "lrag", 0x03, INSTR_RXY_RRRD }, 1269 { "lrag", 0x03, INSTR_RXY_RRRD },
@@ -1369,7 +1369,7 @@ static struct insn opcode_e3[] = {
1369 { "", 0, INSTR_INVALID } 1369 { "", 0, INSTR_INVALID }
1370}; 1370};
1371 1371
1372static struct insn opcode_e5[] = { 1372static struct s390_insn opcode_e5[] = {
1373#ifdef CONFIG_64BIT 1373#ifdef CONFIG_64BIT
1374 { "strag", 0x02, INSTR_SSE_RDRD }, 1374 { "strag", 0x02, INSTR_SSE_RDRD },
1375 { "mvhhi", 0x44, INSTR_SIL_RDI }, 1375 { "mvhhi", 0x44, INSTR_SIL_RDI },
@@ -1391,7 +1391,7 @@ static struct insn opcode_e5[] = {
1391 { "", 0, INSTR_INVALID } 1391 { "", 0, INSTR_INVALID }
1392}; 1392};
1393 1393
1394static struct insn opcode_eb[] = { 1394static struct s390_insn opcode_eb[] = {
1395#ifdef CONFIG_64BIT 1395#ifdef CONFIG_64BIT
1396 { "lmg", 0x04, INSTR_RSY_RRRD }, 1396 { "lmg", 0x04, INSTR_RSY_RRRD },
1397 { "srag", 0x0a, INSTR_RSY_RRRD }, 1397 { "srag", 0x0a, INSTR_RSY_RRRD },
@@ -1465,7 +1465,7 @@ static struct insn opcode_eb[] = {
1465 { "", 0, INSTR_INVALID } 1465 { "", 0, INSTR_INVALID }
1466}; 1466};
1467 1467
1468static struct insn opcode_ec[] = { 1468static struct s390_insn opcode_ec[] = {
1469#ifdef CONFIG_64BIT 1469#ifdef CONFIG_64BIT
1470 { "brxhg", 0x44, INSTR_RIE_RRP }, 1470 { "brxhg", 0x44, INSTR_RIE_RRP },
1471 { "brxlg", 0x45, INSTR_RIE_RRP }, 1471 { "brxlg", 0x45, INSTR_RIE_RRP },
@@ -1504,7 +1504,7 @@ static struct insn opcode_ec[] = {
1504 { "", 0, INSTR_INVALID } 1504 { "", 0, INSTR_INVALID }
1505}; 1505};
1506 1506
1507static struct insn opcode_ed[] = { 1507static struct s390_insn opcode_ed[] = {
1508#ifdef CONFIG_64BIT 1508#ifdef CONFIG_64BIT
1509 { "mayl", 0x38, INSTR_RXF_FRRDF }, 1509 { "mayl", 0x38, INSTR_RXF_FRRDF },
1510 { "myl", 0x39, INSTR_RXF_FRRDF }, 1510 { "myl", 0x39, INSTR_RXF_FRRDF },
@@ -1572,7 +1572,7 @@ static struct insn opcode_ed[] = {
1572 1572
1573/* Extracts an operand value from an instruction. */ 1573/* Extracts an operand value from an instruction. */
1574static unsigned int extract_operand(unsigned char *code, 1574static unsigned int extract_operand(unsigned char *code,
1575 const struct operand *operand) 1575 const struct s390_operand *operand)
1576{ 1576{
1577 unsigned int val; 1577 unsigned int val;
1578 int bits; 1578 int bits;
@@ -1613,11 +1613,11 @@ static inline int insn_length(unsigned char code)
1613 return ((((int) code + 64) >> 7) + 1) << 1; 1613 return ((((int) code + 64) >> 7) + 1) << 1;
1614} 1614}
1615 1615
1616static struct insn *find_insn(unsigned char *code) 1616static struct s390_insn *find_insn(unsigned char *code)
1617{ 1617{
1618 unsigned char opfrag = code[1]; 1618 unsigned char opfrag = code[1];
1619 unsigned char opmask; 1619 unsigned char opmask;
1620 struct insn *table; 1620 struct s390_insn *table;
1621 1621
1622 switch (code[0]) { 1622 switch (code[0]) {
1623 case 0x01: 1623 case 0x01:
@@ -1706,7 +1706,7 @@ static struct insn *find_insn(unsigned char *code)
1706 */ 1706 */
1707int insn_to_mnemonic(unsigned char *instruction, char *buf, unsigned int len) 1707int insn_to_mnemonic(unsigned char *instruction, char *buf, unsigned int len)
1708{ 1708{
1709 struct insn *insn; 1709 struct s390_insn *insn;
1710 1710
1711 insn = find_insn(instruction); 1711 insn = find_insn(instruction);
1712 if (!insn) 1712 if (!insn)
@@ -1722,9 +1722,9 @@ EXPORT_SYMBOL_GPL(insn_to_mnemonic);
1722 1722
1723static int print_insn(char *buffer, unsigned char *code, unsigned long addr) 1723static int print_insn(char *buffer, unsigned char *code, unsigned long addr)
1724{ 1724{
1725 struct insn *insn; 1725 struct s390_insn *insn;
1726 const unsigned char *ops; 1726 const unsigned char *ops;
1727 const struct operand *operand; 1727 const struct s390_operand *operand;
1728 unsigned int value; 1728 unsigned int value;
1729 char separator; 1729 char separator;
1730 char *ptr; 1730 char *ptr;