Commit e6b162a6 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull m68knommu update from Greg Ungerer:

 - fix task info flags handling for 68000 nommu

* tag 'm68knommu-for-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
  m68k: Fix task info flags handling for 68000
parents c43267e6 2c680514
Loading
Loading
Loading
Loading
+13 −8
Original line number Diff line number Diff line
@@ -18,6 +18,13 @@

.text

/* get thread_info pointer into a2 */
 .macro getthreadinfo
	movel	%sp,%d1
	andl	#-THREAD_SIZE,%d1
	movel	%d1,%a2
 .endm

.globl system_call
.globl resume
.globl ret_from_exception
@@ -70,9 +77,8 @@ ENTRY(system_call)

	movel	%sp@(PT_OFF_ORIG_D0),%d0

	movel	%sp,%d1			/* get thread_info pointer */
	andl	#-THREAD_SIZE,%d1
	movel	%d1,%a2
	/* Doing a trace ? */
	getthreadinfo
	btst	#(TIF_SYSCALL_TRACE%8),%a2@(TINFO_FLAGS+(31-TIF_SYSCALL_TRACE)/8)
	jne	do_trace
	cmpl	#NR_syscalls,%d0
@@ -96,16 +102,15 @@ Luser_return:
	/* heavy interrupt load*/
	andw	#ALLOWINT,%sr

	movel	%sp,%d1			/* get thread_info pointer */
	andl	#-THREAD_SIZE,%d1
	movel	%d1,%a2
	getthreadinfo
1:
	move	%a2@(TINFO_FLAGS),%d1	/* thread_info->flags */
	/* check if any of the flags are set */
	moveb	%a2@(TINFO_FLAGS + 3),%d1	/* thread_info->flags (low 8 bits) */
	jne	Lwork_to_do
	RESTORE_ALL

Lwork_to_do:
	movel	%a2@(TINFO_FLAGS),%d1	/* thread_info->flags */
	/* check if reschedule needs to be called */
	btst	#TIF_NEED_RESCHED,%d1
	jne	reschedule