[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK8P3a1UvbVh3UKE9N-ch32RZHH5bhfRuz8LN9A3gQew6V3ONA@mail.gmail.com>
Date: Tue, 16 Mar 2021 17:34:16 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Nick Desaulniers <ndesaulniers@...gle.com>
Cc: Mike Rapoport <rppt@...ux.ibm.com>,
kernel test robot <lkp@...el.com>, kbuild-all@...ts.01.org,
clang-built-linux <clang-built-linux@...glegroups.com>,
LKML <linux-kernel@...r.kernel.org>,
David Hildenbrand <david@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux Memory Management List <linux-mm@...ck.org>
Subject: Re: WARNING: modpost: vmlinux.o(.text+0x74fea4): Section mismatch in
reference from the function memblock_find_in_range_node() to the function .init.text:memblock_bottom_up()
On Tue, Mar 16, 2021 at 5:23 PM 'Nick Desaulniers' via Clang Built
Linux <clang-built-linux@...glegroups.com> wrote:
> On Tue, Mar 16, 2021 at 12:04 AM Mike Rapoport <rppt@...ux.ibm.com> wrote:
> >
> > I don't have clang-13 setup handy so I could not check, but I think this
> > should be the fix:
>
> Thanks for taking another look:
> https://lore.kernel.org/lkml/20210225205908.GM1447004@kernel.org/
> Do we want to switch the above to the below?
The patch above is now in mainline and caused the reported problem.
> > diff --git a/include/linux/memblock.h b/include/linux/memblock.h
> > index d13e3cd938b4..5984fff3f175 100644
> > --- a/include/linux/memblock.h
> > +++ b/include/linux/memblock.h
> > @@ -460,7 +460,7 @@ static inline void memblock_free_late(phys_addr_t base, phys_addr_t size)
> > /*
> > * Set the allocation direction to bottom-up or top-down.
> > */
> > -static inline __init void memblock_set_bottom_up(bool enable)
> > +static inline __init_memblock void memblock_set_bottom_up(bool enable)
> > {
> > memblock.bottom_up = enable;
> > }
> > @@ -470,7 +470,7 @@ static inline __init void memblock_set_bottom_up(bool enable)
> > * if this is true, that said, memblock will allocate memory
> > * in bottom-up direction.
> > */
> > -static inline __init bool memblock_bottom_up(void)
> > +static inline __init_memblock bool memblock_bottom_up(void)
> > {
> > return memblock.bottom_up;
> > }
I don't see the warning on my machine for some reason, but the patch
does seem correct.
Reviewed-by: Arnd Bergmann <arnd@...db.de>
Arnd
Powered by blists - more mailing lists