mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: srinivas pandruvada <srinivas.pandruvada@linux.intel.com>
To: Maciej Wieczor-Retman <m.wieczorretman@pm.me>,
	hansg@kernel.org,  ilpo.jarvinen@linux.intel.com
Cc: linux-kernel@vger.kernel.org,
	platform-driver-x86@vger.kernel.org,  dedekind1@gmail.com,
	artem.bityutskiy@linux.intel.com,
	Maciej Wieczor-Retman	 <maciej.wieczor-retman@intel.com>
Subject: Re: [PATCH v2 1/2] platform/x86/intel-uncore-freq: Rename instance_id
Date: Tue, 07 Apr 2026 10:49:25 -0700	[thread overview]
Message-ID: <31135e7d85223b1190d146d185252979bdd66ba0.camel@linux.intel.com> (raw)
In-Reply-To: <00eb8abdbbbe607724dbb09481513686bfbd14aa.1775159775.git.m.wieczorretman@pm.me>

On Thu, 2026-04-02 at 19:59 +0000, Maciej Wieczor-Retman wrote:
> From: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
> 
> The "instance" word has a specific meaning in TPMI. It is a physical
> index related to compute dies and IO dies present on a single TPMI
> partition (which is also a single TPMI device). It's used for mapping
> MMIO blocks for direct TPMI register access.
> 
> The currently used "instance_id" uncore_data struct field is a
> sequentially generated value that's used for appending to uncore
> directories inside the /sys/devices/system/cpu/intel_uncore_frequency
> directory. It has no relation to the physical TPMI elements.
> 
> Signed-off-by: Maciej Wieczor-Retman
> <maciej.wieczor-retman@intel.com>

Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

> ---
> Changelog v2:
> - Redid the first paragraph to better describe what "instance" is.
> - Rename seqname_id to seqnum_id to emphasize it's a sequential
> number
>   not sequential name.
> 
>  .../x86/intel/uncore-frequency/uncore-frequency-common.c    | 6 +++-
> --
>  .../x86/intel/uncore-frequency/uncore-frequency-common.h    | 4 ++--
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/platform/x86/intel/uncore-frequency/uncore-
> frequency-common.c b/drivers/platform/x86/intel/uncore-
> frequency/uncore-frequency-common.c
> index 7070c94324e0..25ab511ed8d2 100644
> --- a/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-
> common.c
> +++ b/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-
> common.c
> @@ -268,7 +268,7 @@ int uncore_freq_add_entry(struct uncore_data
> *data, int cpu)
>  		if (ret < 0)
>  			goto uncore_unlock;
>  
> -		data->instance_id = ret;
> +		data->seqnum_id = ret;
>  		scnprintf(data->name, sizeof(data->name),
> "uncore%02d", ret);
>  	} else {
>  		scnprintf(data->name, sizeof(data->name),
> "package_%02d_die_%02d",
> @@ -281,7 +281,7 @@ int uncore_freq_add_entry(struct uncore_data
> *data, int cpu)
>  	ret = create_attr_group(data, data->name);
>  	if (ret) {
>  		if (data->domain_id != UNCORE_DOMAIN_ID_INVALID)
> -			ida_free(&intel_uncore_ida, data-
> >instance_id);
> +			ida_free(&intel_uncore_ida, data-
> >seqnum_id);
>  	} else {
>  		data->control_cpu = cpu;
>  		data->valid = true;
> @@ -301,7 +301,7 @@ void uncore_freq_remove_die_entry(struct
> uncore_data *data)
>  	data->control_cpu = -1;
>  	data->valid = false;
>  	if (data->domain_id != UNCORE_DOMAIN_ID_INVALID)
> -		ida_free(&intel_uncore_ida, data->instance_id);
> +		ida_free(&intel_uncore_ida, data->seqnum_id);
>  
>  	mutex_unlock(&uncore_lock);
>  }
> diff --git a/drivers/platform/x86/intel/uncore-frequency/uncore-
> frequency-common.h b/drivers/platform/x86/intel/uncore-
> frequency/uncore-frequency-common.h
> index 0abe850ef54e..0d5fd91ee0aa 100644
> --- a/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-
> common.h
> +++ b/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-
> common.h
> @@ -35,7 +35,7 @@
>   * @die_id:		Die id for this instance
>   * @domain_id:		Power domain id for this instance
>   * @cluster_id:		cluster id in a domain
> - * @instance_id:	Unique instance id to append to directory
> name
> + * @seqnum_id:		Unique sequential id to append to directory
> name
>   * @name:		Sysfs entry name for this instance
>   * @agent_type_mask:	Bit mask of all hardware agents for this
> domain
>   * @uncore_attr_group:	Attribute group storage
> @@ -71,7 +71,7 @@ struct uncore_data {
>  	int die_id;
>  	int domain_id;
>  	int cluster_id;
> -	int instance_id;
> +	int seqnum_id;
>  	char name[32];
>  	u16  agent_type_mask;
>  

  reply	other threads:[~2026-04-07 17:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-02 19:59 [PATCH v2 0/2] platform/x86/intel-uncore-freq: Expose instance ID in the sysfs Maciej Wieczor-Retman
2026-04-02 19:59 ` [PATCH v2 1/2] platform/x86/intel-uncore-freq: Rename instance_id Maciej Wieczor-Retman
2026-04-07 17:49   ` srinivas pandruvada [this message]
2026-04-02 19:59 ` [PATCH v2 2/2] platform/x86/intel-uncore-freq: Expose instance ID in the sysfs Maciej Wieczor-Retman
2026-04-07 18:03   ` srinivas pandruvada
2026-04-07 18:19     ` Maciej Wieczor-Retman
2026-04-07 20:37       ` srinivas pandruvada
2026-04-07 21:32         ` Maciej Wieczor-Retman
2026-04-07 17:45 ` [PATCH v2 0/2] " srinivas pandruvada
2026-04-07 18:13   ` Maciej Wieczor-Retman

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=31135e7d85223b1190d146d185252979bdd66ba0.camel@linux.intel.com \
    --to=srinivas.pandruvada@linux.intel.com \
    --cc=artem.bityutskiy@linux.intel.com \
    --cc=dedekind1@gmail.com \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.wieczorretman@pm.me \
    --cc=maciej.wieczor-retman@intel.com \
    --cc=platform-driver-x86@vger.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

Powered by JetHome