From: "tip-bot2 for Petr Tesarik" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Petr Tesarik <ptesarik@suse.com>,
"Borislav Petkov (AMD)" <bp@alien8.de>,
Nikolay Borisov <nik.borisov@suse.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/bugs] x86/tsx: Make tsx_ctrl_state static
Date: Fri, 24 Oct 2025 20:27:00 -0000 [thread overview]
Message-ID: <176133762078.2601451.5193589047570405990.tip-bot2@tip-bot2> (raw)
The following commit has been merged into the x86/bugs branch of tip:
Commit-ID: f018fca8f90bc383fefd97e3b2db03ea612ac789
Gitweb: https://git.kernel.org/tip/f018fca8f90bc383fefd97e3b2db03ea612ac789
Author: Petr Tesarik <ptesarik@suse.com>
AuthorDate: Wed, 22 Oct 2025 12:26:12 +02:00
Committer: Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Fri, 24 Oct 2025 18:24:42 +02:00
x86/tsx: Make tsx_ctrl_state static
Move all definitions related to tsx_ctrl_state to tsx.c. They are
never referenced outside this file.
No functional change.
Signed-off-by: Petr Tesarik <ptesarik@suse.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Nikolay Borisov <nik.borisov@suse.com>
Link: https://lore.kernel.org/all/cover.1758906115.git.ptesarik@suse.com
---
arch/x86/kernel/cpu/cpu.h | 9 ---------
arch/x86/kernel/cpu/tsx.c | 9 ++++++++-
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/arch/x86/kernel/cpu/cpu.h b/arch/x86/kernel/cpu/cpu.h
index bc38b2d..5c7a3a7 100644
--- a/arch/x86/kernel/cpu/cpu.h
+++ b/arch/x86/kernel/cpu/cpu.h
@@ -42,15 +42,6 @@ extern const struct cpu_dev *const __x86_cpu_dev_start[],
*const __x86_cpu_dev_end[];
#ifdef CONFIG_CPU_SUP_INTEL
-enum tsx_ctrl_states {
- TSX_CTRL_ENABLE,
- TSX_CTRL_DISABLE,
- TSX_CTRL_RTM_ALWAYS_ABORT,
- TSX_CTRL_NOT_SUPPORTED,
-};
-
-extern __ro_after_init enum tsx_ctrl_states tsx_ctrl_state;
-
extern void __init tsx_init(void);
void tsx_ap_init(void);
void intel_unlock_cpuid_leafs(struct cpuinfo_x86 *c);
diff --git a/arch/x86/kernel/cpu/tsx.c b/arch/x86/kernel/cpu/tsx.c
index 4978272..8be08ec 100644
--- a/arch/x86/kernel/cpu/tsx.c
+++ b/arch/x86/kernel/cpu/tsx.c
@@ -19,7 +19,14 @@
#undef pr_fmt
#define pr_fmt(fmt) "tsx: " fmt
-enum tsx_ctrl_states tsx_ctrl_state __ro_after_init = TSX_CTRL_NOT_SUPPORTED;
+enum tsx_ctrl_states {
+ TSX_CTRL_ENABLE,
+ TSX_CTRL_DISABLE,
+ TSX_CTRL_RTM_ALWAYS_ABORT,
+ TSX_CTRL_NOT_SUPPORTED,
+};
+
+static enum tsx_ctrl_states tsx_ctrl_state __ro_after_init = TSX_CTRL_NOT_SUPPORTED;
static void tsx_disable(void)
{
reply other threads:[~2025-10-24 20:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=176133762078.2601451.5193589047570405990.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=nik.borisov@suse.com \
--cc=ptesarik@suse.com \
--cc=x86@kernel.org \
/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®