aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/sys-x86_64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/sys-x86_64')
-rw-r--r--arch/um/sys-x86_64/bugs.c2
-rw-r--r--arch/um/sys-x86_64/fault.c2
-rw-r--r--arch/um/sys-x86_64/signal.c35
-rw-r--r--arch/um/sys-x86_64/syscalls.c9
-rw-r--r--arch/um/sys-x86_64/tls.c2
5 files changed, 16 insertions, 34 deletions
diff --git a/arch/um/sys-x86_64/bugs.c b/arch/um/sys-x86_64/bugs.c
index 095478890371..506b6765bbcb 100644
--- a/arch/um/sys-x86_64/bugs.c
+++ b/arch/um/sys-x86_64/bugs.c
@@ -14,7 +14,7 @@ void arch_check_bugs(void)
14{ 14{
15} 15}
16 16
17int arch_handle_signal(int sig, union uml_pt_regs *regs) 17int arch_handle_signal(int sig, struct uml_pt_regs *regs)
18{ 18{
19 return 0; 19 return 0;
20} 20}
diff --git a/arch/um/sys-x86_64/fault.c b/arch/um/sys-x86_64/fault.c
index 4636b1465b6c..79f37ef3dceb 100644
--- a/arch/um/sys-x86_64/fault.c
+++ b/arch/um/sys-x86_64/fault.c
@@ -14,7 +14,7 @@ struct exception_table_entry
14}; 14};
15 15
16const struct exception_table_entry *search_exception_tables(unsigned long add); 16const struct exception_table_entry *search_exception_tables(unsigned long add);
17int arch_fixup(unsigned long address, union uml_pt_regs *regs) 17int arch_fixup(unsigned long address, struct uml_pt_regs *regs)
18{ 18{
19 const struct exception_table_entry *fixup; 19 const struct exception_table_entry *fixup;
20 20
diff --git a/arch/um/sys-x86_64/signal.c b/arch/um/sys-x86_64/signal.c
index 2d6cdd260c26..a06d66d0c409 100644
--- a/arch/um/sys-x86_64/signal.c
+++ b/arch/um/sys-x86_64/signal.c
@@ -16,12 +16,12 @@
16#include "frame_kern.h" 16#include "frame_kern.h"
17#include "skas.h" 17#include "skas.h"
18 18
19void copy_sc(union uml_pt_regs *regs, void *from) 19void copy_sc(struct uml_pt_regs *regs, void *from)
20{ 20{
21 struct sigcontext *sc = from; 21 struct sigcontext *sc = from;
22 22
23#define GETREG(regs, regno, sc, regname) \ 23#define GETREG(regs, regno, sc, regname) \
24 (regs)->skas.regs[(regno) / sizeof(unsigned long)] = (sc)->regname 24 (regs)->regs[(regno) / sizeof(unsigned long)] = (sc)->regname
25 25
26 GETREG(regs, R8, sc, r8); 26 GETREG(regs, R8, sc, r8);
27 GETREG(regs, R9, sc, r9); 27 GETREG(regs, R9, sc, r9);
@@ -46,13 +46,13 @@ void copy_sc(union uml_pt_regs *regs, void *from)
46#undef GETREG 46#undef GETREG
47} 47}
48 48
49static int copy_sc_from_user_skas(struct pt_regs *regs, 49static int copy_sc_from_user(struct pt_regs *regs,
50 struct sigcontext __user *from) 50 struct sigcontext __user *from)
51{ 51{
52 int err = 0; 52 int err = 0;
53 53
54#define GETREG(regs, regno, sc, regname) \ 54#define GETREG(regs, regno, sc, regname) \
55 __get_user((regs)->regs.skas.regs[(regno) / sizeof(unsigned long)], \ 55 __get_user((regs)->regs.regs[(regno) / sizeof(unsigned long)], \
56 &(sc)->regname) 56 &(sc)->regname)
57 57
58 err |= GETREG(regs, R8, from, r8); 58 err |= GETREG(regs, R8, from, r8);
@@ -80,10 +80,9 @@ static int copy_sc_from_user_skas(struct pt_regs *regs,
80 return err; 80 return err;
81} 81}
82 82
83int copy_sc_to_user_skas(struct sigcontext __user *to, 83static int copy_sc_to_user(struct sigcontext __user *to,
84 struct _fpstate __user *to_fp, 84 struct _fpstate __user *to_fp, struct pt_regs *regs,
85 struct pt_regs *regs, unsigned long mask, 85 unsigned long mask, unsigned long sp)
86 unsigned long sp)
87{ 86{
88 struct faultinfo * fi = &current->thread.arch.faultinfo; 87 struct faultinfo * fi = &current->thread.arch.faultinfo;
89 int err = 0; 88 int err = 0;
@@ -92,7 +91,7 @@ int copy_sc_to_user_skas(struct sigcontext __user *to,
92 err |= __put_user(0, &to->fs); 91 err |= __put_user(0, &to->fs);
93 92
94#define PUTREG(regs, regno, sc, regname) \ 93#define PUTREG(regs, regno, sc, regname) \
95 __put_user((regs)->regs.skas.regs[(regno) / sizeof(unsigned long)], \ 94 __put_user((regs)->regs.regs[(regno) / sizeof(unsigned long)], \
96 &(sc)->regname) 95 &(sc)->regname)
97 96
98 err |= PUTREG(regs, RDI, to, rdi); 97 err |= PUTREG(regs, RDI, to, rdi);
@@ -130,22 +129,6 @@ int copy_sc_to_user_skas(struct sigcontext __user *to,
130 return(err); 129 return(err);
131} 130}
132 131
133static int copy_sc_from_user(struct pt_regs *to, void __user *from)
134{
135 int ret;
136
137 ret = copy_sc_from_user_skas(to, from);
138 return(ret);
139}
140
141static int copy_sc_to_user(struct sigcontext __user *to,
142 struct _fpstate __user *fp,
143 struct pt_regs *from, unsigned long mask,
144 unsigned long sp)
145{
146 return copy_sc_to_user_skas(to, fp, from, mask, sp);
147}
148
149struct rt_sigframe 132struct rt_sigframe
150{ 133{
151 char __user *pretcode; 134 char __user *pretcode;
diff --git a/arch/um/sys-x86_64/syscalls.c b/arch/um/sys-x86_64/syscalls.c
index d44398c9d27a..bbcab773b23d 100644
--- a/arch/um/sys-x86_64/syscalls.c
+++ b/arch/um/sys-x86_64/syscalls.c
@@ -28,8 +28,7 @@ asmlinkage long sys_uname64(struct new_utsname __user * name)
28 return err ? -EFAULT : 0; 28 return err ? -EFAULT : 0;
29} 29}
30 30
31long arch_prctl_skas(struct task_struct *task, int code, 31long arch_prctl(struct task_struct *task, int code, unsigned long __user *addr)
32 unsigned long __user *addr)
33{ 32{
34 unsigned long *ptr = addr, tmp; 33 unsigned long *ptr = addr, tmp;
35 long ret; 34 long ret;
@@ -91,7 +90,7 @@ long arch_prctl_skas(struct task_struct *task, int code,
91 90
92long sys_arch_prctl(int code, unsigned long addr) 91long sys_arch_prctl(int code, unsigned long addr)
93{ 92{
94 return arch_prctl_skas(current, code, (unsigned long __user *) addr); 93 return arch_prctl(current, code, (unsigned long __user *) addr);
95} 94}
96 95
97long sys_clone(unsigned long clone_flags, unsigned long newsp, 96long sys_clone(unsigned long clone_flags, unsigned long newsp,
@@ -108,10 +107,10 @@ long sys_clone(unsigned long clone_flags, unsigned long newsp,
108 return ret; 107 return ret;
109} 108}
110 109
111void arch_switch_to_skas(struct task_struct *from, struct task_struct *to) 110void arch_switch_to(struct task_struct *from, struct task_struct *to)
112{ 111{
113 if((to->thread.arch.fs == 0) || (to->mm == NULL)) 112 if((to->thread.arch.fs == 0) || (to->mm == NULL))
114 return; 113 return;
115 114
116 arch_prctl_skas(to, ARCH_SET_FS, (void __user *) to->thread.arch.fs); 115 arch_prctl(to, ARCH_SET_FS, (void __user *) to->thread.arch.fs);
117} 116}
diff --git a/arch/um/sys-x86_64/tls.c b/arch/um/sys-x86_64/tls.c
index febbc94be25f..fcd5217c26a5 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.skas.regs[R8 / sizeof(long)]; 14 t->thread.arch.fs = t->thread.regs.regs.regs[R8 / sizeof(long)];
15 15
16 return 0; 16 return 0;
17} 17}