diff mbox series

[RFC,06/10] arm: setup: disable preemption during startup

Message ID 20210223023428.757694-7-volodymyr_babchuk@epam.com (mailing list archive)
State New, archived
Headers show
Series Preemption in hypervisor (ARM only) | expand

Commit Message

Volodymyr Babchuk Feb. 23, 2021, 2:34 a.m. UTC
In the subsequent patches we will enable preemption in the hypervisor
mode. But we don't want any preemption attempts while system is
still not ready to call scheduler. So we should disable preemption
during early boot stages and enable it only when we switched to idle
vCPU stack.

Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
---
 xen/arch/arm/setup.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 2532ec9739..15a618b87c 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -78,6 +78,9 @@  static __used void init_done(void)
     unregister_init_virtual_region();
 
     free_init_memory();
+
+    preempt_enable();
+
     startup_cpu_idle_loop();
 }
 
@@ -920,6 +923,7 @@  void __init start_xen(unsigned long boot_phys_offset,
 
     setup_system_domains();
 
+    preempt_disable();
     local_irq_enable();
     local_abort_enable();