]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PATCH] m68k: thread_info header cleanup
authorAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
Mon, 14 Nov 2005 00:06:57 +0000 (16:06 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 14 Nov 2005 02:14:13 +0000 (18:14 -0800)
a) in smp_lock.h #include of sched.h and spinlock.h moved under #ifdef
   CONFIG_LOCK_KERNEL.

b) interrupt.h now explicitly pulls sched.h (not via smp_lock.h from
   hardirq.h as it used to)

c) in three more places we need changes to compensate for (a) - one place
   in arch/sparc needs string.h now, hardirq.h needs forward declaration of
   task_struct and preempt.h needs direct include of thread_info.h.

d) thread_info-related helpers in sched.h and thread_info.h put under
   ifndef __HAVE_THREAD_FUNCTIONS.  Obviously safe.

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/sparc/lib/bitext.c
include/linux/hardirq.h
include/linux/interrupt.h
include/linux/preempt.h
include/linux/sched.h
include/linux/smp_lock.h

index 94b05e8c906c78ca4701ccb766573f01b2798c75..2e168d16547f93234602de95762346a727b730d8 100644 (file)
@@ -10,6 +10,7 @@
  */
 
 #include <linux/smp_lock.h>
+#include <linux/string.h>
 #include <linux/bitops.h>
 
 #include <asm/bitext.h>
index 5912874ca83c829494775fc479fed5ebb664cca3..71d2b8a723b9ad24529f1e8c5896e38cd6419a6b 100644 (file)
@@ -90,6 +90,8 @@ extern void synchronize_irq(unsigned int irq);
 #define nmi_enter()            irq_enter()
 #define nmi_exit()             sub_preempt_count(HARDIRQ_OFFSET)
 
+struct task_struct;
+
 #ifndef CONFIG_VIRT_CPU_ACCOUNTING
 static inline void account_user_vtime(struct task_struct *tsk)
 {
index 0a90205184b0b4511776604fd0b37a6fc0cf6bc1..41f150a3d2dda5a2445b100d55c87a904834ccd8 100644 (file)
@@ -9,6 +9,7 @@
 #include <linux/preempt.h>
 #include <linux/cpumask.h>
 #include <linux/hardirq.h>
+#include <linux/sched.h>
 #include <asm/atomic.h>
 #include <asm/ptrace.h>
 #include <asm/system.h>
index dd98c54a23b4b44afd860603f2a3da73bb29ecbc..d9a2f5254a51194858091bec44bf6bfb43cb9168 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <linux/config.h>
+#include <linux/thread_info.h>
 #include <linux/linkage.h>
 
 #ifdef CONFIG_DEBUG_PREEMPT
index e4681256e43e6bb9286b71d1ec00ffe29dd10fc3..41df813957190adecba9015a4d17b7c13524f5f8 100644 (file)
@@ -1233,6 +1233,8 @@ static inline void task_unlock(struct task_struct *p)
        spin_unlock(&p->alloc_lock);
 }
 
+#ifndef __HAVE_THREAD_FUNCTIONS
+
 #define task_thread_info(task) (task)->thread_info
 
 static inline void setup_thread_stack(struct task_struct *p, struct task_struct *org)
@@ -1246,6 +1248,8 @@ static inline unsigned long *end_of_stack(struct task_struct *p)
        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
  */
index b63ce70140931e4f07079f50447b08de8bd63fcd..fa1ff3b165fe167739099c19625282eaa5ecd2e7 100644 (file)
@@ -2,11 +2,10 @@
 #define __LINUX_SMPLOCK_H
 
 #include <linux/config.h>
+#ifdef CONFIG_LOCK_KERNEL
 #include <linux/sched.h>
 #include <linux/spinlock.h>
 
-#ifdef CONFIG_LOCK_KERNEL
-
 #define kernel_locked()                (current->lock_depth >= 0)
 
 extern int __lockfunc __reacquire_kernel_lock(void);