Commit 92fb1eff authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Fix CONFIG_DEBUG_SPINLOCK on UP

The spinlock debugging feature is supposed to work even on uniprocessor
kernels.  So we need to instantiate kernel_flag regardless of CONFIG_SMP.
parent df6d0861
...@@ -124,6 +124,9 @@ ...@@ -124,6 +124,9 @@
(NS_TO_JIFFIES((p)->sleep_avg) * MAX_BONUS / \ (NS_TO_JIFFIES((p)->sleep_avg) * MAX_BONUS / \
MAX_SLEEP_AVG) 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 #ifdef CONFIG_SMP
#define TIMESLICE_GRANULARITY(p) (MIN_TIMESLICE * \ #define TIMESLICE_GRANULARITY(p) (MIN_TIMESLICE * \
(1 << (((MAX_BONUS - CURRENT_BONUS(p)) ? : 1) - 1)) * \ (1 << (((MAX_BONUS - CURRENT_BONUS(p)) ? : 1) - 1)) * \
...@@ -2867,7 +2870,6 @@ __init int migration_init(void) ...@@ -2867,7 +2870,6 @@ __init int migration_init(void)
* *
* Don't use in new code. * Don't use in new code.
*/ */
spinlock_t kernel_flag __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
EXPORT_SYMBOL(kernel_flag); EXPORT_SYMBOL(kernel_flag);
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment