mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
To: Petr Tesarik <ptesarik@suse.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
	<x86@kernel.org>,
	"open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] x86/tsx: Make tsx_ctrl_state static
Date: Thu, 9 Oct 2025 10:58:52 -0700	[thread overview]
Message-ID: <20251009175852.bpqdfqbrun4kkclh@desk> (raw)
In-Reply-To: <8b7d5f2baf55334a06da558afc7e12f3a78ae7ef.1758906115.git.ptesarik@suse.com>

On Fri, Sep 26, 2025 at 08:01:01PM +0200, Petr Tesarik wrote:
> 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>
> ---
>  arch/x86/kernel/cpu/cpu.h |  9 ---------
>  arch/x86/kernel/cpu/tsx.c | 10 +++++++++-
>  2 files changed, 9 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/x86/kernel/cpu/cpu.h b/arch/x86/kernel/cpu/cpu.h
> index bc38b2d56f26a..5c7a3a71191a1 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 49782724a9430..167dfd38b87a2 100644
> --- a/arch/x86/kernel/cpu/tsx.c
> +++ b/arch/x86/kernel/cpu/tsx.c
> @@ -19,7 +19,15 @@
>  #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;

Nit, this can be on the same line:

static enum tsx_ctrl_states tsx_ctrl_state __ro_after_init = TSX_CTRL_NOT_SUPPORTED;

It is still under the 100 character limit.

Reviewed-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>

  parent reply	other threads:[~2025-10-09 17:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-26 18:01 [PATCH v2 0/2] x86/tsx: Improve handling of the tsx= kernel parameter Petr Tesarik
2025-09-26 18:01 ` [PATCH v2 1/2] x86/tsx: Make tsx_ctrl_state static Petr Tesarik
2025-10-07 12:40   ` Nikolay Borisov
2025-10-09 17:58   ` Pawan Gupta [this message]
2025-09-26 18:01 ` [PATCH v2 2/2] x86/tsx: Get the tsx= command line parameter with early_param() Petr Tesarik
2025-10-07 12:50   ` Nikolay Borisov
2025-10-08 14:03     ` Petr Tesarik
2025-10-22 16:31       ` Petr Tesarik
2025-10-09 18:51   ` Pawan Gupta
2025-10-10  0:33     ` Pawan Gupta
2025-10-10  7:45       ` Petr Tesarik
2025-10-10 17:52         ` Pawan Gupta
2025-10-10  7:40     ` Petr Tesarik

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=20251009175852.bpqdfqbrun4kkclh@desk \
    --to=pawan.kumar.gupta@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=ptesarik@suse.com \
    --cc=tglx@linutronix.de \
    --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®