Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2589830rdb; Tue, 12 Sep 2023 06:39:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGvsWtMoFfQG3vSnQzEYuSp1eMi5ZoyNsVDPHWNdlWE1TSq0+g8hliJ0QPWFcfEyyUxTO9i X-Received: by 2002:a05:6a20:144b:b0:13e:debc:3657 with SMTP id a11-20020a056a20144b00b0013edebc3657mr3043784pzi.30.1694525976708; Tue, 12 Sep 2023 06:39:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694525976; cv=none; d=google.com; s=arc-20160816; b=KcZlcJENryeMGNJwpqNXlJDJBeApSY+D89OZR0InX1YQQJW0Bccnzi2fKv2oscrvb+ dBaxnYg4ELnLUHAtPL7II4Gvh2V7lNjNzUStn6xnACXTfORjZG4HXeD8ulJm1UzVRVDA lgJBjvVHBjBrRETHS2vWa8JSq3dewHZx0fSUiJQHcFW4QO8G+flVwsTowcPO1NN70ZZJ wq+zyliqk1SXnKzpP0/Crvb7EZ8BL0CZhruDnu9Z8EclHBuIVnkLUhsB6qYQk8T4Tb4j rYOh4Mt6KtdcoZgFgGogTOQE6rbf7rFG/0QUovvH3rlEaVXdIv56rfKRCk2YoJEdaj3C yIIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=bQ3I88CGXVffUpBHj8jO80ePUXcRzuL0FDDH4PWsyHc=; fh=uRwBRecE3TS/JObsYkLHBeDhFtdWyZfF2vL+EKcWvHE=; b=mUVhz23ki+wdMND5wqAu8lyDsDe+/pvQsEPlqL/yebsChkk3ZLR1RGEdsuqdj5MSGe ilgZnIhibQ97uV5nfrm7h6dlwc2Y7Q76Kc9BMgBvIQNSlP6cdjenRCVeE8RtLMXIYRcJ jAI4Hi8Iy2+3iKRnvlviVt5ylNe4NR4e76eWCeNY+M2HShK8e9VJu0LpTZU/Cu4Z5Qao n2ziWfendpzvrQHYYRrl/8RDadXHlOCZzuCa4aUfHqMlvxP8kqBwDOiv7IhIV27h5bx9 N7a/PLwjtyNPh+4VY/OriCFINsParUvCsXRW+4F2+aTmDmutQobAUKZhhTrzNvCfa37M 5nZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eS3rQfqF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id cr5-20020a056a000f0500b0068a3eaf68d3si7828839pfb.393.2023.09.12.06.39.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 06:39:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eS3rQfqF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 9E953819BB74; Tue, 12 Sep 2023 05:44:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235227AbjILMoB (ORCPT + 99 others); Tue, 12 Sep 2023 08:44:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231248AbjILMoA (ORCPT ); Tue, 12 Sep 2023 08:44:00 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B76F9F; Tue, 12 Sep 2023 05:43:56 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 092B0C433C7; Tue, 12 Sep 2023 12:43:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694522636; bh=vDRcqUDqXbFXurXPW7gwG53pXOp3uFkEpLpaY//XLWw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=eS3rQfqFviXYu+moVkZOlwmkwVPzUvcKYZ6kmQqhBUWYHE/xjCAQ7CXO2N5uVxw4W +2NFYlBY9p3u3wuCAMoi93ZDa3HnNJpp/LL0ho1Z3ZBeDFSm5h2OZZXbt7i6lLwHir N63GSMMd0zM7AJIwua+0xGV2eQAxPdHIGR/jYq141Q20Jn/J/O+F11DumpRi/gychQ 7UrKCfdDb9LNb1xBIXtLn5fvcodVm7sTf1NRD61uc9+Q4jyJPsNbEhRg0O9Sp1HMnR hNqZxJ2MQWNbGz+DrdBXWSFfcbnQHrYhZaWA5g/G+p+Yt7/r7Q0nOoBCXyZRFS/bRT tFg1/wPUaidWQ== Received: from [104.132.96.100] (helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qg2kC-00CGSX-R9; Tue, 12 Sep 2023 13:43:53 +0100 Date: Tue, 12 Sep 2023 13:43:44 +0100 Message-ID: <87il8f4l4v.wl-maz@kernel.org> From: Marc Zyngier To: Douglas Anderson Cc: Mark Rutland , Catalin Marinas , Will Deacon , Sumit Garg , Daniel Thompson , linux-arm-kernel@lists.infradead.org, "Rafael J . Wysocki" , Lecopzer Chen , Chen-Yu Tsai , Tomohiro Misono , Peter Zijlstra , Masayoshi Mizuma , Stephane Eranian , Ard Biesheuvel , kgdb-bugreport@lists.sourceforge.net, Stephen Boyd , linux-perf-users@vger.kernel.org, Thomas Gleixner , ito-yuichi@fujitsu.com, Chen-Yu Tsai , linux-kernel@vger.kernel.org Subject: Re: [PATCH v13 1/7] irqchip/gic-v3: Enable support for SGIs to act as NMIs In-Reply-To: <20230906090246.v13.1.I1223c11c88937bd0cbd9b086d4ef216985797302@changeid> References: <20230906160505.2431857-1-dianders@chromium.org> <20230906090246.v13.1.I1223c11c88937bd0cbd9b086d4ef216985797302@changeid> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 104.132.96.100 X-SA-Exim-Rcpt-To: dianders@chromium.org, mark.rutland@arm.com, catalin.marinas@arm.com, will@kernel.org, sumit.garg@linaro.org, daniel.thompson@linaro.org, linux-arm-kernel@lists.infradead.org, rafael.j.wysocki@intel.com, lecopzer.chen@mediatek.com, wens@csie.org, misono.tomohiro@fujitsu.com, peterz@infradead.org, msys.mizuma@gmail.com, eranian@google.com, ardb@kernel.org, kgdb-bugreport@lists.sourceforge.net, swboyd@chromium.org, linux-perf-users@vger.kernel.org, tglx@linutronix.de, ito-yuichi@fujitsu.com, wenst@chromium.org, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 12 Sep 2023 05:44:12 -0700 (PDT) X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email On Wed, 06 Sep 2023 17:02:56 +0100, Douglas Anderson wrote: > > As of commit 6abbd6988971 ("irqchip/gic, gic-v3: Make SGIs use > handle_percpu_devid_irq()") SGIs are treated the same as PPIs/EPPIs > and use handle_percpu_devid_irq() by default. Unfortunately, > handle_percpu_devid_irq() isn't NMI safe, and so to run in an NMI > context those should use handle_percpu_devid_fasteoi_nmi(). > > In order to accomplish this, we just have to make room for SGIs in the > array of refcounts that keeps track of which interrupts are set as > NMI. We also rename the array and create a new indexing scheme that > accounts for SGIs. > > Also, enable NMI support prior to gic_smp_init() as allocation of SGIs > as IRQs/NMIs happen as part of this routine. > > Co-developed-by: Sumit Garg > Signed-off-by: Sumit Garg > Acked-by: Mark Rutland > Tested-by: Chen-Yu Tsai > Signed-off-by: Douglas Anderson Acked-by: Marc Zyngier M. -- Without deviation from the norm, progress is not possible.