From: srinivas pandruvada <srinivas.pandruvada@linux.intel.com>
To: Maciej Wieczor-Retman <m.wieczorretman@pm.me>
Cc: hansg@kernel.org, ilpo.jarvinen@linux.intel.com,
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 2/2] platform/x86/intel-uncore-freq: Expose instance ID in the sysfs
Date: Tue, 07 Apr 2026 13:37:32 -0700 [thread overview]
Message-ID: <4ff01d1a3de5b392a9b19b5c33d1dd4e2d62e635.camel@linux.intel.com> (raw)
In-Reply-To: <adVJgJGUGLQ_W4Ny@wieczorr-mobl1.localdomain>
On Tue, 2026-04-07 at 18:19 +0000, Maciej Wieczor-Retman wrote:
> On 2026-04-07 at 11:03:06 -0700, srinivas pandruvada wrote:
> > On Thu, 2026-04-02 at 19:59 +0000, Maciej Wieczor-Retman wrote:
> > > From: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
> > >
> > > Insufficient data is exported to allow direct access to TPMI
> > > registers
> > > through MMIO. On non-partitioned systems domain_id can be used
> > > both
> > > for
> > > mapping CPUs to their compute die IDs and for mapping die indices
> > > to
> > > their MMIO memory blocks mapped
> > > into userspace.
> >
> > not mapped. But presented to user space via TPMI debugfs.
> > > However on partitioned
> > > systems it can't be used for mapping MMIO blocks anymore.
> > Again not mapping.
>
> Okay, I'll fix these two messages.
>
> ...
> > > --- a/drivers/platform/x86/intel/uncore-frequency/uncore-
> > > frequency-
> > > tpmi.c
> > > +++ b/drivers/platform/x86/intel/uncore-frequency/uncore-
> > > frequency-
> > > tpmi.c
> > > @@ -385,7 +385,19 @@ static u8 io_die_index_next;
> > > /* Lock to protect io_die_start, io_die_index_next */
> > > static DEFINE_MUTEX(domain_lock);
> > >
> > > -static void set_domain_id(int id, int num_resources,
> > > +static void set_instance_id(int id, struct
> > > tpmi_uncore_cluster_info
> > > *cluster_info)
> > > +{
> > > + /*
> > > + * On non-partitioned systems domain_id can be used for
> > > mapping both
> > > + * CPUs to compute die IDs and physical die indexes to
> > > MMIO
> > > mapped
> > > + * memory. However on partitioned systems domain_id
> > > loses
> > > the second
> > > + * association. Therefore instance_id should be used for
> > > that instead,
> > > + * while domain_id should still be used to match CPUs to
> > > compute dies.
> > > + */
> > > + cluster_info->uncore_data.instance_id = id;
> > > +}
> >
> > Do you need a function for single line assignment? Why not just
> > assign
> > in the uncore_probe().
>
> I thought uncore_probe() would be less cluttered if I move this
> assignment to a
> separate function, especially with this longer comment.
>
> But I can move it to uncore_probe(). Do you think the comment is
> helpful or
> should it be shortened? I thought it'd be good to keep some context
> information
> in here too.
I think static inline should be OK.
https://www.kernel.org/doc/html/v5.8/process/coding-style.html#the-inline-disease
"
A reasonable rule of thumb is to not put inline at functions that have
more than 3 lines of code in them. An exception to this rule are the
cases where a parameter is known to be a compiletime constant, and as a
result of this constantness you know the compiler will be able to
optimize most of your function away at compile time. For a good example
of this later case, see the kmalloc() inline function.
"
next prev parent reply other threads:[~2026-04-07 20:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-02 19:59 [PATCH v2 0/2] " 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
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 [this message]
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=4ff01d1a3de5b392a9b19b5c33d1dd4e2d62e635.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