Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Blackfin: make hardware trace output a little more useful

Decode the vast majority of insns that appear in the trace buffer to get a
better idea of what's going on at a glance.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

authored by

Robin Getz and committed by
Mike Frysinger
9a95e2f1 d60805ad

+447 -68
+3 -3
arch/blackfin/include/asm/trace.h
··· 25 25 extern unsigned long software_trace_buff[]; 26 26 #if defined(CONFIG_DEBUG_VERBOSE) 27 27 extern void decode_address(char *buf, unsigned long address); 28 - extern bool get_instruction(unsigned short *val, unsigned short *address); 28 + extern bool get_instruction(unsigned int *val, unsigned short *address); 29 29 #else 30 - #define decode_address(buf, address) 31 - #define get_instruction(val, address) 0 30 + static inline void decode_address(char *buf, unsigned long address) { } 31 + static inline bool get_instruction(unsigned int *val, unsigned short *address) { return false; } 32 32 #endif 33 33 34 34 /* Trace Macros for C files */
+4 -11
arch/blackfin/kernel/dumpstack.c
··· 18 18 */ 19 19 static bool is_bfin_call(unsigned short *addr) 20 20 { 21 - unsigned short opcode = 0, *ins_addr; 22 - ins_addr = (unsigned short *)addr; 21 + unsigned int opcode; 23 22 24 - if (!get_instruction(&opcode, ins_addr)) 23 + if (!get_instruction(&opcode, addr)) 25 24 return false; 26 25 27 26 if ((opcode >= 0x0060 && opcode <= 0x0067) || 28 - (opcode >= 0x0070 && opcode <= 0x0077)) 29 - return true; 30 - 31 - ins_addr--; 32 - if (!get_instruction(&opcode, ins_addr)) 33 - return false; 34 - 35 - if (opcode >= 0xE300 && opcode <= 0xE3FF) 27 + (opcode >= 0x0070 && opcode <= 0x0077) || 28 + (opcode >= 0xE3000000 && opcode <= 0xE3FFFFFF)) 36 29 return true; 37 30 38 31 return false;
+439 -53
arch/blackfin/kernel/trace.c
··· 75 75 } else if (address >= L1_ROM_START && address < L1_ROM_START + L1_ROM_LENGTH) { 76 76 strcat(buf, "/* on-chip L1 ROM */"); 77 77 return; 78 + 79 + } else if (address >= L1_SCRATCH_START && address < L1_SCRATCH_START + L1_SCRATCH_LENGTH) { 80 + strcat(buf, "/* on-chip scratchpad */"); 81 + return; 82 + 83 + } else if (address >= physical_mem_end && address < ASYNC_BANK0_BASE) { 84 + strcat(buf, "/* unconnected memory */"); 85 + return; 86 + 87 + } else if (address >= ASYNC_BANK3_BASE + ASYNC_BANK3_SIZE && address < BOOT_ROM_START) { 88 + strcat(buf, "/* reserved memory */"); 89 + return; 90 + 91 + } else if (address >= L1_DATA_A_START && address < L1_DATA_A_START + L1_DATA_A_LENGTH) { 92 + strcat(buf, "/* on-chip Data Bank A */"); 93 + return; 94 + 95 + } else if (address >= L1_DATA_B_START && address < L1_DATA_B_START + L1_DATA_B_LENGTH) { 96 + strcat(buf, "/* on-chip Data Bank B */"); 97 + return; 78 98 } 79 99 80 100 /* ··· 193 173 * Similar to get_user, do some address checking, then dereference 194 174 * Return true on success, false on bad address 195 175 */ 196 - bool get_instruction(unsigned short *val, unsigned short *address) 176 + bool get_mem16(unsigned short *val, unsigned short *address) 197 177 { 198 178 unsigned long addr = (unsigned long)address; 199 179 200 180 /* Check for odd addresses */ 201 181 if (addr & 0x1) 202 - return false; 203 - 204 - /* MMR region will never have instructions */ 205 - if (addr >= SYSMMR_BASE) 206 182 return false; 207 183 208 184 switch (bfin_mem_access_type(addr, 2)) { ··· 217 201 } 218 202 } 219 203 204 + bool get_instruction(unsigned int *val, unsigned short *address) 205 + { 206 + unsigned long addr = (unsigned long)address; 207 + unsigned short opcode0, opcode1; 208 + 209 + /* Check for odd addresses */ 210 + if (addr & 0x1) 211 + return false; 212 + 213 + /* MMR region will never have instructions */ 214 + if (addr >= SYSMMR_BASE) 215 + return false; 216 + 217 + /* Scratchpad will never have instructions */ 218 + if (addr >= L1_SCRATCH_START && addr < L1_SCRATCH_START + L1_SCRATCH_LENGTH) 219 + return false; 220 + 221 + /* Data banks will never have instructions */ 222 + if (addr >= BOOT_ROM_START + BOOT_ROM_LENGTH && addr < L1_CODE_START) 223 + return false; 224 + 225 + if (!get_mem16(&opcode0, address)) 226 + return false; 227 + 228 + /* was this a 32-bit instruction? If so, get the next 16 bits */ 229 + if ((opcode0 & 0xc000) == 0xc000) { 230 + if (!get_mem16(&opcode1, address + 1)) 231 + return false; 232 + *val = (opcode0 << 16) + opcode1; 233 + } else 234 + *val = opcode0; 235 + 236 + return true; 237 + } 238 + 239 + #if defined(CONFIG_DEBUG_BFIN_HWTRACE_ON) 220 240 /* 221 241 * decode the instruction if we are printing out the trace, as it 222 242 * makes things easier to follow, without running it through objdump 223 - * These are the normal instructions which cause change of flow, which 224 - * would be at the source of the trace buffer 243 + * Decode the change of flow, and the common load/store instructions 244 + * which are the main cause for faults, and discontinuities in the trace 245 + * buffer. 225 246 */ 226 - #if defined(CONFIG_DEBUG_BFIN_HWTRACE_ON) 227 - static void decode_instruction(unsigned short *address) 228 - { 229 - unsigned short opcode; 230 247 231 - if (get_instruction(&opcode, address)) { 232 - if (opcode == 0x0010) 233 - pr_cont("RTS"); 234 - else if (opcode == 0x0011) 235 - pr_cont("RTI"); 236 - else if (opcode == 0x0012) 237 - pr_cont("RTX"); 238 - else if (opcode == 0x0013) 239 - pr_cont("RTN"); 240 - else if (opcode == 0x0014) 241 - pr_cont("RTE"); 242 - else if (opcode == 0x0025) 243 - pr_cont("EMUEXCPT"); 244 - else if (opcode >= 0x0040 && opcode <= 0x0047) 245 - pr_cont("STI R%i", opcode & 7); 246 - else if (opcode >= 0x0050 && opcode <= 0x0057) 247 - pr_cont("JUMP (P%i)", opcode & 7); 248 - else if (opcode >= 0x0060 && opcode <= 0x0067) 249 - pr_cont("CALL (P%i)", opcode & 7); 250 - else if (opcode >= 0x0070 && opcode <= 0x0077) 251 - pr_cont("CALL (PC+P%i)", opcode & 7); 252 - else if (opcode >= 0x0080 && opcode <= 0x0087) 253 - pr_cont("JUMP (PC+P%i)", opcode & 7); 254 - else if (opcode >= 0x0090 && opcode <= 0x009F) 255 - pr_cont("RAISE 0x%x", opcode & 0xF); 256 - else if (opcode >= 0x00A0 && opcode <= 0x00AF) 257 - pr_cont("EXCPT 0x%x", opcode & 0xF); 258 - else if ((opcode >= 0x1000 && opcode <= 0x13FF) || (opcode >= 0x1800 && opcode <= 0x1BFF)) 259 - pr_cont("IF !CC JUMP"); 260 - else if ((opcode >= 0x1400 && opcode <= 0x17ff) || (opcode >= 0x1c00 && opcode <= 0x1fff)) 261 - pr_cont("IF CC JUMP"); 262 - else if (opcode >= 0x2000 && opcode <= 0x2fff) 263 - pr_cont("JUMP.S"); 264 - else if (opcode >= 0xe080 && opcode <= 0xe0ff) 265 - pr_cont("LSETUP"); 266 - else if (opcode >= 0xe200 && opcode <= 0xe2ff) 267 - pr_cont("JUMP.L"); 268 - else if (opcode >= 0xe300 && opcode <= 0xe3ff) 269 - pr_cont("CALL pcrel"); 270 - else 271 - pr_cont("0x%04x", opcode); 248 + #define ProgCtrl_opcode 0x0000 249 + #define ProgCtrl_poprnd_bits 0 250 + #define ProgCtrl_poprnd_mask 0xf 251 + #define ProgCtrl_prgfunc_bits 4 252 + #define ProgCtrl_prgfunc_mask 0xf 253 + #define ProgCtrl_code_bits 8 254 + #define ProgCtrl_code_mask 0xff 255 + 256 + static void decode_ProgCtrl_0(unsigned int opcode) 257 + { 258 + int poprnd = ((opcode >> ProgCtrl_poprnd_bits) & ProgCtrl_poprnd_mask); 259 + int prgfunc = ((opcode >> ProgCtrl_prgfunc_bits) & ProgCtrl_prgfunc_mask); 260 + 261 + if (prgfunc == 0 && poprnd == 0) 262 + pr_cont("NOP"); 263 + else if (prgfunc == 1 && poprnd == 0) 264 + pr_cont("RTS"); 265 + else if (prgfunc == 1 && poprnd == 1) 266 + pr_cont("RTI"); 267 + else if (prgfunc == 1 && poprnd == 2) 268 + pr_cont("RTX"); 269 + else if (prgfunc == 1 && poprnd == 3) 270 + pr_cont("RTN"); 271 + else if (prgfunc == 1 && poprnd == 4) 272 + pr_cont("RTE"); 273 + else if (prgfunc == 2 && poprnd == 0) 274 + pr_cont("IDLE"); 275 + else if (prgfunc == 2 && poprnd == 3) 276 + pr_cont("CSYNC"); 277 + else if (prgfunc == 2 && poprnd == 4) 278 + pr_cont("SSYNC"); 279 + else if (prgfunc == 2 && poprnd == 5) 280 + pr_cont("EMUEXCPT"); 281 + else if (prgfunc == 3) 282 + pr_cont("CLI R%i", poprnd); 283 + else if (prgfunc == 4) 284 + pr_cont("STI R%i", poprnd); 285 + else if (prgfunc == 5) 286 + pr_cont("JUMP (P%i)", poprnd); 287 + else if (prgfunc == 6) 288 + pr_cont("CALL (P%i)", poprnd); 289 + else if (prgfunc == 7) 290 + pr_cont("CALL (PC + P%i)", poprnd); 291 + else if (prgfunc == 8) 292 + pr_cont("JUMP (PC + P%i", poprnd); 293 + else if (prgfunc == 9) 294 + pr_cont("RAISE %i", poprnd); 295 + else if (prgfunc == 10) 296 + pr_cont("EXCPT %i", poprnd); 297 + else 298 + pr_cont("0x%04x", opcode); 299 + 300 + } 301 + 302 + #define BRCC_opcode 0x1000 303 + #define BRCC_offset_bits 0 304 + #define BRCC_offset_mask 0x3ff 305 + #define BRCC_B_bits 10 306 + #define BRCC_B_mask 0x1 307 + #define BRCC_T_bits 11 308 + #define BRCC_T_mask 0x1 309 + #define BRCC_code_bits 12 310 + #define BRCC_code_mask 0xf 311 + 312 + static void decode_BRCC_0(unsigned int opcode) 313 + { 314 + int B = ((opcode >> BRCC_B_bits) & BRCC_B_mask); 315 + int T = ((opcode >> BRCC_T_bits) & BRCC_T_mask); 316 + 317 + pr_cont("IF %sCC JUMP pcrel %s", T ? "" : "!", B ? "(BP)" : ""); 318 + } 319 + 320 + #define CALLa_opcode 0xe2000000 321 + #define CALLa_addr_bits 0 322 + #define CALLa_addr_mask 0xffffff 323 + #define CALLa_S_bits 24 324 + #define CALLa_S_mask 0x1 325 + #define CALLa_code_bits 25 326 + #define CALLa_code_mask 0x7f 327 + 328 + static void decode_CALLa_0(unsigned int opcode) 329 + { 330 + int S = ((opcode >> (CALLa_S_bits - 16)) & CALLa_S_mask); 331 + 332 + if (S) 333 + pr_cont("CALL pcrel"); 334 + else 335 + pr_cont("JUMP.L"); 336 + } 337 + 338 + #define LoopSetup_opcode 0xe0800000 339 + #define LoopSetup_eoffset_bits 0 340 + #define LoopSetup_eoffset_mask 0x3ff 341 + #define LoopSetup_dontcare_bits 10 342 + #define LoopSetup_dontcare_mask 0x3 343 + #define LoopSetup_reg_bits 12 344 + #define LoopSetup_reg_mask 0xf 345 + #define LoopSetup_soffset_bits 16 346 + #define LoopSetup_soffset_mask 0xf 347 + #define LoopSetup_c_bits 20 348 + #define LoopSetup_c_mask 0x1 349 + #define LoopSetup_rop_bits 21 350 + #define LoopSetup_rop_mask 0x3 351 + #define LoopSetup_code_bits 23 352 + #define LoopSetup_code_mask 0x1ff 353 + 354 + static void decode_LoopSetup_0(unsigned int opcode) 355 + { 356 + int c = ((opcode >> LoopSetup_c_bits) & LoopSetup_c_mask); 357 + int reg = ((opcode >> LoopSetup_reg_bits) & LoopSetup_reg_mask); 358 + int rop = ((opcode >> LoopSetup_rop_bits) & LoopSetup_rop_mask); 359 + 360 + pr_cont("LSETUP <> LC%i", c); 361 + if ((rop & 1) == 1) 362 + pr_cont("= P%i", reg); 363 + if ((rop & 2) == 2) 364 + pr_cont(" >> 0x1"); 365 + } 366 + 367 + #define DspLDST_opcode 0x9c00 368 + #define DspLDST_reg_bits 0 369 + #define DspLDST_reg_mask 0x7 370 + #define DspLDST_i_bits 3 371 + #define DspLDST_i_mask 0x3 372 + #define DspLDST_m_bits 5 373 + #define DspLDST_m_mask 0x3 374 + #define DspLDST_aop_bits 7 375 + #define DspLDST_aop_mask 0x3 376 + #define DspLDST_W_bits 9 377 + #define DspLDST_W_mask 0x1 378 + #define DspLDST_code_bits 10 379 + #define DspLDST_code_mask 0x3f 380 + 381 + static void decode_dspLDST_0(unsigned int opcode) 382 + { 383 + int i = ((opcode >> DspLDST_i_bits) & DspLDST_i_mask); 384 + int m = ((opcode >> DspLDST_m_bits) & DspLDST_m_mask); 385 + int W = ((opcode >> DspLDST_W_bits) & DspLDST_W_mask); 386 + int aop = ((opcode >> DspLDST_aop_bits) & DspLDST_aop_mask); 387 + int reg = ((opcode >> DspLDST_reg_bits) & DspLDST_reg_mask); 388 + 389 + if (W == 0) { 390 + pr_cont("R%i", reg); 391 + switch (m) { 392 + case 0: 393 + pr_cont(" = "); 394 + break; 395 + case 1: 396 + pr_cont(".L = "); 397 + break; 398 + case 2: 399 + pr_cont(".W = "); 400 + break; 401 + } 272 402 } 273 403 404 + pr_cont("[ I%i", i); 405 + 406 + switch (aop) { 407 + case 0: 408 + pr_cont("++ ]"); 409 + break; 410 + case 1: 411 + pr_cont("-- ]"); 412 + break; 413 + } 414 + 415 + if (W == 1) { 416 + pr_cont(" = R%i", reg); 417 + switch (m) { 418 + case 1: 419 + pr_cont(".L = "); 420 + break; 421 + case 2: 422 + pr_cont(".W = "); 423 + break; 424 + } 425 + } 426 + } 427 + 428 + #define LDST_opcode 0x9000 429 + #define LDST_reg_bits 0 430 + #define LDST_reg_mask 0x7 431 + #define LDST_ptr_bits 3 432 + #define LDST_ptr_mask 0x7 433 + #define LDST_Z_bits 6 434 + #define LDST_Z_mask 0x1 435 + #define LDST_aop_bits 7 436 + #define LDST_aop_mask 0x3 437 + #define LDST_W_bits 9 438 + #define LDST_W_mask 0x1 439 + #define LDST_sz_bits 10 440 + #define LDST_sz_mask 0x3 441 + #define LDST_code_bits 12 442 + #define LDST_code_mask 0xf 443 + 444 + static void decode_LDST_0(unsigned int opcode) 445 + { 446 + int Z = ((opcode >> LDST_Z_bits) & LDST_Z_mask); 447 + int W = ((opcode >> LDST_W_bits) & LDST_W_mask); 448 + int sz = ((opcode >> LDST_sz_bits) & LDST_sz_mask); 449 + int aop = ((opcode >> LDST_aop_bits) & LDST_aop_mask); 450 + int reg = ((opcode >> LDST_reg_bits) & LDST_reg_mask); 451 + int ptr = ((opcode >> LDST_ptr_bits) & LDST_ptr_mask); 452 + 453 + if (W == 0) 454 + pr_cont("%s%i = ", (sz == 0 && Z == 1) ? "P" : "R", reg); 455 + 456 + switch (sz) { 457 + case 1: 458 + pr_cont("W"); 459 + break; 460 + case 2: 461 + pr_cont("B"); 462 + break; 463 + } 464 + 465 + pr_cont("[P%i", ptr); 466 + 467 + switch (aop) { 468 + case 0: 469 + pr_cont("++"); 470 + break; 471 + case 1: 472 + pr_cont("--"); 473 + break; 474 + } 475 + pr_cont("]"); 476 + 477 + if (W == 1) 478 + pr_cont(" = %s%i ", (sz == 0 && Z == 1) ? "P" : "R", reg); 479 + 480 + if (sz) { 481 + if (Z) 482 + pr_cont(" (X)"); 483 + else 484 + pr_cont(" (Z)"); 485 + } 486 + } 487 + 488 + #define LDSTii_opcode 0xa000 489 + #define LDSTii_reg_bit 0 490 + #define LDSTii_reg_mask 0x7 491 + #define LDSTii_ptr_bit 3 492 + #define LDSTii_ptr_mask 0x7 493 + #define LDSTii_offset_bit 6 494 + #define LDSTii_offset_mask 0xf 495 + #define LDSTii_op_bit 10 496 + #define LDSTii_op_mask 0x3 497 + #define LDSTii_W_bit 12 498 + #define LDSTii_W_mask 0x1 499 + #define LDSTii_code_bit 13 500 + #define LDSTii_code_mask 0x7 501 + 502 + static void decode_LDSTii_0(unsigned int opcode) 503 + { 504 + int reg = ((opcode >> LDSTii_reg_bit) & LDSTii_reg_mask); 505 + int ptr = ((opcode >> LDSTii_ptr_bit) & LDSTii_ptr_mask); 506 + int offset = ((opcode >> LDSTii_offset_bit) & LDSTii_offset_mask); 507 + int op = ((opcode >> LDSTii_op_bit) & LDSTii_op_mask); 508 + int W = ((opcode >> LDSTii_W_bit) & LDSTii_W_mask); 509 + 510 + if (W == 0) { 511 + pr_cont("%s%i = %s[P%i + %i]", op == 3 ? "R" : "P", reg, 512 + op == 1 || op == 2 ? "" : "W", ptr, offset); 513 + if (op == 2) 514 + pr_cont("(Z)"); 515 + if (op == 3) 516 + pr_cont("(X)"); 517 + } else { 518 + pr_cont("%s[P%i + %i] = %s%i", op == 0 ? "" : "W", ptr, 519 + offset, op == 3 ? "P" : "R", reg); 520 + } 521 + } 522 + 523 + #define LDSTidxI_opcode 0xe4000000 524 + #define LDSTidxI_offset_bits 0 525 + #define LDSTidxI_offset_mask 0xffff 526 + #define LDSTidxI_reg_bits 16 527 + #define LDSTidxI_reg_mask 0x7 528 + #define LDSTidxI_ptr_bits 19 529 + #define LDSTidxI_ptr_mask 0x7 530 + #define LDSTidxI_sz_bits 22 531 + #define LDSTidxI_sz_mask 0x3 532 + #define LDSTidxI_Z_bits 24 533 + #define LDSTidxI_Z_mask 0x1 534 + #define LDSTidxI_W_bits 25 535 + #define LDSTidxI_W_mask 0x1 536 + #define LDSTidxI_code_bits 26 537 + #define LDSTidxI_code_mask 0x3f 538 + 539 + static void decode_LDSTidxI_0(unsigned int opcode) 540 + { 541 + int Z = ((opcode >> LDSTidxI_Z_bits) & LDSTidxI_Z_mask); 542 + int W = ((opcode >> LDSTidxI_W_bits) & LDSTidxI_W_mask); 543 + int sz = ((opcode >> LDSTidxI_sz_bits) & LDSTidxI_sz_mask); 544 + int reg = ((opcode >> LDSTidxI_reg_bits) & LDSTidxI_reg_mask); 545 + int ptr = ((opcode >> LDSTidxI_ptr_bits) & LDSTidxI_ptr_mask); 546 + int offset = ((opcode >> LDSTidxI_offset_bits) & LDSTidxI_offset_mask); 547 + 548 + if (W == 0) 549 + pr_cont("%s%i = ", sz == 0 && Z == 1 ? "P" : "R", reg); 550 + 551 + if (sz == 1) 552 + pr_cont("W"); 553 + if (sz == 2) 554 + pr_cont("B"); 555 + 556 + pr_cont("[P%i + %s0x%x]", ptr, offset & 0x20 ? "-" : "", 557 + (offset & 0x1f) << 2); 558 + 559 + if (W == 0 && sz != 0) { 560 + if (Z) 561 + pr_cont("(X)"); 562 + else 563 + pr_cont("(Z)"); 564 + } 565 + 566 + if (W == 1) 567 + pr_cont("= %s%i", (sz == 0 && Z == 1) ? "P" : "R", reg); 568 + 569 + } 570 + 571 + static void decode_opcode(unsigned int opcode) 572 + { 573 + #ifdef CONFIG_BUG 574 + if (opcode == BFIN_BUG_OPCODE) 575 + pr_cont("BUG"); 576 + else 577 + #endif 578 + if ((opcode & 0xffffff00) == ProgCtrl_opcode) 579 + decode_ProgCtrl_0(opcode); 580 + else if ((opcode & 0xfffff000) == BRCC_opcode) 581 + decode_BRCC_0(opcode); 582 + else if ((opcode & 0xfffff000) == 0x2000) 583 + pr_cont("JUMP.S"); 584 + else if ((opcode & 0xfe000000) == CALLa_opcode) 585 + decode_CALLa_0(opcode); 586 + else if ((opcode & 0xff8000C0) == LoopSetup_opcode) 587 + decode_LoopSetup_0(opcode); 588 + else if ((opcode & 0xfffffc00) == DspLDST_opcode) 589 + decode_dspLDST_0(opcode); 590 + else if ((opcode & 0xfffff000) == LDST_opcode) 591 + decode_LDST_0(opcode); 592 + else if ((opcode & 0xffffe000) == LDSTii_opcode) 593 + decode_LDSTii_0(opcode); 594 + else if ((opcode & 0xfc000000) == LDSTidxI_opcode) 595 + decode_LDSTidxI_0(opcode); 596 + else if (opcode & 0xffff0000) 597 + pr_cont("0x%08x", opcode); 598 + else 599 + pr_cont("0x%04x", opcode); 600 + } 601 + 602 + #define BIT_MULTI_INS 0x08000000 603 + static void decode_instruction(unsigned short *address) 604 + { 605 + unsigned int opcode; 606 + 607 + if (!get_instruction(&opcode, address)) 608 + return; 609 + 610 + decode_opcode(opcode); 611 + 612 + /* If things are a 32-bit instruction, it has the possibility of being 613 + * a multi-issue instruction (a 32-bit, and 2 16 bit instrucitions) 614 + * This test collidates with the unlink instruction, so disallow that 615 + */ 616 + if ((opcode & 0xc0000000) == 0xc0000000 && 617 + (opcode & BIT_MULTI_INS) && 618 + (opcode & 0xe8000000) != 0xe8000000) { 619 + pr_cont(" || "); 620 + if (!get_instruction(&opcode, address + 2)) 621 + return; 622 + decode_opcode(opcode); 623 + pr_cont(" || "); 624 + if (!get_instruction(&opcode, address + 3)) 625 + return; 626 + decode_opcode(opcode); 627 + } 274 628 } 275 629 #endif 276 630 ··· 783 397 if (!((unsigned long)addr & 0xF)) 784 398 pr_notice("0x%p: ", addr); 785 399 786 - if (!get_instruction(&val, addr)) { 400 + if (!get_mem16(&val, addr)) { 787 401 val = 0; 788 402 sprintf(buf, "????"); 789 403 } else
+1 -1
arch/blackfin/kernel/traps.c
··· 546 546 #ifdef CONFIG_BUG 547 547 int is_valid_bugaddr(unsigned long addr) 548 548 { 549 - unsigned short opcode; 549 + unsigned int opcode; 550 550 551 551 if (!get_instruction(&opcode, (unsigned short *)addr)) 552 552 return 0;