[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1599830924-13990-4-git-send-email-sumit.garg@linaro.org>
Date: Fri, 11 Sep 2020 18:58:42 +0530
From: Sumit Garg <sumit.garg@...aro.org>
To: maz@...nel.org, catalin.marinas@....com, will@...nel.org
Cc: linux-arm-kernel@...ts.infradead.org, tglx@...utronix.de,
jason@...edaemon.net, mark.rutland@....com,
julien.thierry.kdev@...il.com, dianders@...omium.org,
daniel.thompson@...aro.org, jason.wessel@...driver.com,
kgdb-bugreport@...ts.sourceforge.net, linux-kernel@...r.kernel.org,
Sumit Garg <sumit.garg@...aro.org>
Subject: [PATCH v4 3/5] arm64: smp: Allocate and setup IPI as NMI
Allocate an unused IPI that can be turned as NMI using ipi_nmi framework.
Also, invoke corresponding NMI setup/teardown APIs.
Signed-off-by: Sumit Garg <sumit.garg@...aro.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 b6bde26..3f3b1ff 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);
+
+ ipi_nmi_setup(cpu);
}
static void ipi_teardown(int cpu)
@@ -973,6 +976,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);
}
void __init set_smp_ipi_range(int ipi_base, int n)
@@ -993,6 +998,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 */
--
2.7.4
Powered by blists - more mailing lists