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

[Minios-devel] [PATCH v2 25/47] arm64: change sp to "unsigned long" type



The "int" type is wrong for the arm64 platform.
This patch changes the "sp" to "unsigned long" type.

Reviewed-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
Signed-off-by: Huang Shijie <shijie.huang@xxxxxxx>
---
 arch/arm/sched.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/arm/sched.c b/arch/arm/sched.c
index d1af379..394b000 100644
--- a/arch/arm/sched.c
+++ b/arch/arm/sched.c
@@ -10,6 +10,7 @@ struct thread* arch_create_thread(char *name, void 
(*function)(void *),
                                   void *data)
 {
     struct thread *thread;
+    unsigned long *sp;
 
     thread = xmalloc(struct thread);
     /* We can't use lazy allocation here since the trap handler runs on the 
stack */
@@ -22,9 +23,9 @@ struct thread* arch_create_thread(char *name, void 
(*function)(void *),
     *((unsigned long *)thread->stack) = (unsigned long)thread;
 
     /* Push the details to pass to arm_start_thread onto the stack. */
-    int *sp = (int *) (thread->stack + STACK_SIZE);
-    *(--sp) = (int) function;
-    *(--sp) = (int) data;
+    sp = (unsigned long *) (thread->stack + STACK_SIZE);
+    *(--sp) = (unsigned long) function;
+    *(--sp) = (unsigned long) data;
 
     /* We leave room for the 8 callee-saved registers which we will
      * try to restore on thread switch, even though they're not needed
-- 
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®.