Skip to content

Commit

Permalink
Revert "objtool: Support addition to set CFA base"
Browse files Browse the repository at this point in the history
[ Upstream commit e18398e ]

Commit 468af56 ("objtool: Support addition to set CFA base") was
added as a preparatory patch for arm64 support, but that support never
came.  It triggers a false positive warning on x86, so just revert it
for now.

Fixes the following warning:

  vmlinux.o: warning: objtool: cdce925_regmap_i2c_write+0xdb: stack state mismatch: cfa1=4+120 cfa2=5+40

Fixes: 468af56 ("objtool: Support addition to set CFA base")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/oe-kbuild-all/202304080538.j5G6h1AB-lkp@intel.com/
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
jpoimboe authored and gregkh committed May 11, 2023
1 parent 623c4ae commit 78ac06c
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions tools/objtool/check.c
Original file line number Diff line number Diff line change
Expand Up @@ -2976,17 +2976,6 @@ static int update_cfi_state(struct instruction *insn,
break;
}

if (!cfi->drap && op->src.reg == CFI_SP &&
op->dest.reg == CFI_BP && cfa->base == CFI_SP &&
check_reg_frame_pos(&regs[CFI_BP], -cfa->offset + op->src.offset)) {

/* lea disp(%rsp), %rbp */
cfa->base = CFI_BP;
cfa->offset -= op->src.offset;
cfi->bp_scratch = false;
break;
}

if (op->src.reg == CFI_SP && cfa->base == CFI_SP) {

/* drap: lea disp(%rsp), %drap */
Expand Down

0 comments on commit 78ac06c

Please sign in to comment.