diff options
Diffstat (limited to 'arch/um/sys-x86_64')
-rw-r--r-- | arch/um/sys-x86_64/delay.c | 11 | ||||
-rw-r--r-- | arch/um/sys-x86_64/syscalls.c | 6 |
2 files changed, 4 insertions, 13 deletions
diff --git a/arch/um/sys-x86_64/delay.c b/arch/um/sys-x86_64/delay.c index 137f4446b439..dee5be66da82 100644 --- a/arch/um/sys-x86_64/delay.c +++ b/arch/um/sys-x86_64/delay.c | |||
@@ -28,14 +28,3 @@ void __udelay(unsigned long usecs) | |||
28 | } | 28 | } |
29 | 29 | ||
30 | EXPORT_SYMBOL(__udelay); | 30 | EXPORT_SYMBOL(__udelay); |
31 | |||
32 | void __const_udelay(unsigned long usecs) | ||
33 | { | ||
34 | unsigned long i, n; | ||
35 | |||
36 | n = (loops_per_jiffy * HZ * usecs) / MILLION; | ||
37 | for(i=0;i<n;i++) | ||
38 | cpu_relax(); | ||
39 | } | ||
40 | |||
41 | EXPORT_SYMBOL(__const_udelay); | ||
diff --git a/arch/um/sys-x86_64/syscalls.c b/arch/um/sys-x86_64/syscalls.c index 01b91f9fa789..b3f6350cac44 100644 --- a/arch/um/sys-x86_64/syscalls.c +++ b/arch/um/sys-x86_64/syscalls.c | |||
@@ -103,6 +103,9 @@ long arch_prctl_skas(struct task_struct *task, int code, | |||
103 | 103 | ||
104 | switch(code){ | 104 | switch(code){ |
105 | case ARCH_SET_FS: | 105 | case ARCH_SET_FS: |
106 | current->thread.arch.fs = (unsigned long) ptr; | ||
107 | save_registers(pid, ¤t->thread.regs.regs); | ||
108 | break; | ||
106 | case ARCH_SET_GS: | 109 | case ARCH_SET_GS: |
107 | save_registers(pid, ¤t->thread.regs.regs); | 110 | save_registers(pid, ¤t->thread.regs.regs); |
108 | break; | 111 | break; |
@@ -140,9 +143,8 @@ long sys_clone(unsigned long clone_flags, unsigned long newsp, | |||
140 | 143 | ||
141 | void arch_switch_to_skas(struct task_struct *from, struct task_struct *to) | 144 | void arch_switch_to_skas(struct task_struct *from, struct task_struct *to) |
142 | { | 145 | { |
143 | if(to->thread.arch.fs == 0) | 146 | if((to->thread.arch.fs == 0) || (to->mm == NULL)) |
144 | return; | 147 | return; |
145 | 148 | ||
146 | arch_prctl_skas(to, ARCH_SET_FS, (void __user *) to->thread.arch.fs); | 149 | arch_prctl_skas(to, ARCH_SET_FS, (void __user *) to->thread.arch.fs); |
147 | } | 150 | } |
148 | |||