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=-10.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,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 194D4C433E7 for ; Mon, 19 Oct 2020 12:01:03 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 8011622268 for ; Mon, 19 Oct 2020 12:01:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jji4Atcm"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="MBdvLMQw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8011622268 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:To:From: Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=n9+e7JsiWLle5wOHHMcOz/9f+6x4ilYeU2jIh4XcuGc=; b=jji4AtcmzNdFu4H8++sdrQhBw ioAjWYAEmY6DMHYOE3P9yFkSRPkENAMN7ZS49hBKyXJtM+UoJUnO5UrsZKVKikns6tR97o8mqjnQF cDlaOihKI5l/xC6vdpsP8ia0940eC6KRu/jAFttypV7Jr+PTtyDF71uMr7rqcWzd8zu6X7bQfuX4V 7Ijo6eoA9SI52Idef6Hhmhzq91RuXZm6k2U3QJ7s6f8foVFYJREfK63mmzJG9upPG3Kaqvnny+T2G 5kGFucuekj8ir2ucePsnVbcOOIeQeH/kZTLpYnQwcMVtnbdTBldhTkBeDtcM82b7aiyPo/EtntwVe vyfcTpGjg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUTpM-0008Gu-RJ; Mon, 19 Oct 2020 11:59:48 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUTpK-0008GG-7T for linux-arm-kernel@lists.infradead.org; Mon, 19 Oct 2020 11:59:47 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CDD8322268; Mon, 19 Oct 2020 11:59:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603108785; bh=xXDbAKNUCfLYB41p8lNKI+uLH9Q6GhC1oI5JuyCZbq0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=MBdvLMQwLD8e4lGKoUJzoW64XIc/c33jJ34K8Irt502/bAAsXzmonvcLzSvkJcw4g xfZsagWWyCuPTIfjqzkUvgH1mV8iUZ96yHr0OQjcxEEv4wIX/a+Pps5gv6VnjMzhfN DuUCq2T7Vn+sAH9HkuXnwmv7yakAUsh1j3oVOQgc= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kUTpH-002PRY-0I; Mon, 19 Oct 2020 12:59:43 +0100 MIME-Version: 1.0 Date: Mon, 19 Oct 2020 12:59:42 +0100 From: Marc Zyngier To: Sumit Garg Subject: Re: [PATCH v5 3/5] arm64: smp: Allocate and setup IPI as NMI In-Reply-To: <1602673931-28782-4-git-send-email-sumit.garg@linaro.org> References: <1602673931-28782-1-git-send-email-sumit.garg@linaro.org> <1602673931-28782-4-git-send-email-sumit.garg@linaro.org> User-Agent: Roundcube Webmail/1.4.9 Message-ID: <1c68b74251dc72b0cd74706280ea96f7@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: sumit.garg@linaro.org, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, tglx@linutronix.de, jason@lakedaemon.net, mark.rutland@arm.com, julien.thierry.kdev@gmail.com, dianders@chromium.org, daniel.thompson@linaro.org, jason.wessel@windriver.com, msys.mizuma@gmail.com, ito-yuichi@fujitsu.com, kgdb-bugreport@lists.sourceforge.net, 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201019_075946_422448_EA64A4BA X-CRM114-Status: GOOD ( 20.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, daniel.thompson@linaro.org, jason@lakedaemon.net, catalin.marinas@arm.com, ito-yuichi@fujitsu.com, dianders@chromium.org, linux-kernel@vger.kernel.org, julien.thierry.kdev@gmail.com, jason.wessel@windriver.com, kgdb-bugreport@lists.sourceforge.net, tglx@linutronix.de, msys.mizuma@gmail.com, will@kernel.org, linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2020-10-14 12:12, Sumit Garg wrote: > Allocate an unused IPI that can be turned as NMI using ipi_nmi > framework. This doesn't do any allocation, as far as I can see. It relies on the initial grant from the interrupt controller to be larger than what the kernel currently uses. > Also, invoke corresponding NMI setup/teardown APIs. > > Signed-off-by: Sumit Garg > --- > arch/arm64/kernel/smp.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c > index 82e75fc..129ebfb 100644 > --- a/arch/arm64/kernel/smp.c > +++ b/arch/arm64/kernel/smp.c > @@ -43,6 +43,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -962,6 +963,8 @@ static void ipi_setup(int cpu) > > for (i = 0; i < nr_ipi; i++) > enable_percpu_irq(ipi_irq_base + i, 0); > + > + ipi_nmi_setup(cpu); > } > > #ifdef CONFIG_HOTPLUG_CPU > @@ -974,6 +977,8 @@ static void ipi_teardown(int cpu) > > for (i = 0; i < nr_ipi; i++) > disable_percpu_irq(ipi_irq_base + i); > + > + ipi_nmi_teardown(cpu); > } > #endif > > @@ -995,6 +1000,9 @@ void __init set_smp_ipi_range(int ipi_base, int n) > irq_set_status_flags(ipi_base + i, IRQ_HIDDEN); > } > > + if (n > nr_ipi) > + set_smp_ipi_nmi(ipi_base + nr_ipi); > + > ipi_irq_base = ipi_base; > > /* Setup the boot CPU immediately */ Thanks, M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel