Commit a5e2ee5d authored by David S. Miller's avatar David S. Miller

bpf: Take advantage of stack_depth tracking in sparc64 JIT

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 551f40c4
...@@ -802,8 +802,13 @@ static void build_prologue(struct jit_ctx *ctx) ...@@ -802,8 +802,13 @@ static void build_prologue(struct jit_ctx *ctx)
{ {
s32 stack_needed = BASE_STACKFRAME; s32 stack_needed = BASE_STACKFRAME;
if (ctx->saw_frame_pointer || ctx->saw_tail_call) if (ctx->saw_frame_pointer || ctx->saw_tail_call) {
stack_needed += MAX_BPF_STACK; struct bpf_prog *prog = ctx->prog;
u32 stack_depth;
stack_depth = prog->aux->stack_depth;
stack_needed += round_up(stack_depth, 16);
}
if (ctx->saw_tail_call) if (ctx->saw_tail_call)
stack_needed += 8; stack_needed += 8;
......
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