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

Re: [Minios-devel] [PATCH 22/40] arm64: change sp to "unsigned long" type



Huang Shijie, on ven. 03 nov. 2017 03:11:59 +0000, wrote:
> The "int" type is wrong for the arm64 platform.
> This patch changes the "sp" to "unsigned long" type.
> 
> Change-Id: Ib07d49ceb5088fc505c0bffe2e61f962fcf46783
> Jira: ENTOS-247
> Signed-off-by: Huang Shijie <shijie.huang@xxxxxxx>

Reviewed-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>

> ---
>  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/cgi-bin/mailman/listinfo/minios-devel

-- 
Samuel
The nice thing about Windows is - It does not just crash, it displays a
dialog box and lets you press 'OK' first.
(Arno Schaefer's .sig)

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

 


Rackspace

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