mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-23 04:54:01 +08:00
objtool: Make handle_insn_ops() unconditional
Now that every instruction has a list of stack_ops; we can trivially distinquish those instructions that do not have stack_ops, their list is empty. This means we can now call handle_insn_ops() unconditionally. Suggested-by: Julien Thierry <jthierry@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Miroslav Benes <mbenes@suse.cz> Acked-by: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lkml.kernel.org/r/20200428191659.795115188@infradead.org
This commit is contained in:
parent
7d989fcadd
commit
60041bcd8f
@ -2259,6 +2259,9 @@ static int validate_branch(struct objtool_file *file, struct symbol *func,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (handle_insn_ops(insn, &state))
|
||||||
|
return 1;
|
||||||
|
|
||||||
switch (insn->type) {
|
switch (insn->type) {
|
||||||
|
|
||||||
case INSN_RETURN:
|
case INSN_RETURN:
|
||||||
@ -2318,9 +2321,6 @@ static int validate_branch(struct objtool_file *file, struct symbol *func,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case INSN_EXCEPTION_RETURN:
|
case INSN_EXCEPTION_RETURN:
|
||||||
if (handle_insn_ops(insn, &state))
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This handles x86's sync_core() case, where we use an
|
* This handles x86's sync_core() case, where we use an
|
||||||
* IRET to self. All 'normal' IRET instructions are in
|
* IRET to self. All 'normal' IRET instructions are in
|
||||||
@ -2340,8 +2340,6 @@ static int validate_branch(struct objtool_file *file, struct symbol *func,
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case INSN_STACK:
|
case INSN_STACK:
|
||||||
if (handle_insn_ops(insn, &state))
|
|
||||||
return 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case INSN_STAC:
|
case INSN_STAC:
|
||||||
|
Loading…
Reference in New Issue
Block a user