lkml.org 
[lkml]   [2020]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 3/3] arm64: smp: Disable priority masking when NMI is enable on PSR.I section
Date
It should be prohibitted to use priority masking in NMI context.

Using local_irq_disable() under the above conditions causes a WARNING.
Then, there will be also a mismatch between the PSR.I values and PMR GIC_PRIO_PSR_I_SET.

Signed-off-by: Yuichi Ito <ito-yuichi@fujitsu.com>
---
arch/arm64/kernel/smp.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
index fd59bc7..3c49f06 100644
--- a/arch/arm64/kernel/smp.c
+++ b/arch/arm64/kernel/smp.c
@@ -872,7 +872,9 @@ static void ipi_cpu_crash_stop(unsigned int cpu, struct pt_regs *regs)

atomic_dec(&waiting_for_crash_ipi);

- local_irq_disable();
+ if(!in_nmi())
+ local_irq_disable();
+
sdei_mask_local_cpu();

if (IS_ENABLED(CONFIG_HOTPLUG_CPU))
--
1.8.3.1
\
 
 \ /
  Last update: 2020-11-04 09:18    [W:0.042 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site