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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 2 Apr 2020 20:38:15 +0530
From:   "Alim Akhtar" <alim.akhtar@...sung.com>
To:     "'Avri Altman'" <Avri.Altman@....com>, <robh+dt@...nel.org>,
        <devicetree@...r.kernel.org>, <linux-scsi@...r.kernel.org>
Cc:     <krzk@...nel.org>, <martin.petersen@...cle.com>,
        <kwmad.kim@...sung.com>, <stanley.chu@...iatek.com>,
        <cang@...eaurora.org>, <linux-samsung-soc@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v4 4/5] scsi: ufs-exynos: add UFS host support for
 Exynos SoCs

Hi Avri

> -----Original Message-----
> From: Avri Altman <Avri.Altman@....com>
> Sent: 28 March 2020 16:58
> To: Alim Akhtar <alim.akhtar@...sung.com>; robh+dt@...nel.org;
> devicetree@...r.kernel.org; linux-scsi@...r.kernel.org
> Cc: krzk@...nel.org; martin.petersen@...cle.com; kwmad.kim@...sung.com;
> stanley.chu@...iatek.com; cang@...eaurora.org; linux-samsung-
> soc@...r.kernel.org; linux-arm-kernel@...ts.infradead.org; linux-
> kernel@...r.kernel.org
> Subject: RE: [PATCH v4 4/5] scsi: ufs-exynos: add UFS host support for Exynos
> SoCs
> 
> Hi,
> 
> > +
> > +long exynos_ufs_calc_time_cntr(struct exynos_ufs *ufs, long period) {
> > +       const int precise = 10;
> > +       long pclk_rate = ufs->pclk_rate;
> > +       long clk_period, fraction;
> > +
> > +       clk_period = UNIPRO_PCLK_PERIOD(ufs);
> > +       fraction = ((NSEC_PER_SEC % pclk_rate) * precise) / pclk_rate;
> > +
> > +       return (period * precise) / ((clk_period * precise) +
> > +fraction); }
> This helper essentially calculates a factor f, and returns period x f.
> Why not do that regardless of period?
> 
The period can be different for different timing attributes, so this helper function takes the period and returns the timer counter value based on the pclk_rate. 

> > +extern long exynos_ufs_calc_time_cntr(struct exynos_ufs *, long);
> Why this factor needed to be exported?
Yes, not needed, will correct this in next version, which I am planning to post soon.
Thanks for your time and review, let me know if you have more inputs.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ