From patchwork Mon Mar 7 17:37:25 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyle Moffett X-Patchwork-Id: 85771 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 28028B70E1 for ; Tue, 8 Mar 2011 04:39:24 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D6336280B5; Mon, 7 Mar 2011 18:38:56 +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 LHOZN5RjmUJj; Mon, 7 Mar 2011 18:38:56 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 87627280AE; Mon, 7 Mar 2011 18:38:30 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4D04528098 for ; Mon, 7 Mar 2011 18:38:23 +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 R3ndzCF-8UkU for ; Mon, 7 Mar 2011 18:38:22 +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 border.exmeritus.com (wsip-70-167-241-26.dc.dc.cox.net [70.167.241.26]) by theia.denx.de (Postfix) with ESMTP id 065CE28086 for ; Mon, 7 Mar 2011 18:38:20 +0100 (CET) Received: from ysera.exmeritus.com (firewall2.exmeritus.com [10.13.38.2]) by border.exmeritus.com (Postfix) with ESMTP id 1A478AC07D; Mon, 7 Mar 2011 12:38:20 -0500 (EST) From: Kyle Moffett To: u-boot@lists.denx.de Date: Mon, 7 Mar 2011 12:37:25 -0500 Message-Id: <1299519462-25320-5-git-send-email-Kyle.D.Moffett@boeing.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1299519462-25320-1-git-send-email-Kyle.D.Moffett@boeing.com> References: <1299519462-25320-1-git-send-email-Kyle.D.Moffett@boeing.com> Cc: Kyle Moffett , Kyle Moffett Subject: [U-Boot] [PATCH 04/21] arm: Replace unnecessary bad_mode() with panic() X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 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 The bad_mode() function calls panic() and then would call the reset_cpu() function, except that panic() never returns! Replace all of the calls to bad_mode() with simple calls to panic(). This helps prepare for the followup patches to convert to generic system-restart support. Signed-off-by: Kyle Moffett Cc: Albert Aribaud --- arch/arm/lib/interrupts.c | 21 +++++++-------------- 1 files changed, 7 insertions(+), 14 deletions(-) diff --git a/arch/arm/lib/interrupts.c b/arch/arm/lib/interrupts.c index 74ff5ce..156a23c 100644 --- a/arch/arm/lib/interrupts.c +++ b/arch/arm/lib/interrupts.c @@ -102,13 +102,6 @@ int disable_interrupts (void) } #endif - -void bad_mode (void) -{ - panic ("Resetting CPU ...\n"); - reset_cpu (0); -} - void show_regs (struct pt_regs *regs) { unsigned long flags; @@ -150,42 +143,42 @@ void do_undefined_instruction (struct pt_regs *pt_regs) { printf ("undefined instruction\n"); show_regs (pt_regs); - bad_mode (); + panic("Resetting CPU...\n"); } void do_software_interrupt (struct pt_regs *pt_regs) { printf ("software interrupt\n"); show_regs (pt_regs); - bad_mode (); + panic("Resetting CPU...\n"); } void do_prefetch_abort (struct pt_regs *pt_regs) { printf ("prefetch abort\n"); show_regs (pt_regs); - bad_mode (); + panic("Resetting CPU...\n"); } void do_data_abort (struct pt_regs *pt_regs) { printf ("data abort\n"); show_regs (pt_regs); - bad_mode (); + panic("Resetting CPU...\n"); } void do_not_used (struct pt_regs *pt_regs) { printf ("not used\n"); show_regs (pt_regs); - bad_mode (); + panic("Resetting CPU...\n"); } void do_fiq (struct pt_regs *pt_regs) { printf ("fast interrupt request\n"); show_regs (pt_regs); - bad_mode (); + panic("Resetting CPU...\n"); } #ifndef CONFIG_USE_IRQ @@ -193,6 +186,6 @@ void do_irq (struct pt_regs *pt_regs) { printf ("interrupt request\n"); show_regs (pt_regs); - bad_mode (); + panic("Resetting CPU...\n"); } #endif