]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Fix CONFIG_DEBUG_SPINLOCK on UP
authorAndrew Morton <akpm@osdl.org>
Mon, 26 Jan 2004 05:12:28 +0000 (21:12 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Mon, 26 Jan 2004 05:12:28 +0000 (21:12 -0800)
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

index d233ad6a44fe04ce115d878ef48b348b5a2a8cfb..574327cd2e4828cc0183cf1a28a2a47a1df9563e 100644 (file)
        (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)) * \
@@ -2867,7 +2870,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