Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp511851imm; Wed, 13 Jun 2018 04:15:30 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLUFz5cbuFbbWy2gOpan4y4iGhFJ3LI/OV+0kTz5iZ6aaP7mAwPveLo+Y4gvZViTU8YsmrP X-Received: by 2002:a62:a38d:: with SMTP id q13-v6mr4512674pfl.49.1528888530902; Wed, 13 Jun 2018 04:15:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528888530; cv=none; d=google.com; s=arc-20160816; b=aio/emtMU/ZO3iUFlFPdkkoR8bHaE/b239vORItZ6TN+QBqSW4Vca13qHoSjDwm40i kq2pfYK1G9rFswNFOTtP4LpqghQGe3SxaoHju8CwtOupwIK75Ch+JutfNmHZyVTQiesa N9/aWttNNhtD2ARKJsGD5rLpCdbl+tzt9NmGqZvcwWh08g6GXkdCexuujN3vPp1B4BYS DfPk0q90KmFCQyk6l22lAEwWVZqWtOo1owc9HqsLNV+sxcSeEr1oeOwZd+qBlQ1Pa6he RYlqpIsfri53MtxLESzFmaqVn02NjVw6sW7yl87cG6Fhuhc6fHEBPCPv4Kj5ieI4dnPm fe+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=p0k7nd7AL0ye6Zb2cpvECdN/ZVL3ZxPIL+7MYSDJ1po=; b=UqwMUEo7iuZcwuAYr4gUtrS2gQ1vTetYv0ZLCYr0FEDciKc8o9yYWye+/Vmn3pcva+ uJDhu+21yX4sNrGNUV4VLrmXxMnUHkAu0wLuG+gbbfFCBDY/adrL5SJQ3DmRQ1XMSKD1 vHTjyFTeeyJW+y+RH6ZAybN6XKKWdF1v6m5bI59K/9SGsK9xPAiuc6FmltzSQS4QX9Sp tmXrWrH+FD9/Zmv3fp1NS/MgazTZxvNMbKpdDFq/0y32I22/1RVISNyw6J0IE2/nYMKQ OnGs7wO7Ps6uE2Ul++gTDOT0Dbz/0obDIu1GvobV8DVC8WHHCqXqO/xUMoiQSCrueuDE /VCw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b14-v6si2553059pls.292.2018.06.13.04.15.16; Wed, 13 Jun 2018 04:15:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935365AbeFMLO3 (ORCPT + 99 others); Wed, 13 Jun 2018 07:14:29 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:46026 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934677AbeFMLO2 (ORCPT ); Wed, 13 Jun 2018 07:14:28 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2C7681529; Wed, 13 Jun 2018 04:14:28 -0700 (PDT) Received: from [10.1.207.70] (e112298-lin.cambridge.arm.com [10.1.207.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1028F3F25D; Wed, 13 Jun 2018 04:14:25 -0700 (PDT) Subject: Re: [PATCH v4 24/26] irqchip/gic-v3: Add base support for pseudo-NMI To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, daniel.thompson@linaro.org, joel@joelfernandes.org, marc.zyngier@arm.com, mark.rutland@arm.com, christoffer.dall@arm.com, james.morse@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, Russell King , Thomas Gleixner , Jason Cooper References: <1527241772-48007-1-git-send-email-julien.thierry@arm.com> <1527241772-48007-25-git-send-email-julien.thierry@arm.com> From: Julien Thierry Message-ID: <79b13ea0-a549-418c-b69f-1fad87c06357@arm.com> Date: Wed, 13 Jun 2018 12:14:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <1527241772-48007-25-git-send-email-julien.thierry@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 25/05/18 10:49, Julien Thierry wrote: > Provide a higher priority to be used for pseudo-NMIs. When such an > interrupt is received, enter the NMI state and prevent other NMIs to > be raised. > > When returning from a pseudo-NMI, skip preemption and tracing if the > interrupted context has interrupts disabled. > > Signed-off-by: Julien Thierry > Cc: Russell King > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Thomas Gleixner > Cc: Jason Cooper > Cc: Marc Zyngier > --- > arch/arm/include/asm/arch_gicv3.h | 6 ++++++ > arch/arm64/include/asm/arch_gicv3.h | 6 ++++++ > arch/arm64/kernel/entry.S | 43 +++++++++++++++++++++++++++++++++++++ > drivers/irqchip/irq-gic-v3.c | 41 +++++++++++++++++++++++++++++++++++ > 4 files changed, 96 insertions(+) > [...] > diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c > index b144f73..4be5996 100644 > --- a/drivers/irqchip/irq-gic-v3.c > +++ b/drivers/irqchip/irq-gic-v3.c > @@ -371,6 +379,20 @@ static u64 gic_mpidr_to_affinity(unsigned long mpidr) > return aff; > } > > +static void do_handle_nmi(unsigned int hwirq, struct pt_regs *regs) > +{ > + struct pt_regs *old_regs = set_irq_regs(regs); > + unsigned int irq; > + > + nmi_enter(); RAS/SEA also enters NMI state and things will break if asynchronous error occurs during a pseudo-NMI. I'll have this fixed in the next version. -- Julien Thierry