From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 772C8C282C7 for ; Tue, 29 Jan 2019 12:31:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4F5A92083B for ; Tue, 29 Jan 2019 12:31:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729115AbfA2MbC (ORCPT ); Tue, 29 Jan 2019 07:31:02 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:36016 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727939AbfA2MbC (ORCPT ); Tue, 29 Jan 2019 07:31:02 -0500 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 E6B41EBD; Tue, 29 Jan 2019 04:31:01 -0800 (PST) Received: from big-swifty.misterjones.org (big-swifty.cambridge.arm.com [10.1.37.186]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 173A93F59C; Tue, 29 Jan 2019 04:30:58 -0800 (PST) Date: Tue, 29 Jan 2019 12:31:00 +0000 Message-ID: <868sz3ve63.wl-marc.zyngier@arm.com> From: Marc Zyngier To: Julien Thierry Cc: , , , , , , , , , Thomas Gleixner , Jason Cooper Subject: Re: [PATCH v9 20/26] irqchip/gic-v3: Handle pseudo-NMIs In-Reply-To: References: <1548084825-8803-1-git-send-email-julien.thierry@arm.com> <1548084825-8803-21-git-send-email-julien.thierry@arm.com> <86wompuh5j.wl-marc.zyngier@arm.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/25.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: ARM Ltd MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 29 Jan 2019 11:33:35 +0000, Julien Thierry wrote: > > > > On 28/01/2019 11:59, Marc Zyngier wrote: > > On Mon, 21 Jan 2019 15:33:39 +0000, > > Julien Thierry wrote: > >> > >> Provide a higher priority to be used for pseudo-NMIs. When such an > >> interrupt is received, keep interrupts fully disabled at CPU level to > >> prevent receiving other pseudo-NMIs while handling the current one. > >> > >> Signed-off-by: Julien Thierry > >> Cc: Thomas Gleixner > >> Cc: Jason Cooper > >> Cc: Marc Zyngier > >> --- > >> drivers/irqchip/irq-gic-v3.c | 42 ++++++++++++++++++++++++++++++++++++------ > >> 1 file changed, 36 insertions(+), 6 deletions(-) > >> > >> diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c > >> index 5374b43..4df1e94 100644 > >> --- a/drivers/irqchip/irq-gic-v3.c > >> +++ b/drivers/irqchip/irq-gic-v3.c > >> @@ -41,6 +41,8 @@ > >> > >> #include "irq-gic-common.h" > >> > >> +#define GICD_INT_NMI_PRI (GICD_INT_DEF_PRI & ~0x80) > >> + > >> #define FLAGS_WORKAROUND_GICR_WAKER_MSM8996 (1ULL << 0) > >> > >> struct redist_region { > >> @@ -381,12 +383,45 @@ static u64 gic_mpidr_to_affinity(unsigned long mpidr) > >> return aff; > >> } > >> > >> +static inline void gic_deactivate_unexpected_irq(u32 irqnr) > > > > Same remark as on some other patches: you should be able to drop the > > inline attribute without any ill effect. I'd also like this to be > > renamed "gic_deactivate_spurious", or something similar. > > > > I'm a bit concern about using spurious since it is not related to > GICC_INT_SPURIOUS, we actually read a valid IRQ number, we just don't > know how we should handle it. Well, I'd say that in the case of GICC_INT_SPURIOUS, there is nothing to deactivate, but hey... ;-) > Would "gic_deactivate_unhandled" work? Or "gic_deactivate_bad"? Sure, any will do. M. -- Jazz is not dead, it just smell funny. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C537CC169C4 for ; Tue, 29 Jan 2019 12:33:53 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 734A32083B for ; Tue, 29 Jan 2019 12:33:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="MIi6kBkE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 734A32083B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Uxo2/htqDe62omWVQ41C4U63hYsTzbNSy5xS9d5YLv8=; b=MIi6kBkEmlnBvg AGZexdDItS1fTjzCiQtclXXXUn+iLh8rScGC9GZqrND+4RNREbyfZ6i7a8QByLKDRLm6fmKN+nSDi I6eB9htt8FbHZKQZ5nXujs2wX2Bxwmn4FvtrEc4uJLJZJrnWhs0vJbcYmOLO3nQ49S+ss8PaC1ymB lRMA+OtrPp1RmygL4xt2BnZpX+TQbS+KGDDob3z5zxDJuCiDVirf/zo9f+rB1cQ8E4XxdBtRZVhep uyaYd9IWTiLJjSVc551GWNST92Xbmgs2nH7P+2cFDqgPwFaW1eWE2mB5/xkxFzraBO4qISnHdQws8 DXbS8/bsbIpj1b4+DnpQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1goSaM-0001QP-3i; Tue, 29 Jan 2019 12:33:50 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1goSXg-0007jb-IO for linux-arm-kernel@lists.infradead.org; Tue, 29 Jan 2019 12:31:38 +0000 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 E6B41EBD; Tue, 29 Jan 2019 04:31:01 -0800 (PST) Received: from big-swifty.misterjones.org (big-swifty.cambridge.arm.com [10.1.37.186]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 173A93F59C; Tue, 29 Jan 2019 04:30:58 -0800 (PST) Date: Tue, 29 Jan 2019 12:31:00 +0000 Message-ID: <868sz3ve63.wl-marc.zyngier@arm.com> From: Marc Zyngier To: Julien Thierry Subject: Re: [PATCH v9 20/26] irqchip/gic-v3: Handle pseudo-NMIs In-Reply-To: References: <1548084825-8803-1-git-send-email-julien.thierry@arm.com> <1548084825-8803-21-git-send-email-julien.thierry@arm.com> <86wompuh5j.wl-marc.zyngier@arm.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/25.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: ARM Ltd MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190129_043105_577266_C701C720 X-CRM114-Status: GOOD ( 20.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, daniel.thompson@linaro.org, Jason Cooper , catalin.marinas@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, christoffer.dall@arm.com, james.morse@arm.com, joel@joelfernandes.org, Thomas Gleixner , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 29 Jan 2019 11:33:35 +0000, Julien Thierry wrote: > > > > On 28/01/2019 11:59, Marc Zyngier wrote: > > On Mon, 21 Jan 2019 15:33:39 +0000, > > Julien Thierry wrote: > >> > >> Provide a higher priority to be used for pseudo-NMIs. When such an > >> interrupt is received, keep interrupts fully disabled at CPU level to > >> prevent receiving other pseudo-NMIs while handling the current one. > >> > >> Signed-off-by: Julien Thierry > >> Cc: Thomas Gleixner > >> Cc: Jason Cooper > >> Cc: Marc Zyngier > >> --- > >> drivers/irqchip/irq-gic-v3.c | 42 ++++++++++++++++++++++++++++++++++++------ > >> 1 file changed, 36 insertions(+), 6 deletions(-) > >> > >> diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c > >> index 5374b43..4df1e94 100644 > >> --- a/drivers/irqchip/irq-gic-v3.c > >> +++ b/drivers/irqchip/irq-gic-v3.c > >> @@ -41,6 +41,8 @@ > >> > >> #include "irq-gic-common.h" > >> > >> +#define GICD_INT_NMI_PRI (GICD_INT_DEF_PRI & ~0x80) > >> + > >> #define FLAGS_WORKAROUND_GICR_WAKER_MSM8996 (1ULL << 0) > >> > >> struct redist_region { > >> @@ -381,12 +383,45 @@ static u64 gic_mpidr_to_affinity(unsigned long mpidr) > >> return aff; > >> } > >> > >> +static inline void gic_deactivate_unexpected_irq(u32 irqnr) > > > > Same remark as on some other patches: you should be able to drop the > > inline attribute without any ill effect. I'd also like this to be > > renamed "gic_deactivate_spurious", or something similar. > > > > I'm a bit concern about using spurious since it is not related to > GICC_INT_SPURIOUS, we actually read a valid IRQ number, we just don't > know how we should handle it. Well, I'd say that in the case of GICC_INT_SPURIOUS, there is nothing to deactivate, but hey... ;-) > Would "gic_deactivate_unhandled" work? Or "gic_deactivate_bad"? Sure, any will do. M. -- Jazz is not dead, it just smell funny. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel