Well it looks like I need to update the post!

If my memory does not fail that link contained the definition of the macro and usage examples.

Anyway, in order to solve the problem you may use div_u64(…) or do_div(…) functions to divide 64-bit values.

If you follow this post http://stackoverflow.com/questions/1063585/udivdi3-undefined-howto-find-code,

you will find an example on how to use the do_div macro.

So, imagine that you want to divide two u64 values or one u64 value by a 32-bit value. To do that, you would use the macro in the following way:

(demonstrated for two u64 values, for the second case you can use the function in the same way)

u64 val_a = 10;

u64 val_b = 5;

```
```// this variable stores the remainder of the division operation

unsigned long int mod = 0;

mod = do_div(val_a, val_b);

After performing the call, val_a contains the result of the division operation ( val_a = 2) and mod = 0.

The div_u64(…) follows the same behavioral pattern.

I hope that this clarifies your doubts.

]]>on the post on the class of kernel linux Sched_deadline and the problem of division in the 32-bit systems, in this:

Indeed it was an architecture issue. After modifying my code, by using the do_div function to perform a 64 bit division in a 32-bit architecture, the code compiled like a charm.

Regarding this type of operations, the following pointer is also helpful: http://www.captain.at/howto-udivdi3-umoddi3.php

The site is no longer working, as you have solved the problem exactly?

I am very interested in the solution, thanks!