CONFIG_DEBUG_SPINLOCK only adds spinlock tests for SMP builds. The attached patch adds runtime checks for uniprocessor builds. Tested on i386/UP, but it should work on all platforms. It contains runtime checks for: - missing initialization - recursive lock - double unlock - incorrect use of spin_is_locked() or spin_trylock() [both function do not work as expected on uniprocessor builds] The next step are checks for spinlock ordering mismatches. Which other runtime checks are possible? Tests for correct _irq usage are not possible, several drivers use disable_irq(). -- Manfred