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-next>] [day] [month] [year] [list]
Date:	Tue, 27 May 2008 16:54:12 +0200
From:	"Linus Walleij" <linus.ml.walleij@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: Shifts for clocksources and clockevents

I asked this on the ARM Linux mailing list a while back, but
it appears noone there really has a clue. (Or they didn't see
it.)

Can someone give me a rationale behind the values assigned to
the .shift field in clock_event_device and clocksource in the current
ARM platforms?

When I read the documentation in Documentation/hrtimers/highres.txt
it points me to the PDF
http://www.linuxsymposium.org/2006/linuxsymposium_procv1.pdf
from which I get the impression that shift shall be assigned so
that

(time in ns for 1 cycle)
--------------------------     = 1
           shift
         2

So for a timer running cycles at 1MHz shift would be something like
10 so that 1000/1024 ~= 1.

However the current assignments doesn't look like that at all. I get
the impression that .shift for clock_event_device seem to be set
to 32 at all times in order to blow 32bit counters up to 64 bit,
and clocksource .shift is set to something like 18, 20 or 24 for
unclear reasons.

Any hints here?

Yours,
Linus Walleij
--
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