Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3137375pxu; Mon, 19 Oct 2020 05:07:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOqQQztqU4hgxONfW6LVZxvGNWEsAtgdSp2FEl+iFk2vUhznsN68hujAUltm+Bqs/Vjmvp X-Received: by 2002:a17:907:2110:: with SMTP id qn16mr17506742ejb.133.1603109237247; Mon, 19 Oct 2020 05:07:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603109237; cv=none; d=google.com; s=arc-20160816; b=BSG7CgrL9LOmSLhQNU3XAj3uxGJoOU8N88NZkwhqd/FuQ7r4+5UqQ4Qf6eWv1lLhK1 4gdcJG8FRXprJob1Qom6yFXrLyrAuHcPCQqyUHd+Y+wbodHI+SCpCmvd/zGywdXMS5ye wK1GFcp7ZvFHfZiWexFbbFAT7nOK8h6mfhlzKpgZtTj7vsEcRI060ziBsmy/tJq/dWDx JpflRuifbreGm9OS3XMypGy/fA7x7oLF78a6GMKUAVAGXZBvyuLetZZRU3NLJBqF/s3T 3Ofcwhvt7pGrCQSrhEKayUC+kqo1AsXvk+ARl4C9jCYLAIjtzXCVeJK5srq2nfzV95x0 +UBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :dkim-signature; bh=Fy1ZhG7h7X0uthqt8OWHjkauXBZ+lSzxlXbRpKWBm88=; b=V8wJPcWGu3Nsa0CZZ2MojzuZL4RH0LbhRGrj+rT4IiNaEC8Z0LRSywR6chD7qDNJXF I8npO7RbkPiWaU2G9taImBEscLxPAdNOvhX72zZF8KBo9kRIqooDTcXxPMo91zgmcKHg J6Bi1/7W3ir/csdK+/9mv7db6WCIP1xgFReTCN0OWin3HeIGljlcT/NrQmp52OCx07+o C7V9OhYyPMfvCPSiMx0AtViVIehrfa06/T5kUzt+HWVnn668sY2pQK/ggGvLhOhgz+Zh ySaiXNUT2AO7KI0aLGvZy+sRwafleDSrzHs9lbnhUful51mcqySAWJFSD2kZJ5alVPfe ZgWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MBdvLMQw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d2si8224860ejm.716.2020.10.19.05.06.54; Mon, 19 Oct 2020 05:07:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MBdvLMQw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726559AbgJSL7q (ORCPT + 99 others); Mon, 19 Oct 2020 07:59:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:52022 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726239AbgJSL7p (ORCPT ); Mon, 19 Oct 2020 07:59:45 -0400 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 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 19 Oct 2020 12:59:42 +0100 From: Marc Zyngier To: Sumit Garg Cc: 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 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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...