All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: srinivas pandruvada <srinivas.pandruvada@linux.intel.com>
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 11:06:17 -0400	[thread overview]
Message-ID: <aID6aeUGpWGUADIz@lappy> (raw)
In-Reply-To: <2b62ff30e0c3a256ec18d074623967e3b317e1e3.camel@linux.intel.com>

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?

-- 
Thanks,
Sasha

  reply	other threads:[~2025-07-23 15:06 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 [this message]
2025-07-23 17:09         ` srinivas pandruvada

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=aID6aeUGpWGUADIz@lappy \
    --to=sashal@kernel.org \
    --cc=harshit.m.mogalapalli@oracle.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rui.zhang@intel.com \
    --cc=srinivas.pandruvada@linux.intel.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.