From patchwork Mon Mar 7 17:37:24 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyle Moffett X-Patchwork-Id: 85770 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 5FF4BB70E1 for ; Tue, 8 Mar 2011 04:39:07 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 34B5928104; Mon, 7 Mar 2011 18:38:48 +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 QcKFo3mYOF8x; Mon, 7 Mar 2011 18:38:48 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5BE8C280A6; Mon, 7 Mar 2011 18:38:29 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 199D128095 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 cA92KAt4Xc+1 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 8CBC52809A 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 D0F3BAC07C; Mon, 7 Mar 2011 12:38:19 -0500 (EST) From: Kyle Moffett To: u-boot@lists.denx.de Date: Mon, 7 Mar 2011 12:37:24 -0500 Message-Id: <1299519462-25320-4-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 03/21] arm: Call "panic()" instead of "hang()" for div-by-zero 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 Divide-by-zero errors should be controlled by the CONFIG_PANIC_HANG configuration variable just like any other kind of trappable U-Boot bug. Signed-off-by: Kyle Moffett Cc: Albert Aribaud --- arch/arm/lib/div0.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/lib/div0.c b/arch/arm/lib/div0.c index 6267bf1..4ec25dc 100644 --- a/arch/arm/lib/div0.c +++ b/arch/arm/lib/div0.c @@ -21,10 +21,10 @@ * MA 02111-1307 USA */ +#include + /* Replacement (=dummy) for GNU/Linux division-by zero handler */ void __div0 (void) { - extern void hang (void); - - hang(); + panic("ERROR: divide by zero!"); }