diff options
author | Maxim Kuvyrkov <maxim@codesourcery.com> | 2009-12-07 03:24:27 -0500 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2010-02-27 12:31:19 -0500 |
commit | 9674cdc74d63f346870943ef966a034f8c71ee57 (patch) | |
tree | c590640335983c5b1a7f5c9589478bf90fb68d03 /arch/m68k/include/asm | |
parent | f54bcdc2b81558a2b7e624cfeb4992422d9265f9 (diff) |
m68k: Add NPTL support
This patch adds several syscalls, that provide necessary
functionality to support NPTL on m68k/ColdFire.
The syscalls are get_thread_area, set_thread_area, atomic_cmpxchg_32 and
atomic_barrier.
The cmpxchg syscall is required for ColdFire as it doesn't support 'cas'
instruction.
Also a ptrace call PTRACE_GET_THREAD_AREA is added to allow debugger to
inspect the TLS storage.
Signed-off-by: Maxim Kuvyrkov <maxim@codesourcery.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/include/asm')
-rw-r--r-- | arch/m68k/include/asm/ptrace.h | 2 | ||||
-rw-r--r-- | arch/m68k/include/asm/thread_info_mm.h | 1 | ||||
-rw-r--r-- | arch/m68k/include/asm/unistd.h | 6 |
3 files changed, 8 insertions, 1 deletions
diff --git a/arch/m68k/include/asm/ptrace.h b/arch/m68k/include/asm/ptrace.h index ee4011c23281..21605c736f69 100644 --- a/arch/m68k/include/asm/ptrace.h +++ b/arch/m68k/include/asm/ptrace.h | |||
@@ -71,6 +71,8 @@ struct switch_stack { | |||
71 | #define PTRACE_GETFPREGS 14 | 71 | #define PTRACE_GETFPREGS 14 |
72 | #define PTRACE_SETFPREGS 15 | 72 | #define PTRACE_SETFPREGS 15 |
73 | 73 | ||
74 | #define PTRACE_GET_THREAD_AREA 25 | ||
75 | |||
74 | #define PTRACE_SINGLEBLOCK 33 /* resume execution until next branch */ | 76 | #define PTRACE_SINGLEBLOCK 33 /* resume execution until next branch */ |
75 | 77 | ||
76 | #ifdef __KERNEL__ | 78 | #ifdef __KERNEL__ |
diff --git a/arch/m68k/include/asm/thread_info_mm.h b/arch/m68k/include/asm/thread_info_mm.h index 167e518db41b..67266c683453 100644 --- a/arch/m68k/include/asm/thread_info_mm.h +++ b/arch/m68k/include/asm/thread_info_mm.h | |||
@@ -16,6 +16,7 @@ struct thread_info { | |||
16 | struct exec_domain *exec_domain; /* execution domain */ | 16 | struct exec_domain *exec_domain; /* execution domain */ |
17 | int preempt_count; /* 0 => preemptable, <0 => BUG */ | 17 | int preempt_count; /* 0 => preemptable, <0 => BUG */ |
18 | __u32 cpu; /* should always be 0 on m68k */ | 18 | __u32 cpu; /* should always be 0 on m68k */ |
19 | unsigned long tp_value; /* thread pointer */ | ||
19 | struct restart_block restart_block; | 20 | struct restart_block restart_block; |
20 | }; | 21 | }; |
21 | #endif /* __ASSEMBLY__ */ | 22 | #endif /* __ASSEMBLY__ */ |
diff --git a/arch/m68k/include/asm/unistd.h b/arch/m68k/include/asm/unistd.h index 48b87f5ced50..d72a71dabecb 100644 --- a/arch/m68k/include/asm/unistd.h +++ b/arch/m68k/include/asm/unistd.h | |||
@@ -336,10 +336,14 @@ | |||
336 | #define __NR_pwritev 330 | 336 | #define __NR_pwritev 330 |
337 | #define __NR_rt_tgsigqueueinfo 331 | 337 | #define __NR_rt_tgsigqueueinfo 331 |
338 | #define __NR_perf_event_open 332 | 338 | #define __NR_perf_event_open 332 |
339 | #define __NR_get_thread_area 333 | ||
340 | #define __NR_set_thread_area 334 | ||
341 | #define __NR_atomic_cmpxchg_32 335 | ||
342 | #define __NR_atomic_barrier 336 | ||
339 | 343 | ||
340 | #ifdef __KERNEL__ | 344 | #ifdef __KERNEL__ |
341 | 345 | ||
342 | #define NR_syscalls 333 | 346 | #define NR_syscalls 337 |
343 | 347 | ||
344 | #define __ARCH_WANT_IPC_PARSE_VERSION | 348 | #define __ARCH_WANT_IPC_PARSE_VERSION |
345 | #define __ARCH_WANT_OLD_READDIR | 349 | #define __ARCH_WANT_OLD_READDIR |