Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 235182
b: refs/heads/master
c: d8748e7
h: refs/heads/master
v: v3
  • Loading branch information
Michal Simek committed Mar 9, 2011
1 parent ac4e68b commit 7e06644
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 495162dfefe3f6e3a8e908aa2f0a964a572d3e87
refs/heads/master: d8748e73e882106ff0ffa0fa2192dab111a9f9f8
19 changes: 16 additions & 3 deletions trunk/arch/microblaze/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@
/* The offset of the struct pt_regs in a `state save frame' on the stack. */
#define PTO STATE_SAVE_ARG_SPACE /* 24 the space for args */

#ifdef DEBUG
/* Create space for syscalls counting. */
.section .data
.global syscall_debug_table
.align 4
syscall_debug_table:
.space (__NR_syscalls * 4)
#endif /* DEBUG */

#define C_ENTRY(name) .globl name; .align 4; name

/*
Expand Down Expand Up @@ -371,10 +380,14 @@ C_ENTRY(_user_exception):
add r12, r12, r12;

#ifdef DEBUG
/* Trac syscalls and stored them to r0_ram */
lwi r3, r12, 0x400 + r0_ram
/* Trac syscalls and stored them to syscall_debug_table */
/* The first syscall location stores total syscall number */
lwi r3, r0, syscall_debug_table
addi r3, r3, 1
swi r3, r0, syscall_debug_table
lwi r3, r12, syscall_debug_table
addi r3, r3, 1
swi r3, r12, 0x400 + r0_ram
swi r3, r12, syscall_debug_table
#endif

# Find and jump into the syscall handler.
Expand Down

0 comments on commit 7e06644

Please sign in to comment.