Select CONFIG_PREEMPT_COUNT when we enable the sleeping insidespinlock detection, so that the preempt offset gets correctlyincremented/decremented from preempt_disable()/preempt_enable().

This makes the preempt count eventually working in !CONFIG_PREEMPTwhen that debug option is set and thus fixes the detection of explicitpreemption disabled sections under such config. Code that sleepsin explicitly preempt disabled section can be finally spottedin non-preemptible kernels.

config DEBUG_SPINLOCK_SLEEP bool "Spinlock debugging: sleep-inside-spinlock checking"+ select PREEMPT_COUNT depends on DEBUG_KERNEL help If you say Y here, various routines which may sleep will become very-- 1.7.5.4