Re: Linking error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/4/07, Rafał Bilski <rafalbilski@xxxxxxxxxx> wrote:> Hi!>> I'm trying to make Longhaul compatible with NO_HZ. Problem is> that transition takes much more time. I was trying to check if> my code really works but when I'm:>         (int)((timespec_to_ns(&tv_out) - timespec_to_ns(&tv_in)) / 1000)> Or:>         tv_delta = timespec_sub(tv_out, tv_in);>         delta_us = timespec_to_ns(&tv_delta) / 1000;>         printk(KERN_INFO PFX "Delay %dus\n", (int)(delta_us));> I get this error:>   LD      .tmp_vmlinux1> arch/i386/kernel/built-in.o: In function `longhaul_setstate':> longhaul.c:(.text+0x8591): undefined reference to `__divdi3'> make: *** [.tmp_vmlinux1] Błąd 1> What have I missed? Is it illegal to convert s64 to int in this way?
It's disgusting :)
No, the problem is that you can't do 64-bit division without helperfunctions, in the kernel. You want do_div(), iirc, if you really wantto do the division.
Thanks,Nish˙ôčş{.nÇ+?ˇ?Ž?­?+%?Ë˙ąéÝjwŚj)p?Ř˙ş{.nÇ+?ˇ¤zšŢ?w°n'ŹţÚqŞí?Ďç?ůb?ě˙˘¸?ćŹzˇ?vŘ^śm§˙˙?ęçzYŢÁ¸?łú+?ń@


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux