diff options
Diffstat (limited to 'arch/nios2/include/uapi/asm')
| -rw-r--r-- | arch/nios2/include/uapi/asm/Kbuild | 3 | ||||
| -rw-r--r-- | arch/nios2/include/uapi/asm/elf.h | 4 | ||||
| -rw-r--r-- | arch/nios2/include/uapi/asm/ptrace.h | 50 | ||||
| -rw-r--r-- | arch/nios2/include/uapi/asm/sigcontext.h | 12 |
4 files changed, 13 insertions, 56 deletions
diff --git a/arch/nios2/include/uapi/asm/Kbuild b/arch/nios2/include/uapi/asm/Kbuild index 4f07ca3f8d10..e0bb972a50d7 100644 --- a/arch/nios2/include/uapi/asm/Kbuild +++ b/arch/nios2/include/uapi/asm/Kbuild | |||
| @@ -1,4 +1,5 @@ | |||
| 1 | include include/uapi/asm-generic/Kbuild.asm | 1 | include include/uapi/asm-generic/Kbuild.asm |
| 2 | 2 | ||
| 3 | header-y += elf.h | 3 | header-y += elf.h |
| 4 | header-y += ucontext.h | 4 | |
| 5 | generic-y += ucontext.h | ||
diff --git a/arch/nios2/include/uapi/asm/elf.h b/arch/nios2/include/uapi/asm/elf.h index a5b91ae5cf56..6f06d3b2949e 100644 --- a/arch/nios2/include/uapi/asm/elf.h +++ b/arch/nios2/include/uapi/asm/elf.h | |||
| @@ -50,9 +50,7 @@ | |||
| 50 | 50 | ||
| 51 | typedef unsigned long elf_greg_t; | 51 | typedef unsigned long elf_greg_t; |
| 52 | 52 | ||
| 53 | #define ELF_NGREG \ | 53 | #define ELF_NGREG 49 |
| 54 | ((sizeof(struct pt_regs) + sizeof(struct switch_stack)) / \ | ||
| 55 | sizeof(elf_greg_t)) | ||
| 56 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | 54 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; |
| 57 | 55 | ||
| 58 | typedef unsigned long elf_fpregset_t; | 56 | typedef unsigned long elf_fpregset_t; |
diff --git a/arch/nios2/include/uapi/asm/ptrace.h b/arch/nios2/include/uapi/asm/ptrace.h index e83a7c9d1c36..71a330597adf 100644 --- a/arch/nios2/include/uapi/asm/ptrace.h +++ b/arch/nios2/include/uapi/asm/ptrace.h | |||
| @@ -67,53 +67,9 @@ | |||
| 67 | 67 | ||
| 68 | #define NUM_PTRACE_REG (PTR_TLBMISC + 1) | 68 | #define NUM_PTRACE_REG (PTR_TLBMISC + 1) |
| 69 | 69 | ||
| 70 | /* this struct defines the way the registers are stored on the | 70 | /* User structures for general purpose registers. */ |
| 71 | stack during a system call. | 71 | struct user_pt_regs { |
| 72 | 72 | __u32 regs[49]; | |
| 73 | There is a fake_regs in setup.c that has to match pt_regs.*/ | ||
| 74 | |||
| 75 | struct pt_regs { | ||
| 76 | unsigned long r8; /* r8-r15 Caller-saved GP registers */ | ||
| 77 | unsigned long r9; | ||
| 78 | unsigned long r10; | ||
| 79 | unsigned long r11; | ||
| 80 | unsigned long r12; | ||
| 81 | unsigned long r13; | ||
| 82 | unsigned long r14; | ||
| 83 | unsigned long r15; | ||
| 84 | unsigned long r1; /* Assembler temporary */ | ||
| 85 | unsigned long r2; /* Retval LS 32bits */ | ||
| 86 | unsigned long r3; /* Retval MS 32bits */ | ||
| 87 | unsigned long r4; /* r4-r7 Register arguments */ | ||
| 88 | unsigned long r5; | ||
| 89 | unsigned long r6; | ||
| 90 | unsigned long r7; | ||
| 91 | unsigned long orig_r2; /* Copy of r2 ?? */ | ||
| 92 | unsigned long ra; /* Return address */ | ||
| 93 | unsigned long fp; /* Frame pointer */ | ||
| 94 | unsigned long sp; /* Stack pointer */ | ||
| 95 | unsigned long gp; /* Global pointer */ | ||
| 96 | unsigned long estatus; | ||
| 97 | unsigned long ea; /* Exception return address (pc) */ | ||
| 98 | unsigned long orig_r7; | ||
| 99 | }; | ||
| 100 | |||
| 101 | /* | ||
| 102 | * This is the extended stack used by signal handlers and the context | ||
| 103 | * switcher: it's pushed after the normal "struct pt_regs". | ||
| 104 | */ | ||
| 105 | struct switch_stack { | ||
| 106 | unsigned long r16; /* r16-r23 Callee-saved GP registers */ | ||
| 107 | unsigned long r17; | ||
| 108 | unsigned long r18; | ||
| 109 | unsigned long r19; | ||
| 110 | unsigned long r20; | ||
| 111 | unsigned long r21; | ||
| 112 | unsigned long r22; | ||
| 113 | unsigned long r23; | ||
| 114 | unsigned long fp; | ||
| 115 | unsigned long gp; | ||
| 116 | unsigned long ra; | ||
| 117 | }; | 73 | }; |
| 118 | 74 | ||
| 119 | #endif /* __ASSEMBLY__ */ | 75 | #endif /* __ASSEMBLY__ */ |
diff --git a/arch/nios2/include/uapi/asm/sigcontext.h b/arch/nios2/include/uapi/asm/sigcontext.h index 7b8bb41867d4..b67944a50927 100644 --- a/arch/nios2/include/uapi/asm/sigcontext.h +++ b/arch/nios2/include/uapi/asm/sigcontext.h | |||
| @@ -15,14 +15,16 @@ | |||
| 15 | * details. | 15 | * details. |
| 16 | */ | 16 | */ |
| 17 | 17 | ||
| 18 | #ifndef _ASM_NIOS2_SIGCONTEXT_H | 18 | #ifndef _UAPI__ASM_SIGCONTEXT_H |
| 19 | #define _ASM_NIOS2_SIGCONTEXT_H | 19 | #define _UAPI__ASM_SIGCONTEXT_H |
| 20 | 20 | ||
| 21 | #include <asm/ptrace.h> | 21 | #include <linux/types.h> |
| 22 | |||
| 23 | #define MCONTEXT_VERSION 2 | ||
| 22 | 24 | ||
| 23 | struct sigcontext { | 25 | struct sigcontext { |
| 24 | struct pt_regs regs; | 26 | int version; |
| 25 | unsigned long sc_mask; /* old sigmask */ | 27 | unsigned long gregs[32]; |
| 26 | }; | 28 | }; |
| 27 | 29 | ||
| 28 | #endif | 30 | #endif |
