From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Fri, 04 Oct 2013 17:22:17 +0000 Subject: Re: [PATCH 2/3] kvm/ppc: IRQ disabling cleanup Message-Id: <1380907337.7979.7.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 <1378418970.12204.143.camel@snotra.buserror.net> 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 Fri, 2013-09-06 at 01:06 +0200, Alexander Graf wrote: > On 06.09.2013, at 00:09, Scott Wood wrote: > > > 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? > > IIUC it was ok. Ben, could you please verify? ping -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: Fri, 4 Oct 2013 12:22:17 -0500 Message-ID: <1380907337.7979.7.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 <1378418970.12204.143.camel@snotra.buserror.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Benjamin Herrenschmidt , "" , " list" To: Alexander Graf Return-path: Received: from am1ehsobe002.messaging.microsoft.com ([213.199.154.205]:20303 "EHLO am1outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752239Ab3JDRhg (ORCPT ); Fri, 4 Oct 2013 13:37:36 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Fri, 2013-09-06 at 01:06 +0200, Alexander Graf wrote: > On 06.09.2013, at 00:09, Scott Wood wrote: > > > 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? > > IIUC it was ok. Ben, could you please verify? ping -Scott