lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 23 Nov 2023 15:39:35 +0200 (EET)
From:   Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To:     Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
cc:     "David E. Box" <david.e.box@...ux.intel.com>,
        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 Thu, 23 Nov 2023, Ilpo Järvinen wrote:

> 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.)

Ah, sorry, this was actually a debugfs file, not a sysfs one (and that's 
why I didn't end up noting it earlier).

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>

-- 
 i.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ