From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Thu, 05 Sep 2013 22:09:30 +0000 Subject: Re: [PATCH 2/3] kvm/ppc: IRQ disabling cleanup Message-Id: <1378418970.12204.143.camel@snotra.buserror.net> List-Id: References: <1373496461-2668-1-git-send-email-scottwood@freescale.com> <1373496461-2668-3-git-send-email-scottwood@freescale.com> <266797C8-1BBB-4867-BB1B-ABCCF072536E@suse.de> <1373497280.19894.38.camel@pasglop> <328E7C2E-1D19-41D5-95F4-B0AFCA320208@suse In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Alexander Graf Cc: Benjamin Herrenschmidt , "" , " list" On Thu, 2013-07-11 at 01:09 +0200, Alexander Graf wrote: > On 11.07.2013, at 01:08, Scott Wood wrote: > > > On 07/10/2013 06:04:53 PM, Alexander Graf wrote: > >> On 11.07.2013, at 01:01, Benjamin Herrenschmidt wrote: > >> > On Thu, 2013-07-11 at 00:57 +0200, Alexander Graf wrote: > >> >>> #ifdef CONFIG_PPC64 > >> >>> + /* > >> >>> + * To avoid races, the caller must have gone directly from having > >> >>> + * interrupts fully-enabled to hard-disabled. > >> >>> + */ > >> >>> + WARN_ON(local_paca->irq_happened != PACA_IRQ_HARD_DIS); > >> >> > >> >> WARN_ON(lazy_irq_pending()); ? > >> > > >> > Different semantics. What you propose will not catch irq_happened = 0 :-) > >> Right, but we only ever reach here after hard_irq_disable() I think. > > > > And the WARN_ON helps us ensure that it stays that way. > > Heh - ok :). Works for me. What's the status on this patch? -Scott From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Subject: Re: [PATCH 2/3] kvm/ppc: IRQ disabling cleanup Date: Thu, 5 Sep 2013 17:09:30 -0500 Message-ID: <1378418970.12204.143.camel@snotra.buserror.net> References: <1373496461-2668-1-git-send-email-scottwood@freescale.com> <1373496461-2668-3-git-send-email-scottwood@freescale.com> <266797C8-1BBB-4867-BB1B-ABCCF072536E@suse.de> <1373497280.19894.38.camel@pasglop> <328E7C2E-1D19-41D5-95F4-B0AFCA320208@suse Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Benjamin Herrenschmidt , "" , " list" To: Alexander Graf Return-path: In-Reply-To: Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Thu, 2013-07-11 at 01:09 +0200, Alexander Graf wrote: > On 11.07.2013, at 01:08, Scott Wood wrote: > > > On 07/10/2013 06:04:53 PM, Alexander Graf wrote: > >> On 11.07.2013, at 01:01, Benjamin Herrenschmidt wrote: > >> > On Thu, 2013-07-11 at 00:57 +0200, Alexander Graf wrote: > >> >>> #ifdef CONFIG_PPC64 > >> >>> + /* > >> >>> + * To avoid races, the caller must have gone directly from having > >> >>> + * interrupts fully-enabled to hard-disabled. > >> >>> + */ > >> >>> + WARN_ON(local_paca->irq_happened != PACA_IRQ_HARD_DIS); > >> >> > >> >> WARN_ON(lazy_irq_pending()); ? > >> > > >> > Different semantics. What you propose will not catch irq_happened == 0 :-) > >> Right, but we only ever reach here after hard_irq_disable() I think. > > > > And the WARN_ON helps us ensure that it stays that way. > > Heh - ok :). Works for me. What's the status on this patch? -Scott