[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5b3b7eb7-78c-c9ec-2acd-f54ff116188@linux.intel.com>
Date: Thu, 23 Nov 2023 13:38:57 +0200 (EET)
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: "David E. Box" <david.e.box@...ux.intel.com>
cc: LKML <linux-kernel@...r.kernel.org>,
platform-driver-x86@...r.kernel.org, rajvi.jingar@...ux.intel.com
Subject: Re: [PATCH V5 19/20] platform/x86/intel/pmc: Add debug attribute
for Die C6 counter
On Wed, 22 Nov 2023, David E. Box wrote:
> Add a "die_c6_us_show" debugfs attribute. Reads the counter value using
> Intel Platform Monitoring Technology (PMT) driver API. This counter is
> useful for determining the idle residency of CPUs in the compute tile.
> Also adds a missing forward declaration for punit_ep which was declared in
> an earlier upstream commit but only used for the first time in this one.
>
> Signed-off-by: David E. Box <david.e.box@...ux.intel.com>
> ---
> V5 - Change comment for crystal error and return value
>
> V4 - no change
>
> V3 - Split previous PATCH V2 13. Separates implementation (this patch) from
> platform specific use (next patch)
>
> V2 - Remove use of __func__
> - Use HZ_PER_MHZ
> - Fix missing newlines in printks
>
> drivers/platform/x86/intel/pmc/core.c | 55 +++++++++++++++++++++++++++
> drivers/platform/x86/intel/pmc/core.h | 4 ++
> 2 files changed, 59 insertions(+)
>
> diff --git a/drivers/platform/x86/intel/pmc/core.c b/drivers/platform/x86/intel/pmc/core.c
> index 4a38d52558fd..fb2c84fba0ae 100644
> --- a/drivers/platform/x86/intel/pmc/core.c
> +++ b/drivers/platform/x86/intel/pmc/core.c
> +static int pmc_core_die_c6_us_show(struct seq_file *s, void *unused)
> +{
> + struct pmc_dev *pmcdev = s->private;
> + u64 die_c6_res, count;
> + int ret;
> +
> + if (!pmcdev->crystal_freq) {
> + dev_warn_once(&pmcdev->pdev->dev, "Crystal frequency unavailable\n");
> + return -ENXIO;
> + }
I actually started to wonder whether it would be better to just not show
the file in this case (using .is_visible())? (I'm sorry I forgot to send
the note about that earlier.)
--
i.
Powered by blists - more mailing lists