bpf: Take advantage of stack_depth tracking in sparc64 JIT
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
551f40c42f
commit
a5e2ee5da4
|
@ -802,8 +802,13 @@ static void build_prologue(struct jit_ctx *ctx)
|
|||
{
|
||||
s32 stack_needed = BASE_STACKFRAME;
|
||||
|
||||
if (ctx->saw_frame_pointer || ctx->saw_tail_call)
|
||||
stack_needed += MAX_BPF_STACK;
|
||||
if (ctx->saw_frame_pointer || ctx->saw_tail_call) {
|
||||
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)
|
||||
stack_needed += 8;
|
||||
|
|
Loading…
Reference in New Issue