Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756442AbbFQMpE (ORCPT ); Wed, 17 Jun 2015 08:45:04 -0400 Received: from casper.infradead.org ([85.118.1.10]:59076 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752563AbbFQMox (ORCPT ); Wed, 17 Jun 2015 08:44:53 -0400 Date: Wed, 17 Jun 2015 14:44:48 +0200 From: Peter Zijlstra To: Vineet Gupta Cc: Chuck Jordan , "linux-arch@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "arnd@arndb.de" , Alexey Brodkin , "arc-linux-dev@synopsys.com" , Arnaldo Carvalho de Melo Subject: Re: [PATCH 4/8] ARCv2: perf: Support sampling events using overflow interrupts Message-ID: <20150617124448.GQ3644@twins.programming.kicks-ass.net> References: <1433852372-29494-1-git-send-email-vgupta@synopsys.com> <1433852372-29494-5-git-send-email-vgupta@synopsys.com> <20150615162525.GH3644@twins.programming.kicks-ass.net> <20150616090713.GJ3644@twins.programming.kicks-ass.net> <55815E8B.9090600@synopsys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55815E8B.9090600@synopsys.com> 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 Content-Length: 1308 Lines: 30 On Wed, Jun 17, 2015 at 05:18:27PM +0530, Vineet Gupta wrote: > Turns out that it is possible to implement NMI on ARCv2 in a pretty > straightforward way. > > Our RTOS Guru, Chuck, told me off list, that instead of using CLRI / SETI, we can > use SETI with different args which would keep the stat32.IE enabled all the times, > but wiggle the stat32.E[ ] to change the intr prio level, effectively locking out > only lower prio interrupts in any local_irq_save() / restore() region. Nice. > But isn't this defying the irq disable/enable semantics and could lead to > potential breach of *some* critical section. Well only if you then hand out interrupts for that priority level without treating them as NMIs. Note that NMIs do not nest, so if your hardware can raise multiple interrupts for any one level it needs to mask the level in your handler's entry code. > Neverthless, doing this requires some more changes in ARCv2 support code - so for > now we will go with the normal interrupts and later bolt on the NMI emulation. Sure, smalls steps etc.. :-) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/