Re: about 64-bits division in kernel

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

 



Hi miloody,

...snip...
> I found div64.h is located at includ/asm-generic/div64.h instead of
> include/linux/
> BTW, I still cannot figure out why kernel doesn't adopt the gcc's solution.
> libgcc.a will be compiled by different platform, arm, mips, etc.
> And that should be safe for kernel to adopt it.

I believe that the gcc approach is only safe from user-space, and may
cause traps from within kernel space.

>From the reading I've done, gcc expects a certain environment, and the
kernel provides a different environment.

I believe that the primary reason has to do with the fact that libgcc
also provides floating point support, which doesn't work in the
kernel, so they don't allow any of libgcc to be used. I believe that
there are people working on getting support for the integer stuff, but
I'm not sure what the status of this is.

-- 
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[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