summaryrefslogtreecommitdiffstats
path: root/tools/objtool/check.c
diff options
context:
space:
mode:
authorJulien Thierry <jthierry@redhat.com>2020-03-27 15:28:43 +0000
committerIngo Molnar <mingo@kernel.org>2020-04-22 10:53:49 +0200
commitaff5e16918c3706622b138ea82391d6c597c5660 (patch)
treed72bf41aea76fdc1a9ee47780858015951552888 /tools/objtool/check.c
parent7170cf47d16f1ba29eca07fd818870b7af0a93a5 (diff)
downloadlinux-aff5e16918c3706622b138ea82391d6c597c5660.tar.bz2
objtool: Use arch specific values in restore_reg()
The initial register state is set up by arch specific code. Use the value the arch code has set when restoring registers from the stack. Suggested-by: Raphael Gault <raphael.gault@arm.com> Signed-off-by: Julien Thierry <jthierry@redhat.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Miroslav Benes <mbenes@suse.cz> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/objtool/check.c')
-rw-r--r--tools/objtool/check.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index efb964013552..229d61eba176 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -1486,8 +1486,8 @@ static void save_reg(struct insn_state *state, unsigned char reg, int base,
static void restore_reg(struct insn_state *state, unsigned char reg)
{
- state->regs[reg].base = CFI_UNDEFINED;
- state->regs[reg].offset = 0;
+ state->regs[reg].base = initial_func_cfi.regs[reg].base;
+ state->regs[reg].offset = initial_func_cfi.regs[reg].offset;
}
/*