Re: [PATCH 1/2] platform/x86/intel/pmc: Do not decode the summary rows in ltr_show
From: Andy Shevchenko
Date: Mon Nov 23 2026 - 03:27:15 EST
On Sat, Nov 21, 2026 at 10:06:11AM +0100, Paul Menzel wrote:
> On an Intel Tiger Lake laptop Dell XPS 13 9310, the first read of
> `/sys/kernel/debug/pmc_core/ltr_show` after loading the driver logs:
>
> intel_pmc_core: Invalid LTR scale factor 7 (only 0-5 are valid per PCIe spec)
>
> The value comes from the last row, AGGREGATED_SYSTEM (CNP_PMC_LTR_CUR_ASLT,
> 0x1b54). In 120 reads over 30 seconds, it read 0x7fffdff, 0x7fffc1f or
> 0x7fffc23 (117 times), and 0x40201ff or 0x402001f (3 times); another read
> gave 0x7ffffff. Decoded as an LTR message, the snoop half of the first
> group has the reserved bits 14:13 set and scale 7, and the second group is
> CURRENT_PLATFORM (0x40201) shifted left by eight with the low byte filled.
> So these two PMC registers do not seem to hold the PCIe LTR payload the
> per-IP rows carry, and decoding them only produces the warning (the decoded
> value is 0 anyway).
>
> All ltr_show maps end with CURRENT_PLATFORM and AGGREGATED_SYSTEM, which
> pmc_core_send_ltr_ignore() already relies on. Print only the raw value of
> these two rows, as for rows without a requirement bit set, and keep the
> warning for the per-IP rows.
> With the change, 200 reads with AGGREGATED_SYSTEM bit 15 set in 199 of them
> log nothing, and the CNV row is still decoded (0x89fe89fe, 522240 ns).
This paragraph better to be in the comment block, after '---' line below.
We will have this information being archived by lore.kernel.org.
> Fixes: 8122e7cd806d ("platform/x86: intel_pmc_core: Decode Snoop / Non Snoop LTR")
> Signed-off-by: Paul Menzel <pmenzel@xxxxxxxxxxxxx>
> ---
>
> Notes:
> Claude Code (claude-opus-5-5) helped analyse the register values, write
> the patch, and test it on the Dell XPS 13 9310.
> drivers/platform/x86/intel/pmc/core.c | 17 +++++++++++++++--
> 1 file changed, 15 insertions(+), 2 deletions(-)
...
> +/*
> + * Every ltr_show map ends with CURRENT_PLATFORM and AGGREGATED_SYSTEM. Unlike
> + * the per-IP rows, these PMC registers do not hold an LTR message payload as
> + * defined by PCIe; on Tiger Lake, for example, AGGREGATED_SYSTEM has the
> + * reserved bits 14:13 set and reads 0x7fffdff. Do not decode them.
> + */
> +static bool pmc_core_ltr_is_summary(const struct pmc_bit_map *map,
> + unsigned int index)
> +{
> + return !map[index + 1].name || !map[index + 2].name;
How do we know that the index is not out-of-boundary?
> +}
...
> for (index = 0; map[index].name; index++) {
> bool ltr_ign_data;
> + bool summary = pmc_core_ltr_is_summary(map, index);
Same question and keep this to be in reversed xmas tree order.
--
With Best Regards,
Andy Shevchenko