| * This struct defines the way the registers are stored on the |
| * kernel stack during a system call or other kernel entry |
| * NOTE! I want to minimize the overhead of system calls, so this |
| * struct has as little information as possible. I does not have |
| * - floating point regs: the kernel doesn't change those |
| * - r9-15: saved by the C compiler |
| * This makes "fork()" and "exec()" a bit more complex, but should |
| * give us low system call latency. |
| /* JRP - These are the values provided to a0-a2 by PALcode */ |
| /* These are saved by PAL-code: */ |
| * This is the extended stack used by signal handlers and the context |
| * switcher: it's pushed after the normal "struct pt_regs". |
| unsigned long fp[32]; /* fp[31] is fpcr */ |
| #define __ARCH_SYS_PTRACE 1 |
| #define user_mode(regs) (((regs)->ps & 8) != 0) |
| #define instruction_pointer(regs) ((regs)->pc) |
| #define profile_pc(regs) instruction_pointer(regs) |
| extern void show_regs(struct pt_regs *); |
| #define task_pt_regs(task) \ |
| ((struct pt_regs *) (task_stack_page(task) + 2*PAGE_SIZE) - 1) |
| #define force_successful_syscall_return() (task_pt_regs(current)->r0 = 0) |