tile: make register dumps more readable
authorChris Metcalf <cmetcalf@tilera.com>
Wed, 7 Aug 2013 16:03:53 +0000 (12:03 -0400)
committerChris Metcalf <cmetcalf@tilera.com>
Tue, 13 Aug 2013 20:26:09 +0000 (16:26 -0400)
It's much easier to read register dumps if you read vertically
rather than horizontally, since the register numbers line up
and lead the eye down more than to the right.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
arch/tile/kernel/process.c

index 25678b83b747de136dfaa90460c511839d8d45ef..663289b803fce3cb246a83ed64ccfa9e1b3a1350 100644 (file)
@@ -591,21 +591,21 @@ void show_regs(struct pt_regs *regs)
        pr_err("\n");
        show_regs_print_info(KERN_ERR);
 #ifdef __tilegx__
-       for (i = 0; i < 51; i += 3)
+       for (i = 0; i < 17; i++)
                pr_err(" r%-2d: "REGFMT" r%-2d: "REGFMT" r%-2d: "REGFMT"\n",
-                      i, regs->regs[i], i+1, regs->regs[i+1],
-                      i+2, regs->regs[i+2]);
-       pr_err(" r51: "REGFMT" r52: "REGFMT" tp : "REGFMT"\n",
-              regs->regs[51], regs->regs[52], regs->tp);
+                      i, regs->regs[i], i+18, regs->regs[i+18],
+                      i+36, regs->regs[i+36]);
+       pr_err(" r17: "REGFMT" r35: "REGFMT" tp : "REGFMT"\n",
+              regs->regs[17], regs->regs[35], regs->tp);
        pr_err(" sp : "REGFMT" lr : "REGFMT"\n", regs->sp, regs->lr);
 #else
-       for (i = 0; i < 52; i += 4)
+       for (i = 0; i < 13; i++)
                pr_err(" r%-2d: "REGFMT" r%-2d: "REGFMT
                       " r%-2d: "REGFMT" r%-2d: "REGFMT"\n",
-                      i, regs->regs[i], i+1, regs->regs[i+1],
-                      i+2, regs->regs[i+2], i+3, regs->regs[i+3]);
-       pr_err(" r52: "REGFMT" tp : "REGFMT" sp : "REGFMT" lr : "REGFMT"\n",
-              regs->regs[52], regs->tp, regs->sp, regs->lr);
+                      i, regs->regs[i], i+14, regs->regs[i+14],
+                      i+27, regs->regs[i+27], i+40, regs->regs[i+40]);
+       pr_err(" r13: "REGFMT" tp : "REGFMT" sp : "REGFMT" lr : "REGFMT"\n",
+              regs->regs[13], regs->tp, regs->sp, regs->lr);
 #endif
        pr_err(" pc : "REGFMT" ex1: %ld     faultnum: %ld\n",
               regs->pc, regs->ex1, regs->faultnum);