Resent patch to solve a indentation mistake

El mar., 6 oct. 2020 a las 23:23, Almudena Garcia (<
[email protected]>) escribió:

> Hi all:
>
> I attach a new patch, to solve the problem which caused the kernel panic
> when Mach boots in SMP mode,
>
From 543cbea04dc0f56928a646834eda46947b34a8b3 Mon Sep 17 00:00:00 2001
From: Almudena Garcia <[email protected]>
Date: Tue, 6 Oct 2020 23:19:58 +0200
Subject: [PATCH] fix: fix kernel panic in SMP mode

Add mp_desc_init() call in BSP processor, to initialize some structures needed for SMP
---
 i386/i386at/model_dep.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c
index 346f2b9c..e9b2eb3b 100644
--- a/i386/i386at/model_dep.c
+++ b/i386/i386at/model_dep.c
@@ -58,6 +58,7 @@
 #include <i386/ktss.h>
 #include <i386/ldt.h>
 #include <i386/machspl.h>
+#include <i386/mp_desc.h>
 #include <i386/pic.h>
 #include <i386/pit.h>
 #include <i386/pmap.h>
@@ -501,6 +502,10 @@ i386at_init(void)
 	ldt_init();
 	ktss_init();
 
+#if NCPUS > 1
+	mp_desc_init(0);
+#endif // NCPUS
+
 #if INIT_VM_MIN_KERNEL_ADDRESS != LINEAR_MIN_KERNEL_ADDRESS
 	/* Get rid of the temporary direct mapping and flush it out of the TLB.  */
 	for (i = 0 ; i < nb_direct; i++) {
-- 
2.28.0

Reply via email to