[PATCH 2/2] platform/x86/intel/pmc: Fix Tiger Lake LTR ignore maximum to 22

From: Paul Menzel

Date: Sat Nov 21 2026 - 04:07:34 EST


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@xxxxxxxxxxxxx>
---

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