提交 b284ae00 编写于 作者: S Sumit Garg 提交者: Zheng Zengkai

arm64: smp: Assign and setup an IPI as NMI

maillist inclusion
category: feature
bugzilla: 49593
CVE: NA
Reference: https://www.spinics.net/lists/arm-kernel/msg851005.html

-------------------------------------------------

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: NSumit Garg <sumit.garg@linaro.org>
Signed-off-by: NWei Li <liwei391@huawei.com>
Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 ce9143c4
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#include <asm/daifflags.h> #include <asm/daifflags.h>
#include <asm/kvm_mmu.h> #include <asm/kvm_mmu.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
#include <asm/nmi.h>
#include <asm/numa.h> #include <asm/numa.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/smp_plat.h> #include <asm/smp_plat.h>
...@@ -1159,6 +1160,8 @@ static void ipi_setup(int cpu) ...@@ -1159,6 +1160,8 @@ static void ipi_setup(int cpu)
for (i = 0; i < nr_ipi; i++) for (i = 0; i < nr_ipi; i++)
enable_percpu_irq(ipi_irq_base + i, 0); enable_percpu_irq(ipi_irq_base + i, 0);
dynamic_ipi_setup(cpu);
} }
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
...@@ -1171,6 +1174,8 @@ static void ipi_teardown(int cpu) ...@@ -1171,6 +1174,8 @@ static void ipi_teardown(int cpu)
for (i = 0; i < nr_ipi; i++) for (i = 0; i < nr_ipi; i++)
disable_percpu_irq(ipi_irq_base + i); disable_percpu_irq(ipi_irq_base + i);
dynamic_ipi_teardown(cpu);
} }
#endif #endif
...@@ -1192,6 +1197,9 @@ void __init set_smp_ipi_range(int ipi_base, int n) ...@@ -1192,6 +1197,9 @@ void __init set_smp_ipi_range(int ipi_base, int n)
irq_set_status_flags(ipi_base + i, IRQ_HIDDEN); 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; ipi_irq_base = ipi_base;
/* Setup the boot CPU immediately */ /* Setup the boot CPU immediately */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册