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

Re: [Minios-devel] [PATCH v3 22/43] arm64: implement the __arch_switch_threads



On Mon, Apr 30, 2018 at 10:34:27AM +0100, Julien Grall wrote:
> 
> 
> On 28/04/18 07:26, Huang Shijie wrote:
> >On Thu, Apr 26, 2018 at 01:29:24PM +0100, Julien Grall wrote:
> >>Hi Shijie,
> >>
> >>On 16/04/18 07:32, Huang Shijie wrote:
> >>>The __arch_switch_threads is used for switching the threads.
> >>>This patch implements it.
> >>>
> >>>Signed-off-by: Huang Shijie <shijie.huang@xxxxxxx>
> >>>---
> >>>  arch/arm/arm64/arm64.S | 38 ++++++++++++++++++++++++++++++++++++++
> >>>  include/arm/arm64/os.h |  4 ++++
> >>>  2 files changed, 42 insertions(+)
> >>>
> >>>diff --git a/arch/arm/arm64/arm64.S b/arch/arm/arm64/arm64.S
> >>>index fa3406f..5f55f99 100644
> >>>--- a/arch/arm/arm64/arm64.S
> >>>+++ b/arch/arm/arm64/arm64.S
> >>>@@ -1,5 +1,6 @@
> >>>  #include "asm.h"
> >>>  #include <arch_limits.h>
> >>>+#include <arm64/os.h>
> >>>  #include <arm64/pagetable.h>
> >>>  #include <arm64/traps.h>
> >>>  #include <xen/xen.h>
> >>>@@ -434,3 +435,40 @@ ENTRY(vector_table)
> >>>      vector_entry el0_fiq_invalid          /* FIQ 32-bit EL0         */
> >>>      vector_entry el0_error_invalid        /* Error 32-bit EL0       */
> >>>  END(vector_table)
> >>>+
> >>>+/*
> >>>+ * => x0 = &prev->sp
> >>>+ *    x1 = &next->sp
> >>>+ * <= switch to the next thread
> >>
> >>Some documentation about the layout of the structure in memory would be
> >>useful.
> >okay.
> >>
> >>>+ */
> >>>+ENTRY(__arch_switch_threads)
> >>>+    /* Store the callee-saved registers to prev's struct thread */
> >>
> >>AFAICT, you don't store the callee-saved registers in struct thread but on
> >>the stack. Am I right?
> >Yes.
> >I store them in the stack.
> 
> Please update the comment accordingly then.
okay. No problem.

Thanks
Huang Shijie

_______________________________________________
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®.