Commit b430abc4 authored by Liu Yu's avatar Liu Yu Committed by Kumar Gala

powerpc/math_emu/efp: Use pr_debug instead of printk

Signed-off-by: default avatarLiu Yu <yu.liu@freescale.com>
Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
parent d3133765
...@@ -212,12 +212,10 @@ int do_spe_mathemu(struct pt_regs *regs) ...@@ -212,12 +212,10 @@ int do_spe_mathemu(struct pt_regs *regs)
__FPU_FPSCR = mfspr(SPRN_SPEFSCR); __FPU_FPSCR = mfspr(SPRN_SPEFSCR);
#ifdef DEBUG pr_debug("speinsn:%08lx spefscr:%08lx\n", speinsn, __FPU_FPSCR);
printk("speinsn:%08lx spefscr:%08lx\n", speinsn, __FPU_FPSCR); pr_debug("vc: %08x %08x\n", vc.wp[0], vc.wp[1]);
printk("vc: %08x %08x\n", vc.wp[0], vc.wp[1]); pr_debug("va: %08x %08x\n", va.wp[0], va.wp[1]);
printk("va: %08x %08x\n", va.wp[0], va.wp[1]); pr_debug("vb: %08x %08x\n", vb.wp[0], vb.wp[1]);
printk("vb: %08x %08x\n", vb.wp[0], vb.wp[1]);
#endif
switch (src) { switch (src) {
case SPFP: { case SPFP: {
...@@ -235,10 +233,8 @@ int do_spe_mathemu(struct pt_regs *regs) ...@@ -235,10 +233,8 @@ int do_spe_mathemu(struct pt_regs *regs)
break; break;
} }
#ifdef DEBUG pr_debug("SA: %ld %08lx %ld (%ld)\n", SA_s, SA_f, SA_e, SA_c);
printk("SA: %ld %08lx %ld (%ld)\n", SA_s, SA_f, SA_e, SA_c); pr_debug("SB: %ld %08lx %ld (%ld)\n", SB_s, SB_f, SB_e, SB_c);
printk("SB: %ld %08lx %ld (%ld)\n", SB_s, SB_f, SB_e, SB_c);
#endif
switch (func) { switch (func) {
case EFSABS: case EFSABS:
...@@ -305,10 +301,10 @@ int do_spe_mathemu(struct pt_regs *regs) ...@@ -305,10 +301,10 @@ int do_spe_mathemu(struct pt_regs *regs)
FP_DECL_D(DB); FP_DECL_D(DB);
FP_CLEAR_EXCEPTIONS; FP_CLEAR_EXCEPTIONS;
FP_UNPACK_DP(DB, vb.dp); FP_UNPACK_DP(DB, vb.dp);
#ifdef DEBUG
printk("DB: %ld %08lx %08lx %ld (%ld)\n", pr_debug("DB: %ld %08lx %08lx %ld (%ld)\n",
DB_s, DB_f1, DB_f0, DB_e, DB_c); DB_s, DB_f1, DB_f0, DB_e, DB_c);
#endif
FP_CONV(S, D, 1, 2, SR, DB); FP_CONV(S, D, 1, 2, SR, DB);
goto pack_s; goto pack_s;
} }
...@@ -332,9 +328,8 @@ int do_spe_mathemu(struct pt_regs *regs) ...@@ -332,9 +328,8 @@ int do_spe_mathemu(struct pt_regs *regs)
break; break;
pack_s: pack_s:
#ifdef DEBUG pr_debug("SR: %ld %08lx %ld (%ld)\n", SR_s, SR_f, SR_e, SR_c);
printk("SR: %ld %08lx %ld (%ld)\n", SR_s, SR_f, SR_e, SR_c);
#endif
FP_PACK_SP(vc.wp + 1, SR); FP_PACK_SP(vc.wp + 1, SR);
goto update_regs; goto update_regs;
...@@ -365,12 +360,10 @@ int do_spe_mathemu(struct pt_regs *regs) ...@@ -365,12 +360,10 @@ int do_spe_mathemu(struct pt_regs *regs)
break; break;
} }
#ifdef DEBUG pr_debug("DA: %ld %08lx %08lx %ld (%ld)\n",
printk("DA: %ld %08lx %08lx %ld (%ld)\n",
DA_s, DA_f1, DA_f0, DA_e, DA_c); DA_s, DA_f1, DA_f0, DA_e, DA_c);
printk("DB: %ld %08lx %08lx %ld (%ld)\n", pr_debug("DB: %ld %08lx %08lx %ld (%ld)\n",
DB_s, DB_f1, DB_f0, DB_e, DB_c); DB_s, DB_f1, DB_f0, DB_e, DB_c);
#endif
switch (func) { switch (func) {
case EFDABS: case EFDABS:
...@@ -438,10 +431,10 @@ int do_spe_mathemu(struct pt_regs *regs) ...@@ -438,10 +431,10 @@ int do_spe_mathemu(struct pt_regs *regs)
FP_DECL_S(SB); FP_DECL_S(SB);
FP_CLEAR_EXCEPTIONS; FP_CLEAR_EXCEPTIONS;
FP_UNPACK_SP(SB, vb.wp + 1); FP_UNPACK_SP(SB, vb.wp + 1);
#ifdef DEBUG
printk("SB: %ld %08lx %ld (%ld)\n", pr_debug("SB: %ld %08lx %ld (%ld)\n",
SB_s, SB_f, SB_e, SB_c); SB_s, SB_f, SB_e, SB_c);
#endif
FP_CONV(D, S, 2, 1, DR, SB); FP_CONV(D, S, 2, 1, DR, SB);
goto pack_d; goto pack_d;
} }
...@@ -471,10 +464,9 @@ int do_spe_mathemu(struct pt_regs *regs) ...@@ -471,10 +464,9 @@ int do_spe_mathemu(struct pt_regs *regs)
break; break;
pack_d: pack_d:
#ifdef DEBUG pr_debug("DR: %ld %08lx %08lx %ld (%ld)\n",
printk("DR: %ld %08lx %08lx %ld (%ld)\n",
DR_s, DR_f1, DR_f0, DR_e, DR_c); DR_s, DR_f1, DR_f0, DR_e, DR_c);
#endif
FP_PACK_DP(vc.dp, DR); FP_PACK_DP(vc.dp, DR);
goto update_regs; goto update_regs;
...@@ -511,12 +503,14 @@ int do_spe_mathemu(struct pt_regs *regs) ...@@ -511,12 +503,14 @@ int do_spe_mathemu(struct pt_regs *regs)
break; break;
} }
#ifdef DEBUG pr_debug("SA0: %ld %08lx %ld (%ld)\n",
printk("SA0: %ld %08lx %ld (%ld)\n", SA0_s, SA0_f, SA0_e, SA0_c); SA0_s, SA0_f, SA0_e, SA0_c);
printk("SA1: %ld %08lx %ld (%ld)\n", SA1_s, SA1_f, SA1_e, SA1_c); pr_debug("SA1: %ld %08lx %ld (%ld)\n",
printk("SB0: %ld %08lx %ld (%ld)\n", SB0_s, SB0_f, SB0_e, SB0_c); SA1_s, SA1_f, SA1_e, SA1_c);
printk("SB1: %ld %08lx %ld (%ld)\n", SB1_s, SB1_f, SB1_e, SB1_c); pr_debug("SB0: %ld %08lx %ld (%ld)\n",
#endif SB0_s, SB0_f, SB0_e, SB0_c);
pr_debug("SB1: %ld %08lx %ld (%ld)\n",
SB1_s, SB1_f, SB1_e, SB1_c);
switch (func) { switch (func) {
case EVFSABS: case EVFSABS:
...@@ -605,10 +599,11 @@ int do_spe_mathemu(struct pt_regs *regs) ...@@ -605,10 +599,11 @@ int do_spe_mathemu(struct pt_regs *regs)
break; break;
pack_vs: pack_vs:
#ifdef DEBUG pr_debug("SR0: %ld %08lx %ld (%ld)\n",
printk("SR0: %ld %08lx %ld (%ld)\n", SR0_s, SR0_f, SR0_e, SR0_c); SR0_s, SR0_f, SR0_e, SR0_c);
printk("SR1: %ld %08lx %ld (%ld)\n", SR1_s, SR1_f, SR1_e, SR1_c); pr_debug("SR1: %ld %08lx %ld (%ld)\n",
#endif SR1_s, SR1_f, SR1_e, SR1_c);
FP_PACK_SP(vc.wp, SR0); FP_PACK_SP(vc.wp, SR0);
FP_PACK_SP(vc.wp + 1, SR1); FP_PACK_SP(vc.wp + 1, SR1);
goto update_regs; goto update_regs;
...@@ -646,14 +641,12 @@ int do_spe_mathemu(struct pt_regs *regs) ...@@ -646,14 +641,12 @@ int do_spe_mathemu(struct pt_regs *regs)
current->thread.evr[fc] = vc.wp[0]; current->thread.evr[fc] = vc.wp[0];
regs->gpr[fc] = vc.wp[1]; regs->gpr[fc] = vc.wp[1];
#ifdef DEBUG pr_debug("ccr = %08lx\n", regs->ccr);
printk("ccr = %08lx\n", regs->ccr); pr_debug("cur exceptions = %08x spefscr = %08lx\n",
printk("cur exceptions = %08x spefscr = %08lx\n",
FP_CUR_EXCEPTIONS, __FPU_FPSCR); FP_CUR_EXCEPTIONS, __FPU_FPSCR);
printk("vc: %08x %08x\n", vc.wp[0], vc.wp[1]); pr_debug("vc: %08x %08x\n", vc.wp[0], vc.wp[1]);
printk("va: %08x %08x\n", va.wp[0], va.wp[1]); pr_debug("va: %08x %08x\n", va.wp[0], va.wp[1]);
printk("vb: %08x %08x\n", vb.wp[0], vb.wp[1]); pr_debug("vb: %08x %08x\n", vb.wp[0], vb.wp[1]);
#endif
return 0; return 0;
...@@ -661,9 +654,7 @@ int do_spe_mathemu(struct pt_regs *regs) ...@@ -661,9 +654,7 @@ int do_spe_mathemu(struct pt_regs *regs)
if (have_e500_cpu_a005_erratum) { if (have_e500_cpu_a005_erratum) {
/* according to e500 cpu a005 erratum, reissue efp inst */ /* according to e500 cpu a005 erratum, reissue efp inst */
regs->nip -= 4; regs->nip -= 4;
#ifdef DEBUG pr_debug("re-issue efp inst: %08lx\n", speinsn);
printk(KERN_DEBUG "re-issue efp inst: %08lx\n", speinsn);
#endif
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment