From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751463AbcBMMLk (ORCPT ); Sat, 13 Feb 2016 07:11:40 -0500 Received: from casper.infradead.org ([85.118.1.10]:56005 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751315AbcBMMLj (ORCPT ); Sat, 13 Feb 2016 07:11:39 -0500 Date: Sat, 13 Feb 2016 13:11:37 +0100 From: Peter Zijlstra To: Yang Shi Cc: mingo@redhat.com, linux-kernel@vger.kernel.org, linaro-kernel@lists.linaro.org Subject: Re: [PATCH] lib/Kconfig: make PREEMPT_COUNT depend on PREEMPT in DEBUG_ATOMIC_SLEEP Message-ID: <20160213121137.GC6357@twins.programming.kicks-ass.net> References: <1455300862-453-1-git-send-email-yang.shi@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1455300862-453-1-git-send-email-yang.shi@linaro.org> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 12, 2016 at 10:14:22AM -0800, Yang Shi wrote: > When building non-preempt kernel (PREEMPT_NONE), PREEMPT_COUNT is still enabled > if DEBUG_ATOMIC_SLEEP is enabled. But, it sounds not make sense to have > PREEMPT_COUNT set in non-preempt kernel. > > So, make PREEMPT_COUNT depend on PREEMPT here. > > Signed-off-by: Yang Shi > --- > lib/Kconfig.debug | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index ecb9e75..a5b6e11 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -1075,7 +1075,7 @@ config DEBUG_LOCKDEP > > config DEBUG_ATOMIC_SLEEP > bool "Sleep inside atomic section checking" > - select PREEMPT_COUNT > + select PREEMPT_COUNT if PREEMPT OK, so do tell, how is it supposed to debug atomic sections without actually tracking atomic sections?