From: Sumit Garg <sumit.garg@linaro.org>
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 <sumit.garg@linaro.org>
Subject: [PATCH v6 3/7] arm64: smp: Assign and setup an IPI as NMI
Date: Thu, 29 Oct 2020 20:26:23 +0530 [thread overview]
Message-ID: <1603983387-8738-4-git-send-email-sumit.garg@linaro.org> (raw)
In-Reply-To: <1603983387-8738-1-git-send-email-sumit.garg@linaro.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 <sumit.garg@linaro.org>
---
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 <asm/daifflags.h>
#include <asm/kvm_mmu.h>
#include <asm/mmu_context.h>
+#include <asm/nmi.h>
#include <asm/numa.h>
#include <asm/processor.h>
#include <asm/smp_plat.h>
@@ -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
next prev parent reply other threads:[~2020-10-29 14:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-29 14:56 [PATCH v6 0/7] arm64: Add framework to turn an IPI as NMI Sumit Garg
2020-10-29 14:56 ` [PATCH v6 1/7] arm64: Add framework to turn " Sumit Garg
2020-10-29 14:56 ` [PATCH v6 2/7] irqchip/gic-v3: Enable support for SGIs to act as NMIs Sumit Garg
2020-10-29 14:56 ` Sumit Garg [this message]
2020-10-29 14:56 ` [PATCH v6 4/7] nmi: backtrace: Allow runtime arch specific override Sumit Garg
2020-10-29 14:56 ` [PATCH v6 5/7] arm64: ipi_nmi: Add support for NMI backtrace Sumit Garg
2020-10-29 14:56 ` [PATCH v6 6/7] kgdb: roundup: Allow runtime arch specific override Sumit Garg
2020-10-29 15:21 ` Daniel Thompson
2020-11-02 6:18 ` Sumit Garg
2020-11-02 9:19 ` Daniel Thompson
2020-10-29 14:56 ` [PATCH v6 7/7] arm64: kgdb: Roundup cpus using IPI as NMI Sumit Garg
2020-10-29 16:22 ` Daniel Thompson
2020-10-29 16:39 ` Daniel Thompson
2020-11-02 6:59 ` Sumit Garg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1603983387-8738-4-git-send-email-sumit.garg@linaro.org \
--to=sumit.garg@linaro.org \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=daniel.thompson@linaro.org \
--cc=davem@davemloft.net \
--cc=dianders@chromium.org \
--cc=ito-yuichi@fujitsu.com \
--cc=jason.wessel@windriver.com \
--cc=jason@lakedaemon.net \
--cc=julien.thierry.kdev@gmail.com \
--cc=kgdb-bugreport@lists.sourceforge.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=msys.mizuma@gmail.com \
--cc=tglx@linutronix.de \
--cc=tsbogend@alpha.franken.de \
--cc=will@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).