Skip to contentSkip to conversation

(21/22) task_thread_info - part 4/4

PATCH New Al Viro 1 participant 1 message Aug 25, 2005

Subsystems (3)
lore
Share & tools
lore

Al Viro

author
#0 lore raw

PATCH 1/1 (21/22) task_thread_info - part 4/4

partially pulled from m68k CVS; switches m68k handling of thread flags to usual bitmap, which allows to unify most of the thread flag helpers. After that only task_thread_info(), stack_end() and setup_thread_info() are conditional on __HAVE_THREAD_FUNCTIONS.

----

arch/m68k/fpsp040/skeleton.S +2 -4
diff -urN RC13-rc7-m68k/arch/m68k/fpsp040/skeleton.S RC13-rc7-m68k-flags/arch/m68k/fpsp040/skeleton.S
@@ -381,10 +381,8 @@
 .Lnotkern:
 	SAVE_ALL_INT
 	GET_CURRENT(%d0)
-	tstb	%curptr@(TASK_NEEDRESCHED)
-	jne	ret_from_exception	| deliver signals,
-					| reschedule etc..
-	RESTORE_ALL
+	| deliver signals, reschedule etc..
+	jra	ret_from_exception
 
 |
 |	mem_write --- write to user or supervisor address space
arch/m68k/ifpsp060/iskeleton.S +2 -4
diff -urN RC13-rc7-m68k/arch/m68k/ifpsp060/iskeleton.S RC13-rc7-m68k-flags/arch/m68k/ifpsp060/iskeleton.S
@@ -75,10 +75,8 @@
 .Lnotkern:
 	SAVE_ALL_INT
 	GET_CURRENT(%d0)
-	tstb	%curptr@(TASK_NEEDRESCHED)
-	jne	ret_from_exception	| deliver signals,
-					| reschedule etc..
-	RESTORE_ALL
+	| deliver signals, reschedule etc..
+	jra	ret_from_exception
 
 |
 | _060_real_chk():
arch/m68k/kernel/asm-offsets.c +1 -6
diff -urN RC13-rc7-m68k/arch/m68k/kernel/asm-offsets.c RC13-rc7-m68k-flags/arch/m68k/kernel/asm-offsets.c
@@ -25,11 +25,6 @@
 	DEFINE(TASK_STATE, offsetof(struct task_struct, state));
 	DEFINE(TASK_FLAGS, offsetof(struct task_struct, flags));
 	DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace));
-	DEFINE(TASK_WORK, offsetof(struct task_struct, thread.work));
-	DEFINE(TASK_NEEDRESCHED, offsetof(struct task_struct, thread.work.need_resched));
-	DEFINE(TASK_SYSCALL_TRACE, offsetof(struct task_struct, thread.work.syscall_trace));
-	DEFINE(TASK_SIGPENDING, offsetof(struct task_struct, thread.work.sigpending));
-	DEFINE(TASK_NOTIFY_RESUME, offsetof(struct task_struct, thread.work.notify_resume));
 	DEFINE(TASK_THREAD, offsetof(struct task_struct, thread));
 	DEFINE(TASK_INFO, offsetof(struct task_struct, thread.info));
 	DEFINE(TASK_MM, offsetof(struct task_struct, mm));
@@ -48,7 +43,7 @@
 
 	/* offsets into the thread_info struct */
 	DEFINE(TINFO_PREEMPT, offsetof(struct thread_info, preempt_count));
-	DEFINE(HARDIRQ_SHIFT, HARDIRQ_SHIFT);
+	DEFINE(TINFO_FLAGS, offsetof(struct thread_info, flags));
 
 	/* offsets into the pt_regs */
 	DEFINE(PT_D0, offsetof(struct pt_regs, d0));
arch/m68k/kernel/entry.S +40 -38

156 lines not on this page · raw message

arch/m68k/kernel/ptrace.c +22 -34

105 lines not on this page · raw message

include/asm-m68k/processor.h +0 -12
diff -urN RC13-rc7-m68k/include/asm-m68k/processor.h RC13-rc7-m68k-flags/include/asm-m68k/processor.h
@@ -56,17 +56,6 @@
 #endif
 #define TASK_UNMAPPED_ALIGN(addr, off)	PAGE_ALIGN(addr)
 
-struct task_work {
-	unsigned char sigpending;
-	unsigned char notify_resume;	/* request for notification on
-					   userspace execution resumption */
-	char          need_resched;
-	unsigned char delayed_trace;	/* single step a syscall */
-	unsigned char syscall_trace;	/* count of syscall interceptors */
-	unsigned char memdie;		/* task was selected to be killed */
-	unsigned char pad[2];
-};
-
 struct thread_struct {
 	unsigned long  ksp;		/* kernel stack pointer */
 	unsigned long  usp;		/* user stack pointer */
@@ -79,7 +68,6 @@
 	unsigned long  fp[8*3];
 	unsigned long  fpcntl[3];	/* fp control regs */
 	unsigned char  fpstate[FPSTATESIZE];  /* floating point state */
-	struct task_work work;
 	struct thread_info info;
 };
 
include/asm-m68k/thread_info.h +9 -70

95 lines not on this page · raw message

include/linux/sched.h +2 -2
diff -urN RC13-rc7-m68k/include/linux/sched.h RC13-rc7-m68k-flags/include/linux/sched.h
@@ -1150,6 +1150,8 @@
 	return (unsigned long *)(p->thread_info + 1);
 }
 
+#endif
+
 /* set thread flags in other task's structures
  * - see asm/thread_info.h for TIF_xxxx flags available
  */
@@ -1178,8 +1180,6 @@
 	return test_ti_thread_flag(task_thread_info(tsk), flag);
 }
 
-#endif
-
 static inline void set_tsk_need_resched(struct task_struct *tsk)
 {
 	set_tsk_thread_flag(tsk,TIF_NEED_RESCHED);
include/linux/thread_info.h +12 -35

66 lines not on this page · raw message