From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753494AbbG0POq (ORCPT ); Mon, 27 Jul 2015 11:14:46 -0400 Received: from casper.infradead.org ([85.118.1.10]:40074 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752554AbbG0POp (ORCPT ); Mon, 27 Jul 2015 11:14:45 -0400 Date: Mon, 27 Jul 2015 17:14:37 +0200 From: Peter Zijlstra To: Max Filippov Cc: linux-xtensa@linux-xtensa.org, linux-kernel@vger.kernel.org, Chris Zankel , Marc Gauthier Subject: Re: [PATCH v2 12/13] xtensa: implement fake NMI Message-ID: <20150727151437.GY19282@twins.programming.kicks-ass.net> References: <1437208216-15729-1-git-send-email-jcmvbkbc@gmail.com> <1437208216-15729-13-git-send-email-jcmvbkbc@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1437208216-15729-13-git-send-email-jcmvbkbc@gmail.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 On Sat, Jul 18, 2015 at 11:30:15AM +0300, Max Filippov wrote: > In case perf IRQ is the highest of the medium-level IRQs, and is alone > on its level, it may be treated as NMI: > - LOCKLEVEL is defined to be one level less than EXCM level, > - IRQ masking never lowers current IRQ level, > - new fake exception cause code, EXCCAUSE_MAPPED_NMI is assigned to that > IRQ; new second level exception handler, do_nmi, assigned to it > handles it as NMI, > - atomic operations in configurations without s32c1i still need to mask > all interrupts. > > Cc: Peter Zijlstra > Signed-off-by: Max Filippov > --- > arch/xtensa/include/asm/atomic.h | 10 ++-- > arch/xtensa/include/asm/cmpxchg.h | 4 +- > arch/xtensa/include/asm/irqflags.h | 22 ++++++++- > arch/xtensa/include/asm/processor.h | 31 ++++++++++++- > arch/xtensa/kernel/entry.S | 93 +++++++++++++++++++++++++++++++------ > arch/xtensa/kernel/irq.c | 8 ++++ > arch/xtensa/kernel/perf_event.c | 6 ++- > arch/xtensa/kernel/traps.c | 26 +++++++++++ > arch/xtensa/kernel/vectors.S | 10 +++- > 9 files changed, 183 insertions(+), 27 deletions(-) Looks about right, I've not really gone over the asm bits through. Acked-by: Peter Zijlstra (Intel)