Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp516673pxx; Thu, 29 Oct 2020 08:01:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUlttcDDRVQA2/WJJC58Tysf1fWzZGrByM3TxeGWrSngpMSVKPiicTWenJNvWmFzhNIAii X-Received: by 2002:a17:906:4ac2:: with SMTP id u2mr4418345ejt.224.1603983698499; Thu, 29 Oct 2020 08:01:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603983698; cv=none; d=google.com; s=arc-20160816; b=l2jQwHH+6BnRAdUJRc2yjDR6MDTg0ItnWd5hhMemGA5SwLu52fDhKn0QqY7dV672Zd yKrFr9P7529CtLlM9wMCTDOYbuBHSbyA4JImtVYMWycsI4wVYxepOvEexElYDYOxZQ7r om3nSioYobb7P3rDii3zdvBCyB40NxH1yJ1RKZ98tPO+fe5b55P+OYMnGHu4nJrLcNef MERnZQwVFMWo/5i1snDbwBMX5FQ/e6n5ebXQgy3nE7hIB3Xw6cXhoBnyDIKzD20DFPSw ecxRmH9LVe95lSB9AUSGUlRbaL8Ei2xF/itYJIWcLxPBBq0mX44MwSry/bNq6Dm2IdN9 RXOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=MUHxFreF4fdTU7bboIWPPhRLi/D8nJxSl4ZDICONfD4=; b=mvBqAX9LCJXxO8GMAqejBvGDBK8GP8uCE+Tbk1ZfTjFnUPn4FDlVqZ1vmFbyaQ3JkA QHpsPgdZ/32cn3ruGF/vojUnNv+dFc7KuQHjhLCKGR/z3CUF7yvQ8XyWz2ase+oKjolP leQTemCjSiiQ2QUJlf29WcIhLYs6nrJkGQwY5f/vxfFjg0hH2JSkVtg8AdTrdn59THom ZOSwIVLu9RD6qQ8hGKHzj2wafWsiAltqPkvtRqeFyg5qNsFswGKI50DgwtySA9014Bqt RAlGkD0liBW6tV6AVS3j+vc+NxkYGiKZtghzl2QnTewAEIDdgrB5oQoYy7BPMhAYNZ8w eEzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I5prQNYU; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c93si2135631edf.452.2020.10.29.08.01.14; Thu, 29 Oct 2020 08:01:38 -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=@linaro.org header.s=google header.b=I5prQNYU; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727973AbgJ2O6e (ORCPT + 99 others); Thu, 29 Oct 2020 10:58:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727839AbgJ2O6e (ORCPT ); Thu, 29 Oct 2020 10:58:34 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DF5FC0613CF for ; Thu, 29 Oct 2020 07:58:34 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id z1so1397618plo.12 for ; Thu, 29 Oct 2020 07:58:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MUHxFreF4fdTU7bboIWPPhRLi/D8nJxSl4ZDICONfD4=; b=I5prQNYU5tqab1IAfmZ0Npzyxgasjwchz+CCyq076+/YxECJ9irL5REQHWRDrYdShV jM2Y9CHbIKhcjSTBzw49Xd7cj0kjYmyK6qSFFodBZuF0Vw/gVdCgm2pRnigrLwoaikAM NfPhzzzlvNCLa6OnTOdYnw7RyWOUzfu5Xaj5f9LVIb3Kea34JJqKoDVQwQzZDIiBfxvg hbK3AjBepCXhJ+bQPSwLFS9LeRaGFvViqvSWt4d0+hWKSKdGYSM06UStkCFRe22FTcL3 jWEwctUzQpa7fU1nexbrqOK4C0QbYl1lx2kdPLoTUaKtFJIQjZeJCKZrav9GONuYdtTv Jjug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MUHxFreF4fdTU7bboIWPPhRLi/D8nJxSl4ZDICONfD4=; b=Q+rEmqLwLBI3xuJg89gAyLOEP9LdzdHsFzH9TtqJzGAQJUVuRJtoAslOEZMKDUC60S 6lBWB5NwcYcbbZEMKItmReymHSP+rR84QGrNkXhaCwx+t/FVrLGWdbmvHV/otuxl0h7q vxr/B0X9Pf4TztCVBULWWHkqWqY9KQIy3iy0rqz4WY1vtb1+i+OWoAp61IcTtdBnkbRA QzTm91musbsL/3rYNlnrgC/WkxNgsZg3FiNIRuVSYJKMPikVhEj8OLNNKasLFCQRZNEL A/NQOagzjiVk9AQvMS62H4Ywo2NEFf1aiP8fHZx6HrlGR0gxksWCmhEd6/bBKZt04yLU jBnw== X-Gm-Message-State: AOAM533oGj9G5ufbkKKWjgw80/bDr728wEW6lzagURRBbi+QWcU0eys4 BOfHxL8zUBniaJl8r/M1GSSftQ== X-Received: by 2002:a17:902:7d89:b029:d5:cfb6:e44 with SMTP id a9-20020a1709027d89b02900d5cfb60e44mr4658355plm.28.1603983513751; Thu, 29 Oct 2020 07:58:33 -0700 (PDT) Received: from localhost.localdomain ([117.252.71.231]) by smtp.gmail.com with ESMTPSA id j11sm3085082pfc.64.2020.10.29.07.58.24 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Oct 2020 07:58:33 -0700 (PDT) From: Sumit Garg To: maz@kernel.org, catalin.marinas@arm.com, will@kernel.org Cc: linux-arm-kernel@lists.infradead.org, tglx@linutronix.de, jason@lakedaemon.net, linux@armlinux.org.uk, tsbogend@alpha.franken.de, mpe@ellerman.id.au, davem@davemloft.net, mingo@redhat.com, bp@alien8.de, x86@kernel.org, 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, Sumit Garg Subject: [PATCH v6 3/7] arm64: smp: Assign and setup an IPI as NMI Date: Thu, 29 Oct 2020 20:26:23 +0530 Message-Id: <1603983387-8738-4-git-send-email-sumit.garg@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1603983387-8738-1-git-send-email-sumit.garg@linaro.org> References: <1603983387-8738-1-git-send-email-sumit.garg@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Assign an unused IPI which can be turned as NMI using ipi_nmi framework. Also, invoke corresponding dynamic IPI 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..2e118e2 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); + + dynamic_ipi_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); + + dynamic_ipi_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_dynamic_ipi(ipi_base + nr_ipi); + ipi_irq_base = ipi_base; /* Setup the boot CPU immediately */ -- 2.7.4