linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thavatchai Makphaibulchoke <thavatchai.makpahibulchoke@hp.com>
To: "Maciej W. Rozycki" <macro@linux-mips.org>,
	T Makphaibulchoke <tmac@hp.com>
Cc: Theodore Ts'o <tytso@mit.edu>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: Re: [GIT PULL] ext4 changes for 3.15
Date: Tue, 24 Jun 2014 16:39:00 -0600	[thread overview]
Message-ID: <53A9FE04.2000306@hp.com> (raw)
In-Reply-To: <alpine.LFD.2.11.1406242251230.23403@eddie.linux-mips.org>

On 06/24/2014 04:03 PM, Maciej W. Rozycki wrote:
> On Thu, 3 Apr 2014, Theodore Ts'o wrote:
> 
>>       fs/mbcache.c: doucple the locking of local from global data
> 
>  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,
Mak.




  reply	other threads:[~2014-06-24 22:39 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-03 19:15 [GIT PULL] ext4 changes for 3.15 Theodore Ts'o
2014-04-03 19:39 ` Linus Torvalds
2014-04-04  3:53   ` Theodore Ts'o
2014-04-04 13:44     ` Jan Kara
2014-04-04 17:16       ` Miklos Szeredi
2014-04-04 20:23         ` Theodore Ts'o
2014-04-08 10:47           ` Dave Chinner
2014-04-04 23:43         ` Theodore Ts'o
2014-04-07 13:15           ` Miklos Szeredi
2014-04-07 14:07             ` Theodore Ts'o
2014-04-07 20:25               ` Geert Uytterhoeven
2014-04-08 11:25                 ` Heiko Carstens
2014-04-08 16:25                   ` Linus Torvalds
2014-04-08 13:47                 ` Theodore Ts'o
2014-04-09 16:40                   ` Geert Uytterhoeven
2014-04-09 16:55                     ` H. Peter Anvin
2014-04-09 17:48                       ` Geert Uytterhoeven
2014-04-09 18:23                         ` Theodore Ts'o
2014-04-09 19:19                           ` H. Peter Anvin
2014-06-24 22:03 ` Maciej W. Rozycki
2014-06-24 22:39   ` Thavatchai Makphaibulchoke [this message]
2014-06-24 23:25     ` Maciej W. Rozycki
2014-06-25 17:08     ` Linus Torvalds
2014-06-25 22:37       ` Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53A9FE04.2000306@hp.com \
    --to=thavatchai.makpahibulchoke@hp.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=macro@linux-mips.org \
    --cc=tmac@hp.com \
    --cc=torvalds@linux-foundation.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).