[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdVDgLpK8r2D4rwmCXEYwdgf7=Tqspq=VgPHmuqcrY5bVA@mail.gmail.com>
Date: Wed, 12 Jul 2017 09:37:45 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Arnd Bergmann <arnd@...db.de>
Cc: Dan Williams <dan.j.williams@...el.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux-MM <linux-mm@...ck.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm: Mark create_huge_pmd() inline to prevent build failure
Hi Arnd,
On Wed, Jul 12, 2017 at 9:22 AM, Arnd Bergmann <arnd@...db.de> wrote:
> On Wed, Jul 12, 2017 at 8:57 AM, Geert Uytterhoeven
> <geert@...ux-m68k.org> wrote:
>> With gcc 4.1.2:
>>
>> mm/memory.o: In function `create_huge_pmd':
>> memory.c:(.text+0x93e): undefined reference to `do_huge_pmd_anonymous_page'
>>
>> Converting transparent_hugepage_enabled() from a macro to a static
>> inline function reduced the ability of the compiler to remove unused
>> code.
>>
>> Fix this by marking create_huge_pmd() inline.
>>
>> Fixes: 16981d763501c0e0 ("mm: improve readability of transparent_hugepage_enabled()")
>> Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
>
> Acked-by: Arnd Bergmann <arnd@...db.de>
Thanks!
>> ---
>> Interestingly, create_huge_pmd() is emitted in the assembler output, but
>> never called.
>
> I've never seen this before either. I know that early gcc-4 compilers
> would do this
> when a function is referenced from an unused function pointer, but not with
> a compile-time constant evaluation. I guess that transparent_hugepage_enabled
> is just slightly more complex than it gcc-4.1 can handle here.
You did mention seeing it with mips-gcc-4.1 in the thread "[RFC] minimum gcc
version for kernel: raise to gcc-4.3 or 4.6?", but didn't provide any further
details. Finally I started seeing it myself for m68k ;-)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists