diff options
author | Michal Simek <monstr@monstr.eu> | 2011-01-31 09:07:53 -0500 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2011-03-09 02:09:53 -0500 |
commit | c06b3a068223cb885d85ac4f6c31e870ca2b5aac (patch) | |
tree | f1834508401510f50135d3e58dbc36df464afd43 /arch/microblaze | |
parent | a5abba989deceb731047425812d268daf7536575 (diff) |
microblaze: Do not use r0_ram space for hw exception debugging
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>
Diffstat (limited to 'arch/microblaze')
-rw-r--r-- | arch/microblaze/kernel/hw_exception_handler.S | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/arch/microblaze/kernel/hw_exception_handler.S b/arch/microblaze/kernel/hw_exception_handler.S index 782680de3121..ec5e99dd5d75 100644 --- a/arch/microblaze/kernel/hw_exception_handler.S +++ b/arch/microblaze/kernel/hw_exception_handler.S | |||
@@ -77,6 +77,8 @@ | |||
77 | #include <asm/signal.h> | 77 | #include <asm/signal.h> |
78 | #include <asm/asm-offsets.h> | 78 | #include <asm/asm-offsets.h> |
79 | 79 | ||
80 | #undef DEBUG | ||
81 | |||
80 | /* Helpful Macros */ | 82 | /* Helpful Macros */ |
81 | #define NUM_TO_REG(num) r ## num | 83 | #define NUM_TO_REG(num) r ## num |
82 | 84 | ||
@@ -228,6 +230,16 @@ | |||
228 | /* wrappers to restore state before coming to entry.S */ | 230 | /* wrappers to restore state before coming to entry.S */ |
229 | 231 | ||
230 | #ifdef CONFIG_MMU | 232 | #ifdef CONFIG_MMU |
233 | #ifdef DEBUG | ||
234 | /* Create space for exception counting. */ | ||
235 | .section .data | ||
236 | .global exception_debug_table | ||
237 | .align 4 | ||
238 | exception_debug_table: | ||
239 | /* Look at exception vector table. There is 32 exceptions * word size */ | ||
240 | .space (32 * 4) | ||
241 | #endif /* DEBUG */ | ||
242 | |||
231 | .section .rodata | 243 | .section .rodata |
232 | .align 4 | 244 | .align 4 |
233 | _MB_HW_ExceptionVectorTable: | 245 | _MB_HW_ExceptionVectorTable: |
@@ -329,12 +341,12 @@ not_in_delay_slot: | |||
329 | 341 | ||
330 | #ifdef DEBUG | 342 | #ifdef DEBUG |
331 | /* counting which exception happen */ | 343 | /* counting which exception happen */ |
332 | lwi r5, r0, 0x200 + TOPHYS(r0_ram) | 344 | lwi r5, r0, TOPHYS(exception_debug_table) |
333 | addi r5, r5, 1 | 345 | addi r5, r5, 1 |
334 | swi r5, r0, 0x200 + TOPHYS(r0_ram) | 346 | swi r5, r0, TOPHYS(exception_debug_table) |
335 | lwi r5, r6, 0x200 + TOPHYS(r0_ram) | 347 | lwi r5, r6, TOPHYS(exception_debug_table) |
336 | addi r5, r5, 1 | 348 | addi r5, r5, 1 |
337 | swi r5, r6, 0x200 + TOPHYS(r0_ram) | 349 | swi r5, r6, TOPHYS(exception_debug_table) |
338 | #endif | 350 | #endif |
339 | /* end */ | 351 | /* end */ |
340 | /* Load the HW Exception vector */ | 352 | /* Load the HW Exception vector */ |