[PATCH 4/7] ARM: panic on div 0

Sascha Hauer s.hauer at pengutronix.de
Thu Jan 26 08:26:50 EST 2012


hang() only outputs 'reset the board' whereas panic
can be passed a string which we can use to output
some more information what is happening.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 arch/arm/lib/div0.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/lib/div0.c b/arch/arm/lib/div0.c
index 99d6b85..6313c672 100644
--- a/arch/arm/lib/div0.c
+++ b/arch/arm/lib/div0.c
@@ -27,5 +27,5 @@ extern void __div0(void);
 /* Replacement (=dummy) for GNU/Linux division-by zero handler */
 void __div0 (void)
 {
-	hang();
+	panic("division by zero\n");
 }
-- 
1.7.8.3




More information about the barebox mailing list