Hello ,
I am developing a feature in a X86-64 machine running kernel 3.5.5. I am
exporting this symbol to test FPU and kernel compiles fine if I call this
symbol from my module it works great. But when I used this symbol from
scheduler particularly *enqueue_fair()* (few times per second)
in/kernel/sched/fair.c it behaves weirdly. During boot kernel hangs
abruptly after few hundreds correct prints in this function after 1st
print.

Am I missing any rule, because I looked it up on internet they says nothing
else than this way to use fpu. Any help is appreciated. I tried 10-20 boots
and each time it hangs.

*Code snippet for reference:*
  1 /*test FPU*/
  2 #include <asm/i387.h>
  3 #include <linux/time.h>
  4
  5
  6 void my_symbol(void){
  7     unsigned long i = get_seconds();
  8
  9     printk(KERN_DEBUG "i:%lu,",i);
 10     kernel_fpu_begin();
 11             float d = 3.123456*(i%3);
 12             i=(unsigned long)(d*1000000);
 13     kernel_fpu_end();
 14     printk(KERN_DEBUG "%lu\n",i);
 15 }
 16 EXPORT_SYMBOL_GPL(my_symbol);

thanks

Regards,
Digant Desai.
_______________________________________________
Kernelnewbies mailing list
[email protected]
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to