Commit cda3a079 authored by Vijaya Kumar K's avatar Vijaya Kumar K Committed by Pavel Emelyanov

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: 's avatarVijaya Kumar K <vijayak@caviumnetworks.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 1a5296e5
......@@ -50,7 +50,7 @@ struct restore_mem_zone {
u8 redzone[RESTORE_STACK_REDZONE];
u8 stack[RESTORE_STACK_SIZE];
u8 rt_sigframe[RESTORE_STACK_SIGFRAME];
} __aligned(sizeof(long));
} __aligned(16);
struct rst_sched_param {
int policy;
......@@ -197,8 +197,12 @@ struct task_restore_args {
void **breakpoint;
} __aligned(64);
/*
* For arm64 stack needs to aligned to 16 bytes.
* Hence align to 16 bytes for all
*/
#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)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment