From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753781AbbHES1m (ORCPT ); Wed, 5 Aug 2015 14:27:42 -0400 Received: from smtprelay0065.hostedemail.com ([216.40.44.65]:46589 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752036AbbHES1k (ORCPT ); Wed, 5 Aug 2015 14:27:40 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2553:2559:2562:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3874:4605:5007:6261:7875:10004:10400:10848:10967:11026:11232:11473:11658:11914:12043:12296:12517:12519:12740:13069:13311:13357:14096:14097:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: cars74_258d9bc8b7d4b X-Filterd-Recvd-Size: 2391 Date: Wed, 5 Aug 2015 14:27:36 -0400 From: Steven Rostedt To: Andy Lutomirski Cc: Ingo Molnar , Andy Lutomirski , X86 ML , "linux-kernel@vger.kernel.org" , Brian Gerst , Willy Tarreau , Borislav Petkov , Thomas Gleixner , Peter Zijlstra , Linus Torvalds Subject: Re: [PATCH 1/3] x86/entry/64: Refactor IRQ stacks and make then NMI-safe Message-ID: <20150805142736.7dba3c8f@gandalf.local.home> In-Reply-To: References: <040374ca9800988a0ed35ea9ddeb4a762c1371fa.1437690860.git.luto@kernel.org> <20150805085957.GA23893@gmail.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 5 Aug 2015 11:24:54 -0700 Andy Lutomirski wrote: > On Wed, Aug 5, 2015 at 1:59 AM, Ingo Molnar wrote: > > > > * Andy Lutomirski wrote: > > > >> --- a/arch/x86/kernel/process_64.c > >> +++ b/arch/x86/kernel/process_64.c > >> @@ -280,6 +280,10 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) > >> unsigned fsindex, gsindex; > >> fpu_switch_t fpu_switch; > >> > >> +#ifdef CONFIG_DEBUG_ENTRY > >> + WARN_ON(this_cpu_read(irq_count)); > >> +#endif > > > > Please introduce a less noisy (to the eyes) version of this, something like: > > > > WARN_ON_DEBUG_ENTRY(this_cpu_read(irq_count)); > > > > or so, similar to WARN_ON_FPU(). > > I can do that (or "DEBUG_ENTRY_WARN_ON"? we seem to be inconsistent > about ordering). > > Or would if (IS_ENABLED(CONFIG_DEBUG_ENTRY)) WARN_ON(...) be better? > Does WARN_ON(IS_ENABLED(CONFIG_DEBUG_ENTRY) && this_cpu_read(irq_count)) work? -- Steve