diff options
author | Liu Yu <yu.liu@freescale.com> | 2011-09-05 05:01:21 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2011-10-07 00:36:37 -0400 |
commit | b430abc4d10537992a5ba38eff6c46b3c9009a19 (patch) | |
tree | 8638fa58199ac3e7afa4fa17c486e580c24a0d7b /arch/powerpc/math-emu | |
parent | d31337657ba931253e6dd8c5b1e856c121e41bf8 (diff) |
powerpc/math_emu/efp: Use pr_debug instead of printk
Signed-off-by: Liu Yu <yu.liu@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/math-emu')
-rw-r--r-- | arch/powerpc/math-emu/math_efp.c | 83 |
1 files changed, 37 insertions, 46 deletions
diff --git a/arch/powerpc/math-emu/math_efp.c b/arch/powerpc/math-emu/math_efp.c index 62279200d965..10fda0f13a00 100644 --- a/arch/powerpc/math-emu/math_efp.c +++ b/arch/powerpc/math-emu/math_efp.c | |||
@@ -212,12 +212,10 @@ int do_spe_mathemu(struct pt_regs *regs) | |||
212 | 212 | ||
213 | __FPU_FPSCR = mfspr(SPRN_SPEFSCR); | 213 | __FPU_FPSCR = mfspr(SPRN_SPEFSCR); |
214 | 214 | ||
215 | #ifdef DEBUG | 215 | pr_debug("speinsn:%08lx spefscr:%08lx\n", speinsn, __FPU_FPSCR); |
216 | printk("speinsn:%08lx spefscr:%08lx\n", speinsn, __FPU_FPSCR); | 216 | pr_debug("vc: %08x %08x\n", vc.wp[0], vc.wp[1]); |
217 | printk("vc: %08x %08x\n", vc.wp[0], vc.wp[1]); | 217 | pr_debug("va: %08x %08x\n", va.wp[0], va.wp[1]); |
218 | printk("va: %08x %08x\n", va.wp[0], va.wp[1]); | 218 | pr_debug("vb: %08x %08x\n", vb.wp[0], vb.wp[1]); |
219 | printk("vb: %08x %08x\n", vb.wp[0], vb.wp[1]); | ||
220 | #endif | ||
221 | 219 | ||
222 | switch (src) { | 220 | switch (src) { |
223 | case SPFP: { | 221 | case SPFP: { |
@@ -235,10 +233,8 @@ int do_spe_mathemu(struct pt_regs *regs) | |||
235 | break; | 233 | break; |
236 | } | 234 | } |
237 | 235 | ||
238 | #ifdef DEBUG | 236 | pr_debug("SA: %ld %08lx %ld (%ld)\n", SA_s, SA_f, SA_e, SA_c); |
239 | printk("SA: %ld %08lx %ld (%ld)\n", SA_s, SA_f, SA_e, SA_c); | 237 | pr_debug("SB: %ld %08lx %ld (%ld)\n", SB_s, SB_f, SB_e, SB_c); |
240 | printk("SB: %ld %08lx %ld (%ld)\n", SB_s, SB_f, SB_e, SB_c); | ||
241 | #endif | ||
242 | 238 | ||
243 | switch (func) { | 239 | switch (func) { |
244 | case EFSABS: | 240 | case EFSABS: |
@@ -305,10 +301,10 @@ int do_spe_mathemu(struct pt_regs *regs) | |||
305 | FP_DECL_D(DB); | 301 | FP_DECL_D(DB); |
306 | FP_CLEAR_EXCEPTIONS; | 302 | FP_CLEAR_EXCEPTIONS; |
307 | FP_UNPACK_DP(DB, vb.dp); | 303 | FP_UNPACK_DP(DB, vb.dp); |
308 | #ifdef DEBUG | 304 | |
309 | printk("DB: %ld %08lx %08lx %ld (%ld)\n", | 305 | pr_debug("DB: %ld %08lx %08lx %ld (%ld)\n", |
310 | DB_s, DB_f1, DB_f0, DB_e, DB_c); | 306 | DB_s, DB_f1, DB_f0, DB_e, DB_c); |
311 | #endif | 307 | |
312 | FP_CONV(S, D, 1, 2, SR, DB); | 308 | FP_CONV(S, D, 1, 2, SR, DB); |
313 | goto pack_s; | 309 | goto pack_s; |
314 | } | 310 | } |
@@ -332,9 +328,8 @@ int do_spe_mathemu(struct pt_regs *regs) | |||
332 | break; | 328 | break; |
333 | 329 | ||
334 | pack_s: | 330 | pack_s: |
335 | #ifdef DEBUG | 331 | pr_debug("SR: %ld %08lx %ld (%ld)\n", SR_s, SR_f, SR_e, SR_c); |
336 | printk("SR: %ld %08lx %ld (%ld)\n", SR_s, SR_f, SR_e, SR_c); | 332 | |
337 | #endif | ||
338 | FP_PACK_SP(vc.wp + 1, SR); | 333 | FP_PACK_SP(vc.wp + 1, SR); |
339 | goto update_regs; | 334 | goto update_regs; |
340 | 335 | ||
@@ -365,12 +360,10 @@ cmp_s: | |||
365 | break; | 360 | break; |
366 | } | 361 | } |
367 | 362 | ||
368 | #ifdef DEBUG | 363 | pr_debug("DA: %ld %08lx %08lx %ld (%ld)\n", |
369 | printk("DA: %ld %08lx %08lx %ld (%ld)\n", | ||
370 | DA_s, DA_f1, DA_f0, DA_e, DA_c); | 364 | DA_s, DA_f1, DA_f0, DA_e, DA_c); |
371 | printk("DB: %ld %08lx %08lx %ld (%ld)\n", | 365 | pr_debug("DB: %ld %08lx %08lx %ld (%ld)\n", |
372 | DB_s, DB_f1, DB_f0, DB_e, DB_c); | 366 | DB_s, DB_f1, DB_f0, DB_e, DB_c); |
373 | #endif | ||
374 | 367 | ||
375 | switch (func) { | 368 | switch (func) { |
376 | case EFDABS: | 369 | case EFDABS: |
@@ -438,10 +431,10 @@ cmp_s: | |||
438 | FP_DECL_S(SB); | 431 | FP_DECL_S(SB); |
439 | FP_CLEAR_EXCEPTIONS; | 432 | FP_CLEAR_EXCEPTIONS; |
440 | FP_UNPACK_SP(SB, vb.wp + 1); | 433 | FP_UNPACK_SP(SB, vb.wp + 1); |
441 | #ifdef DEBUG | 434 | |
442 | printk("SB: %ld %08lx %ld (%ld)\n", | 435 | pr_debug("SB: %ld %08lx %ld (%ld)\n", |
443 | SB_s, SB_f, SB_e, SB_c); | 436 | SB_s, SB_f, SB_e, SB_c); |
444 | #endif | 437 | |
445 | FP_CONV(D, S, 2, 1, DR, SB); | 438 | FP_CONV(D, S, 2, 1, DR, SB); |
446 | goto pack_d; | 439 | goto pack_d; |
447 | } | 440 | } |
@@ -471,10 +464,9 @@ cmp_s: | |||
471 | break; | 464 | break; |
472 | 465 | ||
473 | pack_d: | 466 | pack_d: |
474 | #ifdef DEBUG | 467 | pr_debug("DR: %ld %08lx %08lx %ld (%ld)\n", |
475 | printk("DR: %ld %08lx %08lx %ld (%ld)\n", | ||
476 | DR_s, DR_f1, DR_f0, DR_e, DR_c); | 468 | DR_s, DR_f1, DR_f0, DR_e, DR_c); |
477 | #endif | 469 | |
478 | FP_PACK_DP(vc.dp, DR); | 470 | FP_PACK_DP(vc.dp, DR); |
479 | goto update_regs; | 471 | goto update_regs; |
480 | 472 | ||
@@ -511,12 +503,14 @@ cmp_d: | |||
511 | break; | 503 | break; |
512 | } | 504 | } |
513 | 505 | ||
514 | #ifdef DEBUG | 506 | pr_debug("SA0: %ld %08lx %ld (%ld)\n", |
515 | printk("SA0: %ld %08lx %ld (%ld)\n", SA0_s, SA0_f, SA0_e, SA0_c); | 507 | SA0_s, SA0_f, SA0_e, SA0_c); |
516 | printk("SA1: %ld %08lx %ld (%ld)\n", SA1_s, SA1_f, SA1_e, SA1_c); | 508 | pr_debug("SA1: %ld %08lx %ld (%ld)\n", |
517 | printk("SB0: %ld %08lx %ld (%ld)\n", SB0_s, SB0_f, SB0_e, SB0_c); | 509 | SA1_s, SA1_f, SA1_e, SA1_c); |
518 | printk("SB1: %ld %08lx %ld (%ld)\n", SB1_s, SB1_f, SB1_e, SB1_c); | 510 | pr_debug("SB0: %ld %08lx %ld (%ld)\n", |
519 | #endif | 511 | SB0_s, SB0_f, SB0_e, SB0_c); |
512 | pr_debug("SB1: %ld %08lx %ld (%ld)\n", | ||
513 | SB1_s, SB1_f, SB1_e, SB1_c); | ||
520 | 514 | ||
521 | switch (func) { | 515 | switch (func) { |
522 | case EVFSABS: | 516 | case EVFSABS: |
@@ -605,10 +599,11 @@ cmp_d: | |||
605 | break; | 599 | break; |
606 | 600 | ||
607 | pack_vs: | 601 | pack_vs: |
608 | #ifdef DEBUG | 602 | pr_debug("SR0: %ld %08lx %ld (%ld)\n", |
609 | printk("SR0: %ld %08lx %ld (%ld)\n", SR0_s, SR0_f, SR0_e, SR0_c); | 603 | SR0_s, SR0_f, SR0_e, SR0_c); |
610 | printk("SR1: %ld %08lx %ld (%ld)\n", SR1_s, SR1_f, SR1_e, SR1_c); | 604 | pr_debug("SR1: %ld %08lx %ld (%ld)\n", |
611 | #endif | 605 | SR1_s, SR1_f, SR1_e, SR1_c); |
606 | |||
612 | FP_PACK_SP(vc.wp, SR0); | 607 | FP_PACK_SP(vc.wp, SR0); |
613 | FP_PACK_SP(vc.wp + 1, SR1); | 608 | FP_PACK_SP(vc.wp + 1, SR1); |
614 | goto update_regs; | 609 | goto update_regs; |
@@ -646,14 +641,12 @@ update_regs: | |||
646 | current->thread.evr[fc] = vc.wp[0]; | 641 | current->thread.evr[fc] = vc.wp[0]; |
647 | regs->gpr[fc] = vc.wp[1]; | 642 | regs->gpr[fc] = vc.wp[1]; |
648 | 643 | ||
649 | #ifdef DEBUG | 644 | pr_debug("ccr = %08lx\n", regs->ccr); |
650 | printk("ccr = %08lx\n", regs->ccr); | 645 | pr_debug("cur exceptions = %08x spefscr = %08lx\n", |
651 | printk("cur exceptions = %08x spefscr = %08lx\n", | ||
652 | FP_CUR_EXCEPTIONS, __FPU_FPSCR); | 646 | FP_CUR_EXCEPTIONS, __FPU_FPSCR); |
653 | printk("vc: %08x %08x\n", vc.wp[0], vc.wp[1]); | 647 | pr_debug("vc: %08x %08x\n", vc.wp[0], vc.wp[1]); |
654 | printk("va: %08x %08x\n", va.wp[0], va.wp[1]); | 648 | pr_debug("va: %08x %08x\n", va.wp[0], va.wp[1]); |
655 | printk("vb: %08x %08x\n", vb.wp[0], vb.wp[1]); | 649 | pr_debug("vb: %08x %08x\n", vb.wp[0], vb.wp[1]); |
656 | #endif | ||
657 | 650 | ||
658 | return 0; | 651 | return 0; |
659 | 652 | ||
@@ -661,9 +654,7 @@ illegal: | |||
661 | if (have_e500_cpu_a005_erratum) { | 654 | if (have_e500_cpu_a005_erratum) { |
662 | /* according to e500 cpu a005 erratum, reissue efp inst */ | 655 | /* according to e500 cpu a005 erratum, reissue efp inst */ |
663 | regs->nip -= 4; | 656 | regs->nip -= 4; |
664 | #ifdef DEBUG | 657 | pr_debug("re-issue efp inst: %08lx\n", speinsn); |
665 | printk(KERN_DEBUG "re-issue efp inst: %08lx\n", speinsn); | ||
666 | #endif | ||
667 | return 0; | 658 | return 0; |
668 | } | 659 | } |
669 | 660 | ||