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

Re: Linking error



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 helper
functions, in the kernel. You want do_div(), iirc, if you really want
to do the division.

Thanks,
Nish
˘éěšťŽ&Ţ~ş&śŹ?+-ąéÝjwŚj)p?Řn?Ë?ąĘâméŽwĽ?ě?ë-ĄçŽŘŹ?Yb?ěhŽĺyŤ­ć?ś?­?Űi˙ůŽwĽ?ě?ë(ŽĹ