diff options
Diffstat (limited to 'arch/microblaze/kernel/entry.S')
-rw-r--r-- | arch/microblaze/kernel/entry.S | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/arch/microblaze/kernel/entry.S b/arch/microblaze/kernel/entry.S index 41c30cdb2704..5010f0b22ca6 100644 --- a/arch/microblaze/kernel/entry.S +++ b/arch/microblaze/kernel/entry.S | |||
@@ -39,6 +39,15 @@ | |||
39 | /* The offset of the struct pt_regs in a `state save frame' on the stack. */ | 39 | /* The offset of the struct pt_regs in a `state save frame' on the stack. */ |
40 | #define PTO STATE_SAVE_ARG_SPACE /* 24 the space for args */ | 40 | #define PTO STATE_SAVE_ARG_SPACE /* 24 the space for args */ |
41 | 41 | ||
42 | #ifdef DEBUG | ||
43 | /* Create space for syscalls counting. */ | ||
44 | .section .data | ||
45 | .global syscall_debug_table | ||
46 | .align 4 | ||
47 | syscall_debug_table: | ||
48 | .space (__NR_syscalls * 4) | ||
49 | #endif /* DEBUG */ | ||
50 | |||
42 | #define C_ENTRY(name) .globl name; .align 4; name | 51 | #define C_ENTRY(name) .globl name; .align 4; name |
43 | 52 | ||
44 | /* | 53 | /* |
@@ -371,10 +380,14 @@ C_ENTRY(_user_exception): | |||
371 | add r12, r12, r12; | 380 | add r12, r12, r12; |
372 | 381 | ||
373 | #ifdef DEBUG | 382 | #ifdef DEBUG |
374 | /* Trac syscalls and stored them to r0_ram */ | 383 | /* Trac syscalls and stored them to syscall_debug_table */ |
375 | lwi r3, r12, 0x400 + r0_ram | 384 | /* The first syscall location stores total syscall number */ |
385 | lwi r3, r0, syscall_debug_table | ||
386 | addi r3, r3, 1 | ||
387 | swi r3, r0, syscall_debug_table | ||
388 | lwi r3, r12, syscall_debug_table | ||
376 | addi r3, r3, 1 | 389 | addi r3, r3, 1 |
377 | swi r3, r12, 0x400 + r0_ram | 390 | swi r3, r12, syscall_debug_table |
378 | #endif | 391 | #endif |
379 | 392 | ||
380 | # Find and jump into the syscall handler. | 393 | # Find and jump into the syscall handler. |