[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [PATCH v3 25/43] arm64: fix the wrong size of the register
The callee-saved registers are 64bit in arm64, not 32 bit. So this patch uses "sizeof(unsigned long)" to replace the hardcode. This patch also fixes the wrong commit for arch_create_thread. Reviewed-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx> Signed-off-by: Huang Shijie <shijie.huang@xxxxxxx> --- arch/arm/sched.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/sched.c b/arch/arm/sched.c index 394b000..a209513 100644 --- a/arch/arm/sched.c +++ b/arch/arm/sched.c @@ -27,10 +27,10 @@ struct thread* arch_create_thread(char *name, void (*function)(void *), *(--sp) = (unsigned long) function; *(--sp) = (unsigned long) data; - /* We leave room for the 8 callee-saved registers which we will + /* We leave room for the callee-saved registers which we will * try to restore on thread switch, even though they're not needed * for the initial switch. */ - thread->sp = (unsigned long) sp - 4 * CALLEE_SAVED_REGISTERS; + thread->sp = (unsigned long) sp - sizeof(unsigned long) * CALLEE_SAVED_REGISTERS; thread->ip = (unsigned long) arm_start_thread; -- 2.7.4 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |