mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Tiezhu Yang" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Tiezhu Yang <yangtiezhu@loongson.cn>,
	Huacai Chen <chenhuacai@loongson.cn>,
	Josh Poimboeuf <jpoimboe@kernel.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: objtool/core] LoongArch: Enable jump table for objtool
Date: Fri, 14 Mar 2025 20:03:56 -0000	[thread overview]
Message-ID: <174198263615.14745.12782989496753781204.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20241217010905.13054-8-yangtiezhu@loongson.cn>

The following commit has been merged into the objtool/core branch of tip:

Commit-ID:     e20ab7d454ee8d1e0e8b9ff73a7c87e84c666b2f
Gitweb:        https://git.kernel.org/tip/e20ab7d454ee8d1e0e8b9ff73a7c87e84c666b2f
Author:        Tiezhu Yang <yangtiezhu@loongson.cn>
AuthorDate:    Tue, 17 Dec 2024 09:09:03 +08:00
Committer:     Josh Poimboeuf <jpoimboe@kernel.org>
CommitterDate: Wed, 12 Mar 2025 15:43:39 -07:00

LoongArch: Enable jump table for objtool

For now, it is time to remove -fno-jump-tables to enable jump table for
objtool if the compiler has -mannotate-tablejump, otherwise it is better
to remain -fno-jump-tables to keep compatibility with older compilers.

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Link: https://lore.kernel.org/r/20241217010905.13054-8-yangtiezhu@loongson.cn
Acked-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
---
 arch/loongarch/Kconfig  | 3 +++
 arch/loongarch/Makefile | 6 +++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
index 2b8bd27..15aaa2e 100644
--- a/arch/loongarch/Kconfig
+++ b/arch/loongarch/Kconfig
@@ -291,6 +291,9 @@ config AS_HAS_LBT_EXTENSION
 config AS_HAS_LVZ_EXTENSION
 	def_bool $(as-instr,hvcl 0)
 
+config CC_HAS_ANNOTATE_TABLEJUMP
+	def_bool $(cc-option,-mannotate-tablejump)
+
 menu "Kernel type and options"
 
 source "kernel/Kconfig.hz"
diff --git a/arch/loongarch/Makefile b/arch/loongarch/Makefile
index 567bd12..0304eab 100644
--- a/arch/loongarch/Makefile
+++ b/arch/loongarch/Makefile
@@ -101,7 +101,11 @@ KBUILD_AFLAGS			+= $(call cc-option,-mthin-add-sub) $(call cc-option,-Wa$(comma)
 KBUILD_CFLAGS			+= $(call cc-option,-mthin-add-sub) $(call cc-option,-Wa$(comma)-mthin-add-sub)
 
 ifdef CONFIG_OBJTOOL
-KBUILD_CFLAGS			+= -fno-jump-tables
+ifdef CONFIG_CC_HAS_ANNOTATE_TABLEJUMP
+KBUILD_CFLAGS			+= -mannotate-tablejump
+else
+KBUILD_CFLAGS			+= -fno-jump-tables # keep compatibility with older compilers
+endif
 endif
 
 KBUILD_RUSTFLAGS		+= --target=loongarch64-unknown-none-softfloat -Ccode-model=small

  reply	other threads:[~2025-03-14 20:04 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-17  1:08 [PATCH v6 0/9] Add jump table support for objtool on LoongArch Tiezhu Yang
2024-12-17  1:08 ` [PATCH v6 1/9] objtool: Handle various symbol types of rodata Tiezhu Yang
2024-12-17  1:08 ` [PATCH v6 2/9] objtool: Handle different entry size " Tiezhu Yang
2025-02-11 14:19   ` [PATCH] objtool: remove duplicate case value R_PPC64_REL32 Kexy Biscuit
2025-02-11 23:34     ` Josh Poimboeuf
2024-12-17  1:08 ` [PATCH v6 3/9] objtool: Handle PC relative relocation type Tiezhu Yang
2024-12-17  1:09 ` [PATCH v6 4/9] objtool: Handle unreachable entry of rodata Tiezhu Yang
2025-02-10 21:17   ` Josh Poimboeuf
2024-12-17  1:09 ` [PATCH v6 5/9] objtool/LoongArch: Add support for switch table Tiezhu Yang
2024-12-17  1:09 ` [PATCH v6 6/9] objtool/LoongArch: Add support for goto table Tiezhu Yang
2024-12-17  1:09 ` [PATCH v6 7/9] LoongArch: Enable jump table for objtool Tiezhu Yang
2025-03-14 20:03   ` tip-bot2 for Tiezhu Yang [this message]
2024-12-17  1:09 ` [PATCH v6 8/9] LoongArch: Convert unreachable() to BUG() Tiezhu Yang
2024-12-17  1:50 ` [PATCH v6 9/9] drm/amd/display: Mark dc_fixpt_from_fraction() noinline Tiezhu Yang
2024-12-18 14:36   ` Huacai Chen
2024-12-18 19:05     ` Josh Poimboeuf
2024-12-18 19:22       ` Alex Deucher
2024-12-20  5:02         ` Tiezhu Yang
2024-12-20 10:31           ` Peter Zijlstra
2024-12-20 22:34             ` Nathan Chancellor
2024-12-21  7:40               ` Xi Ruoyao
2024-12-22  4:27                 ` Tiezhu Yang
2024-12-23 21:46                   ` Nathan Chancellor
2024-12-25  9:43                     ` Tiezhu Yang
2025-01-04 13:58 ` [PATCH v6 0/9] Add jump table support for objtool on LoongArch Huacai Chen
2025-01-11  6:57 ` Tiezhu Yang
2025-01-15  1:34   ` Josh Poimboeuf
2025-02-10  6:07     ` Tiezhu Yang
2025-02-10 21:26       ` Josh Poimboeuf
2025-02-11 11:59         ` Huacai Chen
2025-02-11 23:30           ` Josh Poimboeuf
2025-02-12  7:22             ` Huacai Chen
2025-02-13  2:51               ` Josh Poimboeuf
2025-02-17  3:13                 ` Huacai Chen
2025-02-18 17:46                   ` Josh Poimboeuf
2025-02-19  9:49                     ` Huacai Chen
2025-02-20 21:33                       ` Josh Poimboeuf

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=174198263615.14745.12782989496753781204.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=chenhuacai@loongson.cn \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=x86@kernel.org \
    --cc=yangtiezhu@loongson.cn \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®