lkml.org 
[lkml]   [2008]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] 2.6.26-mmotm tpm-correct-tpm-timeouts-to-jiffies-conversion-d820-fix.patch
From
Date
On Sat, 26 Jul 2008 20:27:33 BST, Marcin Obara said:

> Value in chip->vendor.duration[TPM_SHORT] is in jiffies not in milliseconds.
> (As I know it's not the same. Jiffy is in range 1-10 ms.)
> I know the result may be the same, but it is unclear.

I suppose I could have worded the comment block better - the intent was to
point out what the Broadcom chip returns, but by that point in the code
we're dealing with jiffies...

> Maybe... value should be compared (to 1000) before conversion?

Actually, that's probably a better idea, because my kernel is built with
HZ=1000 - usecs_to_jiffies will do something different than ==1 for HZ=100
or HZ=250 or other odd values.

> If after conversion, there should be something like this:
> if (chip->vendor.duration[TPM_SHORT] < (HZ/100)) /* less
> than 10ms ? */
> chip->vendor.duration[TPM_SHORT] = HZ;

That's another option as well, that does the right thing for various HZ values.

> What do you think?

Let me go cook up and test another iteration of the patch, will probably be
a few hours...

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2008-08-15 15:29    [W:0.047 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site