diff options
Diffstat (limited to 'arch/m68knommu')
-rw-r--r-- | arch/m68knommu/kernel/process.c | 4 | ||||
-rw-r--r-- | arch/m68knommu/kernel/ptrace.c | 5 | ||||
-rw-r--r-- | arch/m68knommu/kernel/sys_m68k.c | 36 | ||||
-rw-r--r-- | arch/m68knommu/kernel/syscalltable.S | 4 | ||||
-rw-r--r-- | arch/m68knommu/mm/memory.c | 1 |
5 files changed, 49 insertions, 1 deletions
diff --git a/arch/m68knommu/kernel/process.c b/arch/m68knommu/kernel/process.c index 5c9ecd427090..959cb249c759 100644 --- a/arch/m68knommu/kernel/process.c +++ b/arch/m68knommu/kernel/process.c | |||
@@ -221,6 +221,10 @@ int copy_thread(unsigned long clone_flags, | |||
221 | 221 | ||
222 | p->thread.usp = usp; | 222 | p->thread.usp = usp; |
223 | p->thread.ksp = (unsigned long)childstack; | 223 | p->thread.ksp = (unsigned long)childstack; |
224 | |||
225 | if (clone_flags & CLONE_SETTLS) | ||
226 | task_thread_info(p)->tp_value = regs->d5; | ||
227 | |||
224 | /* | 228 | /* |
225 | * Must save the current SFC/DFC value, NOT the value when | 229 | * Must save the current SFC/DFC value, NOT the value when |
226 | * the parent was last descheduled - RGH 10-08-96 | 230 | * the parent was last descheduled - RGH 10-08-96 |
diff --git a/arch/m68knommu/kernel/ptrace.c b/arch/m68knommu/kernel/ptrace.c index 4d3828959fb0..85ed2f988f98 100644 --- a/arch/m68knommu/kernel/ptrace.c +++ b/arch/m68knommu/kernel/ptrace.c | |||
@@ -319,6 +319,11 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
319 | } | 319 | } |
320 | #endif | 320 | #endif |
321 | 321 | ||
322 | case PTRACE_GET_THREAD_AREA: | ||
323 | ret = put_user(task_thread_info(child)->tp_value, | ||
324 | (unsigned long __user *)data); | ||
325 | break; | ||
326 | |||
322 | default: | 327 | default: |
323 | ret = -EIO; | 328 | ret = -EIO; |
324 | break; | 329 | break; |
diff --git a/arch/m68knommu/kernel/sys_m68k.c b/arch/m68knommu/kernel/sys_m68k.c index b67cbc735a9b..923dd4aab875 100644 --- a/arch/m68knommu/kernel/sys_m68k.c +++ b/arch/m68knommu/kernel/sys_m68k.c | |||
@@ -190,3 +190,39 @@ int kernel_execve(const char *filename, char *const argv[], char *const envp[]) | |||
190 | : "d" (__a), "d" (__b), "d" (__c)); | 190 | : "d" (__a), "d" (__b), "d" (__c)); |
191 | return __res; | 191 | return __res; |
192 | } | 192 | } |
193 | |||
194 | asmlinkage unsigned long sys_get_thread_area(void) | ||
195 | { | ||
196 | return current_thread_info()->tp_value; | ||
197 | } | ||
198 | |||
199 | asmlinkage int sys_set_thread_area(unsigned long tp) | ||
200 | { | ||
201 | current_thread_info()->tp_value = tp; | ||
202 | return 0; | ||
203 | } | ||
204 | |||
205 | /* This syscall gets its arguments in A0 (mem), D2 (oldval) and | ||
206 | D1 (newval). */ | ||
207 | asmlinkage int | ||
208 | sys_atomic_cmpxchg_32(unsigned long newval, int oldval, int d3, int d4, int d5, | ||
209 | unsigned long __user * mem) | ||
210 | { | ||
211 | struct mm_struct *mm = current->mm; | ||
212 | unsigned long mem_value; | ||
213 | |||
214 | down_read(&mm->mmap_sem); | ||
215 | |||
216 | mem_value = *mem; | ||
217 | if (mem_value == oldval) | ||
218 | *mem = newval; | ||
219 | |||
220 | up_read(&mm->mmap_sem); | ||
221 | return mem_value; | ||
222 | } | ||
223 | |||
224 | asmlinkage int sys_atomic_barrier(void) | ||
225 | { | ||
226 | /* no code needed for uniprocs */ | ||
227 | return 0; | ||
228 | } | ||
diff --git a/arch/m68knommu/kernel/syscalltable.S b/arch/m68knommu/kernel/syscalltable.S index 486837efa3d7..56dd01ded148 100644 --- a/arch/m68knommu/kernel/syscalltable.S +++ b/arch/m68knommu/kernel/syscalltable.S | |||
@@ -351,6 +351,10 @@ ENTRY(sys_call_table) | |||
351 | .long sys_pwritev /* 330 */ | 351 | .long sys_pwritev /* 330 */ |
352 | .long sys_rt_tgsigqueueinfo | 352 | .long sys_rt_tgsigqueueinfo |
353 | .long sys_perf_event_open | 353 | .long sys_perf_event_open |
354 | .long sys_get_thread_area | ||
355 | .long sys_set_thread_area | ||
356 | .long sys_atomic_cmpxchg_32 /* 335 */ | ||
357 | .long sys_atomic_barrier | ||
354 | 358 | ||
355 | .rept NR_syscalls-(.-sys_call_table)/4 | 359 | .rept NR_syscalls-(.-sys_call_table)/4 |
356 | .long sys_ni_syscall | 360 | .long sys_ni_syscall |
diff --git a/arch/m68knommu/mm/memory.c b/arch/m68knommu/mm/memory.c index f93b88b51f9f..d5b9e1357808 100644 --- a/arch/m68knommu/mm/memory.c +++ b/arch/m68knommu/mm/memory.c | |||
@@ -24,7 +24,6 @@ | |||
24 | 24 | ||
25 | /* | 25 | /* |
26 | * Map some physical address range into the kernel address space. | 26 | * Map some physical address range into the kernel address space. |
27 | * The code is copied and adapted from map_chunk(). | ||
28 | */ | 27 | */ |
29 | 28 | ||
30 | unsigned long kernel_map(unsigned long paddr, unsigned long size, | 29 | unsigned long kernel_map(unsigned long paddr, unsigned long size, |