From 9674cdc74d63f346870943ef966a034f8c71ee57 Mon Sep 17 00:00:00 2001 From: Maxim Kuvyrkov Date: Mon, 7 Dec 2009 00:24:27 -0800 Subject: 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 Signed-off-by: Geert Uytterhoeven --- arch/m68k/kernel/process.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'arch/m68k/kernel/process.c') diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c index 05296593e718..17c3f325255d 100644 --- a/arch/m68k/kernel/process.c +++ b/arch/m68k/kernel/process.c @@ -251,6 +251,10 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, p->thread.usp = usp; p->thread.ksp = (unsigned long)childstack; + + if (clone_flags & CLONE_SETTLS) + task_thread_info(p)->tp_value = regs->d5; + /* * Must save the current SFC/DFC value, NOT the value when * the parent was last descheduled - RGH 10-08-96 -- cgit