lkml.org 
[lkml]   [2014]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [GIT PULL] ext4 changes for 3.15
On Tue, 24 Jun 2014, Thavatchai Makphaibulchoke wrote:

> > This change causes breakage:
> >
> > fs/built-in.o: In function `__mb_cache_entry_release':
> > mbcache.c:(.text+0x56b3c): undefined reference to `log2'
> > mbcache.c:(.text+0x56b3c): relocation truncated to fit: R_MIPS_26 against `log2'
> > mbcache.c:(.text+0x56b74): undefined reference to `__fixunsdfsi'
> > mbcache.c:(.text+0x56b74): relocation truncated to fit: R_MIPS_26 against `__fixunsdfsi'
> > mbcache.c:(.text+0x56be4): undefined reference to `log2'
> > mbcache.c:(.text+0x56be4): relocation truncated to fit: R_MIPS_26 against `log2'
> > mbcache.c:(.text+0x56bf0): undefined reference to `__fixunsdfsi'
> > mbcache.c:(.text+0x56bf0): relocation truncated to fit: R_MIPS_26 against `__fixunsdfsi'
> >
> > and so on, and so on. It uses __builtin_log2() that is a floating-point
> > function, its corresponding <math.h> prototype is:
> >
> > -- Function: double log2 (double X)
> >
> > (GCC builtins are of course implicitly prototyped). Please note that
> > floating-point calculations are not allowed in the kernel and relying on
> > the compiler to optimise them away is risky to say the least.
> >
> > Can you please rewrite the fragment using __builtin_log2() so as to avoid
> > the floating-point calculation, using ffs() or suchlike perhaps?
> >
> > Maciej
> >
>
> Sorry and thanks for notifying me about the problem.
>
> I've submitted the fix, using ilog2, and could be found at,
>
> https://lkml.org/lkml/2014/5/30/462
>
> Please let me know if you have any comment.

Thanks, that's even better, and the kernel builds and boots. I saw no
trace of your proposal going anywhere so I gave it my `Reviewed-by' tag in
case that helps.

Maciej


\
 
 \ /
  Last update: 2014-06-25 02:01    [W:0.337 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site