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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 23 Nov 2017 23:17:47 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Souvik Kumar Chakravarty <souvik.k.chakravarty@...el.com>
Cc:     Platform Driver <platform-driver-x86@...r.kernel.org>,
        "dvhart@...radead.org" <dvhart@...radead.org>,
        Andy Shevchenko <andy@...radead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Rajneesh Bhardwaj <rajneesh.bhardwaj@...el.com>
Subject: Re: [PATCH v1 1/4] platform/x86: intel_pmc_ipc: Add readq API for GCR

On Tue, Nov 21, 2017 at 4:36 PM, Souvik Kumar Chakravarty
<souvik.k.chakravarty@...el.com> wrote:
> Add intel_pmc_gcr_readq API for reading from 64-bit GCR registers.
> This API will be called from intel_telemetry. Rename intel_pmc_gcr_read
> to more appropriate intel_pmc_gcr_readl.

>  int intel_pmc_s0ix_counter_read(u64 *data);
> -int intel_pmc_gcr_read(u32 offset, u32 *data);
> +int intel_pmc_gcr_readl(u32 offset, u32 *data);
> +int intel_pmc_gcr_readq(u32 offset, u64 *data);
>  int intel_pmc_gcr_write(u32 offset, u32 data);
>  int intel_pmc_gcr_update(u32 offset, u32 mask, u32 val);

Ah, I didn't notice that we have a bunch of related functions.

>From above it looks like we better to leave read as is and introduce
_read64() instead of _readq(). This makes names more clear in case we
would need _update64 in the future.

Something like below at the end:

int intel_pmc_gcr_read(u32 offset, u32 *data);
int intel_pmc_gcr_write(u32 offset, u32 data);
int intel_pmc_gcr_update(u32 offset, u32 mask, u32 val);

+int intel_pmc_gcr_read64(u32 offset, u64 *data);

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists