Re: [PATCH v2 2/7] platform/x86/intel/pmc: Enable PkgC LTR blocking counter

Ilpo Järvinen
2026-04-10T14:28:52Z

On Wed, 8 Apr 2026, Xi Pardee wrote:

> Enable the Package C-state LTR blocking counter in the PMT telemetry
> region. This counter records how many times any Package C-state entry
> is blocked for the specified reasons.
>
> Signed-off-by: Xi Pardee <xi.pardee@linux.intel.com>
> ---
> drivers/platform/x86/intel/pmc/core.c | 74 +++++++++++++++++++++++----
> drivers/platform/x86/intel/pmc/core.h | 15 +++++-
> 2 files changed, 77 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/platform/x86/intel/pmc/core.c b/drivers/platform/x86/intel/pmc/core.c
> index c8a92d6235203..5c519942ec58c 100644
> --- a/drivers/platform/x86/intel/pmc/core.c
> +++ b/drivers/platform/x86/intel/pmc/core.c
> @@ -1071,6 +1071,29 @@ static int pmc_core_die_c6_us_show(struct seq_file *s, void *unused)
> }
> DEFINE_SHOW_ATTRIBUTE(pmc_core_die_c6_us);
>
> +static int pmc_core_pkgc_ltr_blocker_show(struct seq_file *s, void *unused)
> +{
> + struct pmc_dev *pmcdev = s->private;
> + const char **pkgc_ltr_blocker_counters;
> + unsigned int i;
> + u32 counter;
> + int ret;
> +
> + pkgc_ltr_blocker_counters = pmcdev->pkgc_ltr_blocker_counters;
> + for (i = 0; pkgc_ltr_blocker_counters[i]; i++) {
> + ret = pmt_telem_read32(pmcdev->pc_ep,
> + pmcdev->pkgc_ltr_blocker_offset + i,
> + &counter, 1);
> +
> + if (ret)

Don't leve empty lines between call and its error handling.

> + return ret;

Maybe put the empty line here instead?

> + seq_printf(s, "%-30s %-30u\n", pkgc_ltr_blocker_counters[i], counter);
> + }
> +
> + return 0;
> +}
> +DEFINE_SHOW_ATTRIBUTE(pmc_core_pkgc_ltr_blocker);

--
i.