[U-Boot] [PATCH 04/21] arm: Replace unnecessary bad_mode() with panic()
Kyle Moffett
Kyle.D.Moffett at boeing.com
Mon Mar 7 18:37:25 CET 2011
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 <Kyle.D.Moffett at boeing.com>
Cc: Albert Aribaud <albert.aribaud at free.fr>
---
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
--
1.7.2.3
More information about the U-Boot
mailing list