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]
Message-ID: <SN6PR04MB4640B92BC9EA5CFEB74BE5EAFCCD0@SN6PR04MB4640.namprd04.prod.outlook.com>
Date:   Sat, 28 Mar 2020 11:28:26 +0000
From:   Avri Altman <Avri.Altman@....com>
To:     Alim Akhtar <alim.akhtar@...sung.com>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>
CC:     "krzk@...nel.org" <krzk@...nel.org>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>,
        "kwmad.kim@...sung.com" <kwmad.kim@...sung.com>,
        "stanley.chu@...iatek.com" <stanley.chu@...iatek.com>,
        "cang@...eaurora.org" <cang@...eaurora.org>,
        "linux-samsung-soc@...r.kernel.org" 
        <linux-samsung-soc@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.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?

> +extern long exynos_ufs_calc_time_cntr(struct exynos_ufs *, long);
Why this factor needed to be exported?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ