Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9674cdc7 authored by Maxim Kuvyrkov's avatar Maxim Kuvyrkov Committed by Geert Uytterhoeven
Browse files

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: default avatarMaxim Kuvyrkov <maxim@codesourcery.com>
Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
parent f54bcdc2
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -71,6 +71,8 @@ struct switch_stack {
#define PTRACE_GETFPREGS          14
#define PTRACE_SETFPREGS          15

#define PTRACE_GET_THREAD_AREA    25

#define PTRACE_SINGLEBLOCK	33	/* resume execution until next branch */

#ifdef __KERNEL__
+1 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@ struct thread_info {
	struct exec_domain	*exec_domain;	/* execution domain */
	int			preempt_count;	/* 0 => preemptable, <0 => BUG */
	__u32 cpu; /* should always be 0 on m68k */
	unsigned long		tp_value;	/* thread pointer */
	struct restart_block    restart_block;
};
#endif /* __ASSEMBLY__ */
+5 −1
Original line number Diff line number Diff line
@@ -336,10 +336,14 @@
#define __NR_pwritev		330
#define __NR_rt_tgsigqueueinfo	331
#define __NR_perf_event_open	332
#define __NR_get_thread_area	333
#define __NR_set_thread_area	334
#define __NR_atomic_cmpxchg_32	335
#define __NR_atomic_barrier	336

#ifdef __KERNEL__

#define NR_syscalls		333
#define NR_syscalls		337

#define __ARCH_WANT_IPC_PARSE_VERSION
#define __ARCH_WANT_OLD_READDIR
+4 −0
Original line number Diff line number Diff line
@@ -761,4 +761,8 @@ sys_call_table:
	.long sys_pwritev		/* 330 */
	.long sys_rt_tgsigqueueinfo
	.long sys_perf_event_open
	.long sys_get_thread_area
	.long sys_set_thread_area
	.long sys_atomic_cmpxchg_32	/* 335 */
	.long sys_atomic_barrier
+4 −0
Original line number Diff line number Diff line
@@ -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
Loading