[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [PATCH v2 27/47] arm64: implement the run_idle_thread



The patch implements the run_idle_thread() for the idle thread.

Signed-off-by: Huang Shijie <shijie.huang@xxxxxxx>
---
 arch/arm/sched.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/sched.c b/arch/arm/sched.c
index a209513..d79871e 100644
--- a/arch/arm/sched.c
+++ b/arch/arm/sched.c
@@ -37,6 +37,7 @@ struct thread* arch_create_thread(char *name, void 
(*function)(void *),
     return thread;
 }
 
+#if defined(__arm__)
 void run_idle_thread(void)
 {
     __asm__ __volatile__ ("mov sp, %0; bx %1"::
@@ -44,3 +45,14 @@ void run_idle_thread(void)
             "r"(idle_thread->ip));
     /* Never arrive here! */
 }
+
+#elif defined(__aarch64__)
+void run_idle_thread(void)
+{
+    __asm__ __volatile__ ("mov sp, %0; br %1"::
+            "r"(idle_thread->sp + sizeof(unsigned long) * 
CALLEE_SAVED_REGISTERS),
+            "r"(idle_thread->ip));
+    /* Never arrive here! */
+}
+
+#endif
-- 
2.7.4


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.