From patchwork Sun Mar 11 09:03:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Macpaul Lin X-Patchwork-Id: 145966 X-Patchwork-Delegate: macpaul@andestech.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 0CBA5B6FA4 for ; Sun, 11 Mar 2012 20:03:46 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7C77A280A0; Sun, 11 Mar 2012 10:03:44 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id C9Fp+SNiNZL6; Sun, 11 Mar 2012 10:03:44 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A6711280A2; Sun, 11 Mar 2012 10:03:43 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9FC06280A1 for ; Sun, 11 Mar 2012 10:03:41 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9YVix8GRAPz0 for ; Sun, 11 Mar 2012 10:03:41 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by theia.denx.de (Postfix) with ESMTPS id 08D9D280A0 for ; Sun, 11 Mar 2012 10:03:39 +0100 (CET) Received: by iazz13 with SMTP id z13so4462583iaz.3 for ; Sun, 11 Mar 2012 01:03:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=FAgr8rsMZxGwaIS+coU9tGnElWCT381NnnN8IRnDlaY=; b=ty7PaMH3bRFVRxSGG1LuIX4ESxaIB4v4gJIBkq1khGtuWDg1bBhAx0WW2MGCLte58p qIj+ekSmI98hY3k7KWD9fwtxQjaEEtKrdbxXLHZsJAKLryLDkSH8Y8uWuC8S8jz0YC49 ft1KJg1pq3Rg0z73P7pNPKvmbxvBjggc5cgQFZ/Fhzmaorcu3oOkYS6v1FTSxF9/U+wN YcJY50BF+brm36XMDLFIcTFSq4g4Jdr5r49kS01kDWsrb7XHOmNMikh+CX4tc9vvyGjc pXDAkv1AoKz6blkQMHgeyDkojipHoQe54PSjC8L9EzXh1XgFf51zyA8+LL6jTEtV0Kli 5aZA== Received: by 10.50.149.230 with SMTP id ud6mr12693791igb.16.1331456618531; Sun, 11 Mar 2012 01:03:38 -0800 (PST) Received: from localhost.localdomain ([140.119.175.157]) by mx.google.com with ESMTPS id wp4sm4864958igc.3.2012.03.11.01.03.36 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 11 Mar 2012 01:03:37 -0800 (PST) From: Macpaul Lin To: u-boot@lists.denx.de, uboot@andestech.com, vapier@gentoo.org, macpaul@andestech.com Date: Sun, 11 Mar 2012 17:03:32 +0800 Message-Id: <1331456613-2661-1-git-send-email-macpaul@gmail.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1331456181-28530-1-git-send-email-macpaul@gmail.com> References: <1331456181-28530-1-git-send-email-macpaul@gmail.com> Subject: [U-Boot] [PATCH v2 1/2] nds32: fix ptrace and interrupt register overflow X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 --- Change for V2: - no change. arch/nds32/include/asm/ptrace.h | 2 ++ arch/nds32/lib/interrupts.c | 2 +- 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/arch/nds32/include/asm/ptrace.h b/arch/nds32/include/asm/ptrace.h index 4336083..ee181b2 100644 --- a/arch/nds32/include/asm/ptrace.h +++ b/arch/nds32/include/asm/ptrace.h @@ -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 */ diff --git a/arch/nds32/lib/interrupts.c b/arch/nds32/lib/interrupts.c index 974d52a..ca8c227 100644 --- a/arch/nds32/lib/interrupts.c +++ b/arch/nds32/lib/interrupts.c @@ -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",