Skip to contentSkip to conversation

r4392 - /trunk/include/asm-x86/arith_64.h

Xenomai-core Jan Kiszka 2 participants 2 messages Nov 16, 2008 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Jan Kiszka

author
#1 lore raw
Quoted 10 lines · Gilles Chanteperdrix

Author: gch
Date: Sun Nov 16 03:30:40 2008
New Revision: 4392

URL: http://svn.gna.org/viewcvs/xenomai?rev=4392&view=rev
Log:
Implement nodiv_ullimd on x86_64

Modified:

    trunk/include/asm-x86/arith_64.h

Nice. This solves the user-triggerable kernel oops due to idiv overflows in the original version (rt_task_sleep_until(1LL<<63);). I happened to receive such a bug report on Friday and was about to consider alternative solutions beyond limit checks.

But how accurate is this conversion? I mean how many bits can we lose when doing xnarch_ns_to_tsc(xnarch_tsc_to_ns(x))?

Final question: Already prepared a 32-bit version? :)

Jan

#2 lore raw
Quoted 12 lines · Jan Kiszka
Quoted 10 lines · Gilles Chanteperdrix

Author: gch
Date: Sun Nov 16 03:30:40 2008
New Revision: 4392

URL: http://svn.gna.org/viewcvs/xenomai?rev=4392&view=rev
Log:
Implement nodiv_ullimd on x86_64

Modified:

    trunk/include/asm-x86/arith_64.h
Quoted 7 lines

Nice. This solves the user-triggerable kernel oops due to idiv overflows in the original version (rt_task_sleep_until(1LL<<63);). I happened to receive such a bug report on Friday and was about to consider alternative solutions beyond limit checks.

But how accurate is this conversion? I mean how many bits can we lose when doing xnarch_ns_to_tsc(xnarch_tsc_to_ns(x))?

Thanks to a little addition, nodiv_ullimd has the same precision as ullimd.

Quoted 2 lines

Final question: Already prepared a 32-bit version? :)

Yes, the generic vercion should work, provided we implement __rthal_add96and64
which does an addl and two adcl

Signature · 1 line
					    Gilles.