Skip to content

Commit

Permalink
microblaze: Do not use r0_ram space for hw exception debugging
Browse files Browse the repository at this point in the history
Remove hw exception counting space from r0_ram. Use special
exception_debug_table poll for exception statistic.

Signed-off-by: Michal Simek <monstr@monstr.eu>
  • Loading branch information
Michal Simek committed Mar 9, 2011
1 parent a5abba9 commit c06b3a0
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions arch/microblaze/kernel/hw_exception_handler.S
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@
#include <asm/signal.h>
#include <asm/asm-offsets.h>

#undef DEBUG

/* Helpful Macros */
#define NUM_TO_REG(num) r ## num

Expand Down Expand Up @@ -228,6 +230,16 @@
/* wrappers to restore state before coming to entry.S */

#ifdef CONFIG_MMU
#ifdef DEBUG
/* Create space for exception counting. */
.section .data
.global exception_debug_table
.align 4
exception_debug_table:
/* Look at exception vector table. There is 32 exceptions * word size */
.space (32 * 4)
#endif /* DEBUG */

.section .rodata
.align 4
_MB_HW_ExceptionVectorTable:
Expand Down Expand Up @@ -329,12 +341,12 @@ not_in_delay_slot:

#ifdef DEBUG
/* counting which exception happen */
lwi r5, r0, 0x200 + TOPHYS(r0_ram)
lwi r5, r0, TOPHYS(exception_debug_table)
addi r5, r5, 1
swi r5, r0, 0x200 + TOPHYS(r0_ram)
lwi r5, r6, 0x200 + TOPHYS(r0_ram)
swi r5, r0, TOPHYS(exception_debug_table)
lwi r5, r6, TOPHYS(exception_debug_table)
addi r5, r5, 1
swi r5, r6, 0x200 + TOPHYS(r0_ram)
swi r5, r6, TOPHYS(exception_debug_table)
#endif
/* end */
/* Load the HW Exception vector */
Expand Down

0 comments on commit c06b3a0

Please sign in to comment.