From: srinivas pandruvada <srinivas.pandruvada@linux.intel.com>
To: Sasha Levin <sashal@kernel.org>
Cc: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>,
stable@vger.kernel.org, Zhang Rui <rui.zhang@intel.com>,
"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>
Subject: Re: [PATCH 5.15.y] powercap: intel_rapl: Do not change CLAMPING bit if ENABLE bit cannot be changed
Date: Wed, 23 Jul 2025 10:09:24 -0700 [thread overview]
Message-ID: <fbc7f6a0e5f5144d8ad21c7f3e084638373bef67.camel@linux.intel.com> (raw)
In-Reply-To: <aID6aeUGpWGUADIz@lappy>
On Wed, 2025-07-23 at 11:06 -0400, Sasha Levin wrote:
> On Wed, Jul 23, 2025 at 06:48:08AM -0700, srinivas pandruvada wrote:
> > On Wed, 2025-07-23 at 12:11 +0530, Harshit Mogalapalli wrote:
> > > > + /* Check if the ENABLE bit was actually changed */
> > > > + ret = rapl_read_data_raw(rd, PL1_ENABLE, true, &val);
> > > > + if (ret) {
> > > > + cpus_read_unlock();
> > > > + return ret;
> > > > + }
> > >
> > > Shouldn't this be rapl_read_data_raw(rd, PL1_ENABLE, false,
> > > &val); ?
> > >
> > >
> > Correct. This will result in additional call to rapl_unit_xlate(),
> > but
> > since for primitive PL1_ENABLE, the unit is ARBITRARY_UNIT, this
> > will
> > not translate and return the same value.
>
> I was thinking we need to call rapl_unit_xlate() so we won't just get
> whatever the raw value is, but yes - since it's ARBITRARY_UNIT then
> it
> won't really do much.
>
> I guess in this case it doesn't really matter if we pass true or
> false
> here?
correct, you just save one additional call.
Thanks,
Srinivas
>
prev parent reply other threads:[~2025-07-23 17:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-08 15:14 FAILED: patch "[PATCH] powercap: intel_rapl: Do not change CLAMPING bit if ENABLE" failed to apply to 5.15-stable tree gregkh
2025-07-21 0:15 ` [PATCH 5.15.y] powercap: intel_rapl: Do not change CLAMPING bit if ENABLE bit cannot be changed Sasha Levin
2025-07-23 6:41 ` Harshit Mogalapalli
2025-07-23 13:48 ` srinivas pandruvada
2025-07-23 15:06 ` Sasha Levin
2025-07-23 17:09 ` srinivas pandruvada [this message]
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=fbc7f6a0e5f5144d8ad21c7f3e084638373bef67.camel@linux.intel.com \
--to=srinivas.pandruvada@linux.intel.com \
--cc=harshit.m.mogalapalli@oracle.com \
--cc=rafael.j.wysocki@intel.com \
--cc=rui.zhang@intel.com \
--cc=sashal@kernel.org \
--cc=stable@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