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] [day] [month] [year] [list]
Date:	Fri, 07 May 2010 11:49:38 -0700
From:	john stultz <johnstul@...ibm.com>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Add clocksource_register_hz/khz interface

On Fri, 2010-05-07 at 17:44 +0200, Thomas Gleixner wrote:
> On Wed, 5 May 2010, John Stultz wrote:
> 
> > Hey Thomas,
> > 	I updated the patch docs and made the calls EXPORT_SYMBOL_GPL.
> > However the need for both khz and hz is due to high freq clocksources
> > like the TSC who's cycles/sec are close to the upper bound of a u32.
> 
> Come on. It's not that hard :)

Oh... So your fine with having two interfaces, but just want the code
redundancy removed between the two interfaces? 

Ok, I misunderstood. That's no problem.

thanks
-john


> int clocksource_register_freq(struct clocksource *cs, u32 scale, u32 freq)
> {
> 	clocks_calc_mult_shift(&cs->mult, &cs->shift, freq,
> 			       NSEC_PER_SEC / scale, MAX_UPDATE_LENGTH * scale);
> 
> 	....
> }
> 
> static inline int clocksource_register_hz(struct clocksource *cs, u32 freq)
> {
> 	clocksource_regiser_freq(cs, 1, freq);
> }
> 
> static inline int clocksource_register_khz(struct clocksource *cs, u32 freq)
> {
> 	clocksource_regiser_freq(cs, 1000, freq);
> }
> 
> Thanks,
> 
> 	tglx


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ