]> git.sur5r.net Git - u-boot/commitdiff
nds32: fix ptrace and interrupt register overflow
authorMacpaul Lin <macpaul@gmail.com>
Sun, 11 Mar 2012 08:30:18 +0000 (16:30 +0800)
committerMacpaul Lin <macpaul@gmail.com>
Mon, 19 Mar 2012 07:53:07 +0000 (15:53 +0800)
Fix ptrace and interrupt register overflow warning.
Add missing P0 and P1 (r26 and r27) into register lists.
These register are usually used in OS.

Signed-off-by: Macpaul Lin <macpaul@gmail.com>
arch/nds32/include/asm/ptrace.h
arch/nds32/lib/interrupts.c

index 4336083ea8632b019456d23e8837477d8e14fade..ee181b267120e2870a0e6133f87aeaed3061e378 100644 (file)
@@ -38,6 +38,8 @@ struct pt_regs {
        NDS32_REG d1hi;
        NDS32_REG d1lo;
        NDS32_REG r[26];        /* r0 - r25 */
+       NDS32_REG p0;           /* r26 - used by OS */
+       NDS32_REG p1;           /* r27 - used by OS */
        NDS32_REG fp;           /* r28 */
        NDS32_REG gp;           /* r29 */
        NDS32_REG lp;           /* r30 */
index 974d52a1a11fcf51ee4042c2fd51f52536f700d6..ca8c227b05fe7192385863635519e151bff31bf5 100644 (file)
@@ -91,7 +91,7 @@ void show_regs(struct pt_regs *regs)
        printf("D1H: %08lx  D1L: %08lx  D0H: %08lx  D0L: %08lx\n",
                regs->d1hi, regs->d1lo, regs->d0hi, regs->d0lo);
        printf("r27: %08lx  r26: %08lx  r25: %08lx  r24: %08lx\n",
-               regs->r[27], regs->r[26], regs->r[25], regs->r[24]);
+               regs->p1, regs->p0, regs->r[25], regs->r[24]);
        printf("r23: %08lx  r22: %08lx  r21: %08lx  r20: %08lx\n",
                regs->r[23], regs->r[22], regs->r[21], regs->r[20]);
        printf("r19: %08lx  r18: %08lx  r17: %08lx  r16: %08lx\n",