From: Paul Menzel <pmenzel@molgen.mpg.de>
To: "Rajneesh Bhardwaj" <irenic.rajneesh@gmail.com>,
"Xi Pardee" <xi.pardee@linux.intel.com>,
"Hans de Goede" <hansg@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"David E. Box" <david.e.box@linux.intel.com>,
"Gayatri Kammela" <gayatri.kammela@intel.com>
Cc: Paul Menzel <pmenzel@molgen.mpg.de>,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] platform/x86/intel/pmc: Fix Tiger Lake LTR ignore maximum to 22
Date: Sat, 21 Nov 2026 10:06:12 +0100 [thread overview]
Message-ID: <20261121090614.677144-2-pmenzel@molgen.mpg.de> (raw)
In-Reply-To: <20261121090614.677144-1-pmenzel@molgen.mpg.de>
ltr_ignore_max is the highest index in ltr_show_sts that has a bit in the
LTR_IGNORE register: pmc_core_send_ltr_ignore() accepts indices up to and
including it, pmc_core_ltr_ignore_all() sets GENMASK(ltr_ignore_max, 0),
and pmc_core_ltr_show() reads the LTR_IGNORE column for those rows. Cannon
Lake (19, EMMC), Ice Lake (20, WIGIG), Alder Lake and Meteor Lake set it to
the index of their last IP.
Tiger Lake shares cnp_ltr_show_map[], where THC1 is at index 22 and
CURRENT_PLATFORM at index 23, but sets TGL_NUM_IP_IGN_ALLOWED to 23, the
number of IPs. So debugfs accepts index 23, which is CURRENT_PLATFORM, a
row that “cannot be used for LTR_IGNORE”, and the hardware drops the bit.
On a Dell XPS 13 9310:
$ echo 23 | sudo tee /sys/kernel/debug/pmc_core/ltr_ignore
23
$ sudo grep CURRENT_PLATFORM /sys/kernel/debug/pmc_core/ltr_show
23 PMC0:CURRENT_PLATFORM LTR: RAW: 0x40201 […] LTR_IGNORE: 0
whereas index 22 (THC1) reads back LTR_IGNORE: 1.
Set TGL_NUM_IP_IGN_ALLOWED to 22. Now the write of 23 fails with -EINVAL,
like 24 before, and 22 still works.
Fixes: 43ef6c226a60 ("platform/x86: intel_pmc_core: Add LTR registers for Tiger Lake")
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
---
Notes:
Claude Code (claude-opus-5-5) helped find the off-by-one, write the
patch, and test it on the Dell XPS 13 9310.
drivers/platform/x86/intel/pmc/core.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/intel/pmc/core.h b/drivers/platform/x86/intel/pmc/core.h
index e55164e5807fd..3edad5a1f72cd 100644
--- a/drivers/platform/x86/intel/pmc/core.h
+++ b/drivers/platform/x86/intel/pmc/core.h
@@ -214,7 +214,7 @@ enum ppfear_regs {
#define TGL_PMC_SLP_S0_RES_COUNTER_STEP 0x7A
#define TGL_PMC_LTR_THC0 0x1C04
#define TGL_PMC_LTR_THC1 0x1C08
-#define TGL_NUM_IP_IGN_ALLOWED 23
+#define TGL_NUM_IP_IGN_ALLOWED 22
#define TGL_PMC_LPM_RES_COUNTER_STEP_X2 61 /* 30.5us * 2 */
#define ADL_PMC_LTR_SPF 0x1C00
--
2.54.0
prev parent reply other threads:[~2026-11-21 9:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-21 9:06 [PATCH 1/2] platform/x86/intel/pmc: Do not decode the summary rows in ltr_show Paul Menzel
2026-11-21 9:06 ` Paul Menzel [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=20261121090614.677144-2-pmenzel@molgen.mpg.de \
--to=pmenzel@molgen.mpg.de \
--cc=david.e.box@linux.intel.com \
--cc=gayatri.kammela@intel.com \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=irenic.rajneesh@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=xi.pardee@linux.intel.com \
/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®