On 22/09/2023 08:27, Richard Weinberger wrote:
----- Ursprüngliche Mail -----
Von: "anton ivanov" <anton.iva...@cambridgegreys.com>
An: "linux-um" <linux-um@lists.infradead.org>
CC: "Johannes Berg" <johan...@sipsolutions.net>, "richard" <rich...@nod.at>, "anton 
ivanov"
<anton.iva...@cambridgegreys.com>
Gesendet: Freitag, 22. September 2023 08:52:12
Betreff: [PATCH v5] um: Enable preemption in UML
From: Anton Ivanov <anton.iva...@cambridgegreys.com>

Preemption requires saving/restoring FPU state. This patch
adds support for it using GCC intrinsics.
Can you please state in future patches what you have changed since the last one?

Ack. Sorry.

This one adds guards around the critical sections in the TLB.

As a result I no longer see any barfs on startup in the configuration where I 
was observing them (nfs kernel server).

Both preempt and voluntary now boot without issues in that config.

Signed-off-by: Anton Ivanov <anton.iva...@cambridgegreys.com>
diff --git a/arch/um/kernel/tlb.c b/arch/um/kernel/tlb.c
index 7d050ab0f78a..34ec8e677fb9 100644
--- a/arch/um/kernel/tlb.c
+++ b/arch/um/kernel/tlb.c
@@ -362,6 +362,9 @@ static int flush_tlb_kernel_range_common(unsigned long
start, unsigned long end)

        mm = &init_mm;
        hvc = INIT_HVC(mm, force, userspace);
+
+    preempt_disable();
+
Does this address the bootup splat I've reported yesterday?


Thanks,
//richard

--
Anton R. Ivanov
Cambridgegreys Limited. Registered in England. Company Number 10273661
https://www.cambridgegreys.com/


_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um

Reply via email to