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, 16 Dec 2014 11:16:14 -0500
From:	"Lennart Sorensen" <lsorense@...lub.uwaterloo.ca>
To:	Lokesh Vutla <lokeshvutla@...com>
Cc:	linux-omap@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	"Kristo, Tero" <t-kristo@...com>, Nishanth Menon <nm@...com>,
	Sekhar Nori <nsekhar@...com>
Subject: Re: [PATCH 2/2] ARM: omap5/dra7xx: Fix counter frequency drift for
 AM572x errata i856.

On Tue, Dec 16, 2014 at 05:05:08PM +0530, Lokesh Vutla wrote:
> Is this applicable for OMAP5 also?
> If not can you drop omap5 from $subject?

DRA7xx = OMAP57xx, which to me is an omap5.  Isn't it?

And I haven't been able to get a manual for the omap54xx to confirm it,
although it seems it does not apply to the omap54xx from what I have
been able to gather indirectly.

arch_timer_freq = (rate / den) * num;

If I do this with the workaround I get:

20000000 / 75 * 244 = 6147525

where as

20000000 * 244 / 75 = 6147540

best value would be 6147541 with proper rounding.

In the normal case the worst case is:

26000000 * 384 = 9984000000

That is too big for 32 bits.

Now what could be done is prescale by 4 to make the worst case still
fit in 32 bits while doing the multiplication before the division,
so like this:

arch_timer_freq = ((rate / 4) * num / den ) * 4;

That gives the same result in all cases including the errata case for
the dra7xx at 20MHz and 27MHz.  It is off by 3 in the 19.2MHz case though
which isn't so nice.

Would that be more acceptable?  I think having the arch_timer_freq
calculated for the errata case seperately from the normal case is
cleaner looking compared to that mess and gives a better result for the
19.2MHz case.

-- 
Len Sorensen
--
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