2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 13:58:34 +00:00

restorer: Update RESTORE_ALIGN_STACK for arm64

arm64 requires stack to be aligned to 16 bytes.
update RESTORE_ALIGN_STACK macro to always align
to 16 bytes.

Signed-off-by: Vijaya Kumar K <vijayak@caviumnetworks.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Vijaya Kumar K
2015-12-28 13:39:41 +05:30
committed by Pavel Emelyanov
parent 1a5296e537
commit cda3a0799b

View File

@@ -50,7 +50,7 @@ struct restore_mem_zone {
u8 redzone[RESTORE_STACK_REDZONE]; u8 redzone[RESTORE_STACK_REDZONE];
u8 stack[RESTORE_STACK_SIZE]; u8 stack[RESTORE_STACK_SIZE];
u8 rt_sigframe[RESTORE_STACK_SIGFRAME]; u8 rt_sigframe[RESTORE_STACK_SIGFRAME];
} __aligned(sizeof(long)); } __aligned(16);
struct rst_sched_param { struct rst_sched_param {
int policy; int policy;
@@ -197,8 +197,12 @@ struct task_restore_args {
void **breakpoint; void **breakpoint;
} __aligned(64); } __aligned(64);
/*
* For arm64 stack needs to aligned to 16 bytes.
* Hence align to 16 bytes for all
*/
#define RESTORE_ALIGN_STACK(start, size) \ #define RESTORE_ALIGN_STACK(start, size) \
(ALIGN((start) + (size) - sizeof(long), sizeof(long))) (ALIGN((start) + (size) - 16, 16))
static inline unsigned long restorer_stack(struct thread_restore_args *a) static inline unsigned long restorer_stack(struct thread_restore_args *a)
{ {