diff options
-rw-r--r-- | arch/um/include/sysdep-i386/ptrace.h | 36 | ||||
-rw-r--r-- | arch/um/include/sysdep-x86_64/ptrace.h | 64 | ||||
-rw-r--r-- | arch/um/kernel/process.c | 4 | ||||
-rw-r--r-- | arch/um/kernel/skas/syscall.c | 2 | ||||
-rw-r--r-- | arch/um/os-Linux/registers.c | 6 | ||||
-rw-r--r-- | arch/um/os-Linux/skas/process.c | 4 | ||||
-rw-r--r-- | arch/um/sys-i386/signal.c | 64 | ||||
-rw-r--r-- | arch/um/sys-x86_64/signal.c | 6 | ||||
-rw-r--r-- | arch/um/sys-x86_64/tls.c | 2 | ||||
-rw-r--r-- | include/asm-um/elf-x86_64.h | 42 |
10 files changed, 115 insertions, 115 deletions
diff --git a/arch/um/include/sysdep-i386/ptrace.h b/arch/um/include/sysdep-i386/ptrace.h index b843941acd1d..c0019d92fc73 100644 --- a/arch/um/include/sysdep-i386/ptrace.h +++ b/arch/um/include/sysdep-i386/ptrace.h | |||
@@ -53,7 +53,7 @@ extern int sysemu_supported; | |||
53 | #endif | 53 | #endif |
54 | 54 | ||
55 | struct uml_pt_regs { | 55 | struct uml_pt_regs { |
56 | unsigned long regs[MAX_REG_NR]; | 56 | unsigned long gp[MAX_REG_NR]; |
57 | unsigned long fp[HOST_FP_SIZE]; | 57 | unsigned long fp[HOST_FP_SIZE]; |
58 | unsigned long xfp[HOST_XFP_SIZE]; | 58 | unsigned long xfp[HOST_XFP_SIZE]; |
59 | struct faultinfo faultinfo; | 59 | struct faultinfo faultinfo; |
@@ -63,23 +63,23 @@ struct uml_pt_regs { | |||
63 | 63 | ||
64 | #define EMPTY_UML_PT_REGS { } | 64 | #define EMPTY_UML_PT_REGS { } |
65 | 65 | ||
66 | #define UPT_IP(r) REGS_IP((r)->regs) | 66 | #define UPT_IP(r) REGS_IP((r)->gp) |
67 | #define UPT_SP(r) REGS_SP((r)->regs) | 67 | #define UPT_SP(r) REGS_SP((r)->gp) |
68 | #define UPT_EFLAGS(r) REGS_EFLAGS((r)->regs) | 68 | #define UPT_EFLAGS(r) REGS_EFLAGS((r)->gp) |
69 | #define UPT_EAX(r) REGS_EAX((r)->regs) | 69 | #define UPT_EAX(r) REGS_EAX((r)->gp) |
70 | #define UPT_EBX(r) REGS_EBX((r)->regs) | 70 | #define UPT_EBX(r) REGS_EBX((r)->gp) |
71 | #define UPT_ECX(r) REGS_ECX((r)->regs) | 71 | #define UPT_ECX(r) REGS_ECX((r)->gp) |
72 | #define UPT_EDX(r) REGS_EDX((r)->regs) | 72 | #define UPT_EDX(r) REGS_EDX((r)->gp) |
73 | #define UPT_ESI(r) REGS_ESI((r)->regs) | 73 | #define UPT_ESI(r) REGS_ESI((r)->gp) |
74 | #define UPT_EDI(r) REGS_EDI((r)->regs) | 74 | #define UPT_EDI(r) REGS_EDI((r)->gp) |
75 | #define UPT_EBP(r) REGS_EBP((r)->regs) | 75 | #define UPT_EBP(r) REGS_EBP((r)->gp) |
76 | #define UPT_ORIG_EAX(r) ((r)->syscall) | 76 | #define UPT_ORIG_EAX(r) ((r)->syscall) |
77 | #define UPT_CS(r) REGS_CS((r)->regs) | 77 | #define UPT_CS(r) REGS_CS((r)->gp) |
78 | #define UPT_SS(r) REGS_SS((r)->regs) | 78 | #define UPT_SS(r) REGS_SS((r)->gp) |
79 | #define UPT_DS(r) REGS_DS((r)->regs) | 79 | #define UPT_DS(r) REGS_DS((r)->gp) |
80 | #define UPT_ES(r) REGS_ES((r)->regs) | 80 | #define UPT_ES(r) REGS_ES((r)->gp) |
81 | #define UPT_FS(r) REGS_FS((r)->regs) | 81 | #define UPT_FS(r) REGS_FS((r)->gp) |
82 | #define UPT_GS(r) REGS_GS((r)->regs) | 82 | #define UPT_GS(r) REGS_GS((r)->gp) |
83 | 83 | ||
84 | #define UPT_SYSCALL_ARG1(r) UPT_EBX(r) | 84 | #define UPT_SYSCALL_ARG1(r) UPT_EBX(r) |
85 | #define UPT_SYSCALL_ARG2(r) UPT_ECX(r) | 85 | #define UPT_SYSCALL_ARG2(r) UPT_ECX(r) |
@@ -161,7 +161,7 @@ struct syscall_args { | |||
161 | #define UPT_SET_SYSCALL_RETURN(r, res) \ | 161 | #define UPT_SET_SYSCALL_RETURN(r, res) \ |
162 | REGS_SET_SYSCALL_RETURN((r)->regs, (res)) | 162 | REGS_SET_SYSCALL_RETURN((r)->regs, (res)) |
163 | 163 | ||
164 | #define UPT_RESTART_SYSCALL(r) REGS_RESTART_SYSCALL((r)->regs) | 164 | #define UPT_RESTART_SYSCALL(r) REGS_RESTART_SYSCALL((r)->gp) |
165 | 165 | ||
166 | #define UPT_ORIG_SYSCALL(r) UPT_EAX(r) | 166 | #define UPT_ORIG_SYSCALL(r) UPT_EAX(r) |
167 | #define UPT_SYSCALL_NR(r) UPT_ORIG_EAX(r) | 167 | #define UPT_SYSCALL_NR(r) UPT_ORIG_EAX(r) |
diff --git a/arch/um/include/sysdep-x86_64/ptrace.h b/arch/um/include/sysdep-x86_64/ptrace.h index ea4afdce59c1..ebc2fd5dc31c 100644 --- a/arch/um/include/sysdep-x86_64/ptrace.h +++ b/arch/um/include/sysdep-x86_64/ptrace.h | |||
@@ -85,7 +85,7 @@ | |||
85 | #define REGS_ERR(r) ((r)->fault_type) | 85 | #define REGS_ERR(r) ((r)->fault_type) |
86 | 86 | ||
87 | struct uml_pt_regs { | 87 | struct uml_pt_regs { |
88 | unsigned long regs[MAX_REG_NR]; | 88 | unsigned long gp[MAX_REG_NR]; |
89 | unsigned long fp[HOST_FP_SIZE]; | 89 | unsigned long fp[HOST_FP_SIZE]; |
90 | struct faultinfo faultinfo; | 90 | struct faultinfo faultinfo; |
91 | long syscall; | 91 | long syscall; |
@@ -94,36 +94,36 @@ struct uml_pt_regs { | |||
94 | 94 | ||
95 | #define EMPTY_UML_PT_REGS { } | 95 | #define EMPTY_UML_PT_REGS { } |
96 | 96 | ||
97 | #define UPT_RBX(r) REGS_RBX((r)->regs) | 97 | #define UPT_RBX(r) REGS_RBX((r)->gp) |
98 | #define UPT_RCX(r) REGS_RCX((r)->regs) | 98 | #define UPT_RCX(r) REGS_RCX((r)->gp) |
99 | #define UPT_RDX(r) REGS_RDX((r)->regs) | 99 | #define UPT_RDX(r) REGS_RDX((r)->gp) |
100 | #define UPT_RSI(r) REGS_RSI((r)->regs) | 100 | #define UPT_RSI(r) REGS_RSI((r)->gp) |
101 | #define UPT_RDI(r) REGS_RDI((r)->regs) | 101 | #define UPT_RDI(r) REGS_RDI((r)->gp) |
102 | #define UPT_RBP(r) REGS_RBP((r)->regs) | 102 | #define UPT_RBP(r) REGS_RBP((r)->gp) |
103 | #define UPT_RAX(r) REGS_RAX((r)->regs) | 103 | #define UPT_RAX(r) REGS_RAX((r)->gp) |
104 | #define UPT_R8(r) REGS_R8((r)->regs) | 104 | #define UPT_R8(r) REGS_R8((r)->gp) |
105 | #define UPT_R9(r) REGS_R9((r)->regs) | 105 | #define UPT_R9(r) REGS_R9((r)->gp) |
106 | #define UPT_R10(r) REGS_R10((r)->regs) | 106 | #define UPT_R10(r) REGS_R10((r)->gp) |
107 | #define UPT_R11(r) REGS_R11((r)->regs) | 107 | #define UPT_R11(r) REGS_R11((r)->gp) |
108 | #define UPT_R12(r) REGS_R12((r)->regs) | 108 | #define UPT_R12(r) REGS_R12((r)->gp) |
109 | #define UPT_R13(r) REGS_R13((r)->regs) | 109 | #define UPT_R13(r) REGS_R13((r)->gp) |
110 | #define UPT_R14(r) REGS_R14((r)->regs) | 110 | #define UPT_R14(r) REGS_R14((r)->gp) |
111 | #define UPT_R15(r) REGS_R15((r)->regs) | 111 | #define UPT_R15(r) REGS_R15((r)->gp) |
112 | #define UPT_CS(r) REGS_CS((r)->regs) | 112 | #define UPT_CS(r) REGS_CS((r)->gp) |
113 | #define UPT_FS_BASE(r) REGS_FS_BASE((r)->regs) | 113 | #define UPT_FS_BASE(r) REGS_FS_BASE((r)->gp) |
114 | #define UPT_FS(r) REGS_FS((r)->regs) | 114 | #define UPT_FS(r) REGS_FS((r)->gp) |
115 | #define UPT_GS_BASE(r) REGS_GS_BASE((r)->regs) | 115 | #define UPT_GS_BASE(r) REGS_GS_BASE((r)->gp) |
116 | #define UPT_GS(r) REGS_GS((r)->regs) | 116 | #define UPT_GS(r) REGS_GS((r)->gp) |
117 | #define UPT_DS(r) REGS_DS((r)->regs) | 117 | #define UPT_DS(r) REGS_DS((r)->gp) |
118 | #define UPT_ES(r) REGS_ES((r)->regs) | 118 | #define UPT_ES(r) REGS_ES((r)->gp) |
119 | #define UPT_CS(r) REGS_CS((r)->regs) | 119 | #define UPT_CS(r) REGS_CS((r)->gp) |
120 | #define UPT_SS(r) REGS_SS((r)->regs) | 120 | #define UPT_SS(r) REGS_SS((r)->gp) |
121 | #define UPT_ORIG_RAX(r) REGS_ORIG_RAX((r)->regs) | 121 | #define UPT_ORIG_RAX(r) REGS_ORIG_RAX((r)->gp) |
122 | 122 | ||
123 | #define UPT_IP(r) REGS_IP((r)->regs) | 123 | #define UPT_IP(r) REGS_IP((r)->gp) |
124 | #define UPT_SP(r) REGS_SP((r)->regs) | 124 | #define UPT_SP(r) REGS_SP((r)->gp) |
125 | 125 | ||
126 | #define UPT_EFLAGS(r) REGS_EFLAGS((r)->regs) | 126 | #define UPT_EFLAGS(r) REGS_EFLAGS((r)->gp) |
127 | #define UPT_SYSCALL_NR(r) ((r)->syscall) | 127 | #define UPT_SYSCALL_NR(r) ((r)->syscall) |
128 | #define UPT_SYSCALL_RET(r) UPT_RAX(r) | 128 | #define UPT_SYSCALL_RET(r) UPT_RAX(r) |
129 | 129 | ||
@@ -228,7 +228,7 @@ struct syscall_args { | |||
228 | #define UPT_SET_SYSCALL_RETURN(r, res) \ | 228 | #define UPT_SET_SYSCALL_RETURN(r, res) \ |
229 | REGS_SET_SYSCALL_RETURN((r)->regs, (res)) | 229 | REGS_SET_SYSCALL_RETURN((r)->regs, (res)) |
230 | 230 | ||
231 | #define UPT_RESTART_SYSCALL(r) REGS_RESTART_SYSCALL((r)->regs) | 231 | #define UPT_RESTART_SYSCALL(r) REGS_RESTART_SYSCALL((r)->gp) |
232 | 232 | ||
233 | #define UPT_SEGV_IS_FIXABLE(r) REGS_SEGV_IS_FIXABLE(&r->skas) | 233 | #define UPT_SEGV_IS_FIXABLE(r) REGS_SEGV_IS_FIXABLE(&r->skas) |
234 | 234 | ||
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c index 7c037fa9c5b8..8a6882dfba01 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c | |||
@@ -201,9 +201,9 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp, | |||
201 | if (current->thread.forking) { | 201 | if (current->thread.forking) { |
202 | memcpy(&p->thread.regs.regs, ®s->regs, | 202 | memcpy(&p->thread.regs.regs, ®s->regs, |
203 | sizeof(p->thread.regs.regs)); | 203 | sizeof(p->thread.regs.regs)); |
204 | REGS_SET_SYSCALL_RETURN(p->thread.regs.regs.regs, 0); | 204 | REGS_SET_SYSCALL_RETURN(p->thread.regs.regs.gp, 0); |
205 | if (sp != 0) | 205 | if (sp != 0) |
206 | REGS_SP(p->thread.regs.regs.regs) = sp; | 206 | REGS_SP(p->thread.regs.regs.gp) = sp; |
207 | 207 | ||
208 | handler = fork_handler; | 208 | handler = fork_handler; |
209 | 209 | ||
diff --git a/arch/um/kernel/skas/syscall.c b/arch/um/kernel/skas/syscall.c index 8582c1331048..50b476f2b38d 100644 --- a/arch/um/kernel/skas/syscall.c +++ b/arch/um/kernel/skas/syscall.c | |||
@@ -34,7 +34,7 @@ void handle_syscall(struct uml_pt_regs *r) | |||
34 | result = -ENOSYS; | 34 | result = -ENOSYS; |
35 | else result = EXECUTE_SYSCALL(syscall, regs); | 35 | else result = EXECUTE_SYSCALL(syscall, regs); |
36 | 36 | ||
37 | REGS_SET_SYSCALL_RETURN(r->regs, result); | 37 | REGS_SET_SYSCALL_RETURN(r->gp, result); |
38 | 38 | ||
39 | syscall_trace(r, 1); | 39 | syscall_trace(r, 1); |
40 | } | 40 | } |
diff --git a/arch/um/os-Linux/registers.c b/arch/um/os-Linux/registers.c index 14732f98e0a2..b06c780e8dba 100644 --- a/arch/um/os-Linux/registers.c +++ b/arch/um/os-Linux/registers.c | |||
@@ -16,14 +16,14 @@ static unsigned long exec_regs[MAX_REG_NR]; | |||
16 | 16 | ||
17 | void init_thread_registers(struct uml_pt_regs *to) | 17 | void init_thread_registers(struct uml_pt_regs *to) |
18 | { | 18 | { |
19 | memcpy(to->regs, exec_regs, sizeof(to->regs)); | 19 | memcpy(to->gp, exec_regs, sizeof(to->gp)); |
20 | } | 20 | } |
21 | 21 | ||
22 | void save_registers(int pid, struct uml_pt_regs *regs) | 22 | void save_registers(int pid, struct uml_pt_regs *regs) |
23 | { | 23 | { |
24 | int err; | 24 | int err; |
25 | 25 | ||
26 | err = ptrace(PTRACE_GETREGS, pid, 0, regs->regs); | 26 | err = ptrace(PTRACE_GETREGS, pid, 0, regs->gp); |
27 | if (err < 0) | 27 | if (err < 0) |
28 | panic("save_registers - saving registers failed, errno = %d\n", | 28 | panic("save_registers - saving registers failed, errno = %d\n", |
29 | errno); | 29 | errno); |
@@ -33,7 +33,7 @@ void restore_registers(int pid, struct uml_pt_regs *regs) | |||
33 | { | 33 | { |
34 | int err; | 34 | int err; |
35 | 35 | ||
36 | err = ptrace(PTRACE_SETREGS, pid, 0, regs->regs); | 36 | err = ptrace(PTRACE_SETREGS, pid, 0, regs->gp); |
37 | if (err < 0) | 37 | if (err < 0) |
38 | panic("restore_registers - saving registers failed, " | 38 | panic("restore_registers - saving registers failed, " |
39 | "errno = %d\n", errno); | 39 | "errno = %d\n", errno); |
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c index a20d313c823e..8e96c6dc6c90 100644 --- a/arch/um/os-Linux/skas/process.c +++ b/arch/um/os-Linux/skas/process.c | |||
@@ -138,7 +138,7 @@ static void handle_trap(int pid, struct uml_pt_regs *regs, | |||
138 | int err, status; | 138 | int err, status; |
139 | 139 | ||
140 | /* Mark this as a syscall */ | 140 | /* Mark this as a syscall */ |
141 | UPT_SYSCALL_NR(regs) = PT_SYSCALL_NR(regs->regs); | 141 | UPT_SYSCALL_NR(regs) = PT_SYSCALL_NR(regs->gp); |
142 | 142 | ||
143 | if (!local_using_sysemu) | 143 | if (!local_using_sysemu) |
144 | { | 144 | { |
@@ -352,7 +352,7 @@ void userspace(struct uml_pt_regs *regs) | |||
352 | 352 | ||
353 | /* Avoid -ERESTARTSYS handling in host */ | 353 | /* Avoid -ERESTARTSYS handling in host */ |
354 | if (PT_SYSCALL_NR_OFFSET != PT_SYSCALL_RET_OFFSET) | 354 | if (PT_SYSCALL_NR_OFFSET != PT_SYSCALL_RET_OFFSET) |
355 | PT_SYSCALL_NR(regs->regs) = -1; | 355 | PT_SYSCALL_NR(regs->gp) = -1; |
356 | } | 356 | } |
357 | } | 357 | } |
358 | } | 358 | } |
diff --git a/arch/um/sys-i386/signal.c b/arch/um/sys-i386/signal.c index c82e5f562ec6..1eb21a023e33 100644 --- a/arch/um/sys-i386/signal.c +++ b/arch/um/sys-i386/signal.c | |||
@@ -14,22 +14,22 @@ void copy_sc(struct uml_pt_regs *regs, void *from) | |||
14 | { | 14 | { |
15 | struct sigcontext *sc = from; | 15 | struct sigcontext *sc = from; |
16 | 16 | ||
17 | REGS_GS(regs->regs) = sc->gs; | 17 | REGS_GS(regs->gp) = sc->gs; |
18 | REGS_FS(regs->regs) = sc->fs; | 18 | REGS_FS(regs->gp) = sc->fs; |
19 | REGS_ES(regs->regs) = sc->es; | 19 | REGS_ES(regs->gp) = sc->es; |
20 | REGS_DS(regs->regs) = sc->ds; | 20 | REGS_DS(regs->gp) = sc->ds; |
21 | REGS_EDI(regs->regs) = sc->edi; | 21 | REGS_EDI(regs->gp) = sc->edi; |
22 | REGS_ESI(regs->regs) = sc->esi; | 22 | REGS_ESI(regs->gp) = sc->esi; |
23 | REGS_EBP(regs->regs) = sc->ebp; | 23 | REGS_EBP(regs->gp) = sc->ebp; |
24 | REGS_SP(regs->regs) = sc->esp; | 24 | REGS_SP(regs->gp) = sc->esp; |
25 | REGS_EBX(regs->regs) = sc->ebx; | 25 | REGS_EBX(regs->gp) = sc->ebx; |
26 | REGS_EDX(regs->regs) = sc->edx; | 26 | REGS_EDX(regs->gp) = sc->edx; |
27 | REGS_ECX(regs->regs) = sc->ecx; | 27 | REGS_ECX(regs->gp) = sc->ecx; |
28 | REGS_EAX(regs->regs) = sc->eax; | 28 | REGS_EAX(regs->gp) = sc->eax; |
29 | REGS_IP(regs->regs) = sc->eip; | 29 | REGS_IP(regs->gp) = sc->eip; |
30 | REGS_CS(regs->regs) = sc->cs; | 30 | REGS_CS(regs->gp) = sc->cs; |
31 | REGS_EFLAGS(regs->regs) = sc->eflags; | 31 | REGS_EFLAGS(regs->gp) = sc->eflags; |
32 | REGS_SS(regs->regs) = sc->ss; | 32 | REGS_SS(regs->gp) = sc->ss; |
33 | } | 33 | } |
34 | 34 | ||
35 | static int copy_sc_from_user(struct pt_regs *regs, | 35 | static int copy_sc_from_user(struct pt_regs *regs, |
@@ -65,23 +65,23 @@ static int copy_sc_to_user(struct sigcontext __user *to, | |||
65 | struct faultinfo * fi = ¤t->thread.arch.faultinfo; | 65 | struct faultinfo * fi = ¤t->thread.arch.faultinfo; |
66 | int err; | 66 | int err; |
67 | 67 | ||
68 | sc.gs = REGS_GS(regs->regs.regs); | 68 | sc.gs = REGS_GS(regs->regs.gp); |
69 | sc.fs = REGS_FS(regs->regs.regs); | 69 | sc.fs = REGS_FS(regs->regs.gp); |
70 | sc.es = REGS_ES(regs->regs.regs); | 70 | sc.es = REGS_ES(regs->regs.gp); |
71 | sc.ds = REGS_DS(regs->regs.regs); | 71 | sc.ds = REGS_DS(regs->regs.gp); |
72 | sc.edi = REGS_EDI(regs->regs.regs); | 72 | sc.edi = REGS_EDI(regs->regs.gp); |
73 | sc.esi = REGS_ESI(regs->regs.regs); | 73 | sc.esi = REGS_ESI(regs->regs.gp); |
74 | sc.ebp = REGS_EBP(regs->regs.regs); | 74 | sc.ebp = REGS_EBP(regs->regs.gp); |
75 | sc.esp = sp; | 75 | sc.esp = sp; |
76 | sc.ebx = REGS_EBX(regs->regs.regs); | 76 | sc.ebx = REGS_EBX(regs->regs.gp); |
77 | sc.edx = REGS_EDX(regs->regs.regs); | 77 | sc.edx = REGS_EDX(regs->regs.gp); |
78 | sc.ecx = REGS_ECX(regs->regs.regs); | 78 | sc.ecx = REGS_ECX(regs->regs.gp); |
79 | sc.eax = REGS_EAX(regs->regs.regs); | 79 | sc.eax = REGS_EAX(regs->regs.gp); |
80 | sc.eip = REGS_IP(regs->regs.regs); | 80 | sc.eip = REGS_IP(regs->regs.gp); |
81 | sc.cs = REGS_CS(regs->regs.regs); | 81 | sc.cs = REGS_CS(regs->regs.gp); |
82 | sc.eflags = REGS_EFLAGS(regs->regs.regs); | 82 | sc.eflags = REGS_EFLAGS(regs->regs.gp); |
83 | sc.esp_at_signal = regs->regs.regs[UESP]; | 83 | sc.esp_at_signal = regs->regs.gp[UESP]; |
84 | sc.ss = regs->regs.regs[SS]; | 84 | sc.ss = regs->regs.gp[SS]; |
85 | sc.cr2 = fi->cr2; | 85 | sc.cr2 = fi->cr2; |
86 | sc.err = fi->error_code; | 86 | sc.err = fi->error_code; |
87 | sc.trapno = fi->trap_no; | 87 | sc.trapno = fi->trap_no; |
diff --git a/arch/um/sys-x86_64/signal.c b/arch/um/sys-x86_64/signal.c index 9001d17fc3d8..c98dd7f31396 100644 --- a/arch/um/sys-x86_64/signal.c +++ b/arch/um/sys-x86_64/signal.c | |||
@@ -16,7 +16,7 @@ void copy_sc(struct uml_pt_regs *regs, void *from) | |||
16 | struct sigcontext *sc = from; | 16 | struct sigcontext *sc = from; |
17 | 17 | ||
18 | #define GETREG(regs, regno, sc, regname) \ | 18 | #define GETREG(regs, regno, sc, regname) \ |
19 | (regs)->regs[(regno) / sizeof(unsigned long)] = (sc)->regname | 19 | (regs)->gp[(regno) / sizeof(unsigned long)] = (sc)->regname |
20 | 20 | ||
21 | GETREG(regs, R8, sc, r8); | 21 | GETREG(regs, R8, sc, r8); |
22 | GETREG(regs, R9, sc, r9); | 22 | GETREG(regs, R9, sc, r9); |
@@ -47,7 +47,7 @@ static int copy_sc_from_user(struct pt_regs *regs, | |||
47 | int err = 0; | 47 | int err = 0; |
48 | 48 | ||
49 | #define GETREG(regs, regno, sc, regname) \ | 49 | #define GETREG(regs, regno, sc, regname) \ |
50 | __get_user((regs)->regs.regs[(regno) / sizeof(unsigned long)], \ | 50 | __get_user((regs)->regs.gp[(regno) / sizeof(unsigned long)], \ |
51 | &(sc)->regname) | 51 | &(sc)->regname) |
52 | 52 | ||
53 | err |= GETREG(regs, R8, from, r8); | 53 | err |= GETREG(regs, R8, from, r8); |
@@ -86,7 +86,7 @@ static int copy_sc_to_user(struct sigcontext __user *to, | |||
86 | err |= __put_user(0, &to->fs); | 86 | err |= __put_user(0, &to->fs); |
87 | 87 | ||
88 | #define PUTREG(regs, regno, sc, regname) \ | 88 | #define PUTREG(regs, regno, sc, regname) \ |
89 | __put_user((regs)->regs.regs[(regno) / sizeof(unsigned long)], \ | 89 | __put_user((regs)->regs.gp[(regno) / sizeof(unsigned long)], \ |
90 | &(sc)->regname) | 90 | &(sc)->regname) |
91 | 91 | ||
92 | err |= PUTREG(regs, RDI, to, rdi); | 92 | err |= PUTREG(regs, RDI, to, rdi); |
diff --git a/arch/um/sys-x86_64/tls.c b/arch/um/sys-x86_64/tls.c index 3bd19a51ad6b..f7ba46200ecd 100644 --- a/arch/um/sys-x86_64/tls.c +++ b/arch/um/sys-x86_64/tls.c | |||
@@ -11,7 +11,7 @@ int arch_copy_tls(struct task_struct *t) | |||
11 | * (which is argument 5, child_tid, of clone) so it can be set | 11 | * (which is argument 5, child_tid, of clone) so it can be set |
12 | * during context switches. | 12 | * during context switches. |
13 | */ | 13 | */ |
14 | t->thread.arch.fs = t->thread.regs.regs.regs[R8 / sizeof(long)]; | 14 | t->thread.arch.fs = t->thread.regs.regs.gp[R8 / sizeof(long)]; |
15 | 15 | ||
16 | return 0; | 16 | return 0; |
17 | } | 17 | } |
diff --git a/include/asm-um/elf-x86_64.h b/include/asm-um/elf-x86_64.h index 857471c49dac..bfe27aa2c9c4 100644 --- a/include/asm-um/elf-x86_64.h +++ b/include/asm-um/elf-x86_64.h | |||
@@ -67,27 +67,27 @@ typedef struct { } elf_fpregset_t; | |||
67 | } while (0) | 67 | } while (0) |
68 | 68 | ||
69 | #define ELF_CORE_COPY_REGS(pr_reg, regs) \ | 69 | #define ELF_CORE_COPY_REGS(pr_reg, regs) \ |
70 | (pr_reg)[0] = (regs)->regs.skas.regs[0]; \ | 70 | (pr_reg)[0] = (regs)->regs.gp[0]; \ |
71 | (pr_reg)[1] = (regs)->regs.skas.regs[1]; \ | 71 | (pr_reg)[1] = (regs)->regs.gp[1]; \ |
72 | (pr_reg)[2] = (regs)->regs.skas.regs[2]; \ | 72 | (pr_reg)[2] = (regs)->regs.gp[2]; \ |
73 | (pr_reg)[3] = (regs)->regs.skas.regs[3]; \ | 73 | (pr_reg)[3] = (regs)->regs.gp[3]; \ |
74 | (pr_reg)[4] = (regs)->regs.skas.regs[4]; \ | 74 | (pr_reg)[4] = (regs)->regs.gp[4]; \ |
75 | (pr_reg)[5] = (regs)->regs.skas.regs[5]; \ | 75 | (pr_reg)[5] = (regs)->regs.gp[5]; \ |
76 | (pr_reg)[6] = (regs)->regs.skas.regs[6]; \ | 76 | (pr_reg)[6] = (regs)->regs.gp[6]; \ |
77 | (pr_reg)[7] = (regs)->regs.skas.regs[7]; \ | 77 | (pr_reg)[7] = (regs)->regs.gp[7]; \ |
78 | (pr_reg)[8] = (regs)->regs.skas.regs[8]; \ | 78 | (pr_reg)[8] = (regs)->regs.gp[8]; \ |
79 | (pr_reg)[9] = (regs)->regs.skas.regs[9]; \ | 79 | (pr_reg)[9] = (regs)->regs.gp[9]; \ |
80 | (pr_reg)[10] = (regs)->regs.skas.regs[10]; \ | 80 | (pr_reg)[10] = (regs)->regs.gp[10]; \ |
81 | (pr_reg)[11] = (regs)->regs.skas.regs[11]; \ | 81 | (pr_reg)[11] = (regs)->regs.gp[11]; \ |
82 | (pr_reg)[12] = (regs)->regs.skas.regs[12]; \ | 82 | (pr_reg)[12] = (regs)->regs.gp[12]; \ |
83 | (pr_reg)[13] = (regs)->regs.skas.regs[13]; \ | 83 | (pr_reg)[13] = (regs)->regs.gp[13]; \ |
84 | (pr_reg)[14] = (regs)->regs.skas.regs[14]; \ | 84 | (pr_reg)[14] = (regs)->regs.gp[14]; \ |
85 | (pr_reg)[15] = (regs)->regs.skas.regs[15]; \ | 85 | (pr_reg)[15] = (regs)->regs.gp[15]; \ |
86 | (pr_reg)[16] = (regs)->regs.skas.regs[16]; \ | 86 | (pr_reg)[16] = (regs)->regs.gp[16]; \ |
87 | (pr_reg)[17] = (regs)->regs.skas.regs[17]; \ | 87 | (pr_reg)[17] = (regs)->regs.gp[17]; \ |
88 | (pr_reg)[18] = (regs)->regs.skas.regs[18]; \ | 88 | (pr_reg)[18] = (regs)->regs.gp[18]; \ |
89 | (pr_reg)[19] = (regs)->regs.skas.regs[19]; \ | 89 | (pr_reg)[19] = (regs)->regs.gp[19]; \ |
90 | (pr_reg)[20] = (regs)->regs.skas.regs[20]; \ | 90 | (pr_reg)[20] = (regs)->regs.gp[20]; \ |
91 | (pr_reg)[21] = current->thread.arch.fs; \ | 91 | (pr_reg)[21] = current->thread.arch.fs; \ |
92 | (pr_reg)[22] = 0; \ | 92 | (pr_reg)[22] = 0; \ |
93 | (pr_reg)[23] = 0; \ | 93 | (pr_reg)[23] = 0; \ |