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:   Tue, 23 Apr 2019 11:06:36 +0800
From:   Daniel Drake <drake@...lessm.com>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        hpa@...or.com, x86@...nel.org,
        Linux Kernel <linux-kernel@...r.kernel.org>,
        Len Brown <len.brown@...el.com>,
        "Wysocki, Rafael J" <rafael.j.wysocki@...el.com>,
        Linux Upstreaming Team <linux@...lessm.com>
Subject: Re: [PATCH 2/2] x86/tsc: set LAPIC timer frequency to crystal clock frequency

On Mon, Apr 22, 2019 at 8:04 PM Ingo Molnar <mingo@...nel.org> wrote:
> Minor style nit: the parentheses are unnecessary, integer expressions
> like this are evaluated left to right and multiplication and division has
> the same precedence.

Fair point, although the same could be said for cpu_khz_from_msr().

> But it might also make sense to actually store crystal_mhz instead of
> crystal_khz, because both CPUID 15H and 16H provides MHz values.
>
> That way the above expression would simplify to:
>
>         lapic_timer_frequency = crystal_mhz / HZ;

Wouldn't it be
        lapic_timer_frequency = crystal_mhz * 1000000 / HZ;
?

Thanks
Daniel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ