All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: jpoimboe@redhat.com
Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, mbenes@suse.cz
Subject: [PATCH 1/2] objtool: Optimize re-writing jump_label
Date: Thu, 07 Oct 2021 23:22:12 +0200	[thread overview]
Message-ID: <20211007212626.950220936@infradead.org> (raw)
In-Reply-To: <20211007212211.366874577@infradead.org>

There's no point to re-write the jump_label NOP when it's already a NOP.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
---
 tools/objtool/check.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -1397,7 +1397,7 @@ static int handle_jump_alt(struct objtoo
 		return -1;
 	}
 
-	if (special_alt->key_addend & 2) {
+	if ((special_alt->key_addend & 2) && orig_insn->type != INSN_NOP) {
 		struct reloc *reloc = insn_reloc(file, orig_insn);
 
 		if (reloc) {



  reply	other threads:[~2021-10-07 21:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-07 21:22 [PATCH 0/2] objtool: Avoid pointless modifications Peter Zijlstra
2021-10-07 21:22 ` Peter Zijlstra [this message]
2021-10-08  6:55   ` [PATCH 1/2] objtool: Optimize re-writing jump_label Josh Poimboeuf
2021-10-08 10:03     ` Peter Zijlstra
2021-10-08 16:28       ` Josh Poimboeuf
2021-10-07 21:22 ` [PATCH 2/2] objtool: Optimize/fix retpoline alternative generation Peter Zijlstra
2021-10-08  7:23   ` Josh Poimboeuf
2021-10-08 10:35     ` Peter Zijlstra
2021-10-08 16:39       ` Josh Poimboeuf
2021-10-09 10:42         ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211007212626.950220936@infradead.org \
    --to=peterz@infradead.org \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbenes@suse.cz \
    --subject='Re: [PATCH 1/2] objtool: Optimize re-writing jump_label' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.