

The spinlock debugging feature is supposed to work even on uniprocessor
kernels.  So we need to instantiate kernel_flag regardless of CONFIG_SMP.



---

 kernel/sched.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff -puN kernel/sched.c~spinlock-debugging-fix kernel/sched.c
--- 25/kernel/sched.c~spinlock-debugging-fix	2004-01-24 16:18:59.000000000 -0800
+++ 25-akpm/kernel/sched.c	2004-01-24 16:18:59.000000000 -0800
@@ -124,6 +124,9 @@
 	(NS_TO_JIFFIES((p)->sleep_avg) * MAX_BONUS / \
 		MAX_SLEEP_AVG)
 
+/* spinlock debugging needs this, even on !CONFIG_SMP */
+spinlock_t kernel_flag __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
+
 #ifdef CONFIG_SMP
 #define TIMESLICE_GRANULARITY(p)	(MIN_TIMESLICE * \
 		(1 << (((MAX_BONUS - CURRENT_BONUS(p)) ? : 1) - 1)) * \
@@ -2874,7 +2877,6 @@ __init int migration_init(void)
  *
  * Don't use in new code.
  */
-spinlock_t kernel_flag __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
 
 EXPORT_SYMBOL(kernel_flag);
 #endif

_
