From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH 1/4] kernel: local_irq_{save,restore}_nmi() Date: Fri, 04 Jun 2010 09:35:15 +0200 Message-ID: <1275636915.27810.38912.camel@twins> References: <20100409.160135.35854399.davem@davemloft.net> <20100604050347.GE31868@linux-sh.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Return-path: In-Reply-To: <20100604050347.GE31868@linux-sh.org> Sender: sparclinux-owner@vger.kernel.org To: Paul Mundt Cc: David Miller , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, sparclinux@vger.kernel.org List-Id: linux-arch.vger.kernel.org On Fri, 2010-06-04 at 14:03 +0900, Paul Mundt wrote: > On Fri, Apr 09, 2010 at 04:01:35PM -0700, David Miller wrote: > > > > Provide local_irq_{save,restore}_nmi() which will allow us to help > > architectures that implement NMIs using IRQ priorities like SPARC64 > > does. > > > > Sparc uses IRQ prio 15 for NMIs and implements local_irq_disable() as > > disable <= 14. However if you do that while inside an NMI you re- > > enable the NMI priority again, causing all kinds of fun. > > > > A more solid implementation would first check the disable level and > > never lower it, however that is more costly and would slow down the > > rest of the kernel for no particular reason. > > > > Therefore introduce local_irq_save_nmi() which can implement this > > slower but more solid scheme and dis-allow local_irq_save() from NMI > > context. > > > > Suggested-by: David Miller > > Signed-off-by: Peter Zijlstra > > Signed-off-by: David S. Miller > > Are there any updates for this patch series? I would like to make use of > this on SH as well, but it seems these haven't hit upstream yet. Dave found a better solution, see: b4f4372f96e0573d752d9e45beda02fabf716cc8 0c25e9e6cbe7b233bb91d14d0e2c258bf8e6ec83 c011f80ba0912486fe51dd2b3f71d9b33a151188 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([18.85.46.34]:55685 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751952Ab0FDHe4 convert rfc822-to-8bit (ORCPT ); Fri, 4 Jun 2010 03:34:56 -0400 Subject: Re: [PATCH 1/4] kernel: local_irq_{save,restore}_nmi() From: Peter Zijlstra In-Reply-To: <20100604050347.GE31868@linux-sh.org> References: <20100409.160135.35854399.davem@davemloft.net> <20100604050347.GE31868@linux-sh.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Date: Fri, 04 Jun 2010 09:35:15 +0200 Message-ID: <1275636915.27810.38912.camel@twins> Mime-Version: 1.0 Sender: linux-arch-owner@vger.kernel.org List-ID: To: Paul Mundt Cc: David Miller , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, sparclinux@vger.kernel.org Message-ID: <20100604073515.A0xGs5oacedxOQemvIC9_wBoepVJ7RC0RRLmiqkgvmw@z> On Fri, 2010-06-04 at 14:03 +0900, Paul Mundt wrote: > On Fri, Apr 09, 2010 at 04:01:35PM -0700, David Miller wrote: > > > > Provide local_irq_{save,restore}_nmi() which will allow us to help > > architectures that implement NMIs using IRQ priorities like SPARC64 > > does. > > > > Sparc uses IRQ prio 15 for NMIs and implements local_irq_disable() as > > disable <= 14. However if you do that while inside an NMI you re- > > enable the NMI priority again, causing all kinds of fun. > > > > A more solid implementation would first check the disable level and > > never lower it, however that is more costly and would slow down the > > rest of the kernel for no particular reason. > > > > Therefore introduce local_irq_save_nmi() which can implement this > > slower but more solid scheme and dis-allow local_irq_save() from NMI > > context. > > > > Suggested-by: David Miller > > Signed-off-by: Peter Zijlstra > > Signed-off-by: David S. Miller > > Are there any updates for this patch series? I would like to make use of > this on SH as well, but it seems these haven't hit upstream yet. Dave found a better solution, see: b4f4372f96e0573d752d9e45beda02fabf716cc8 0c25e9e6cbe7b233bb91d14d0e2c258bf8e6ec83 c011f80ba0912486fe51dd2b3f71d9b33a151188