linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* page_alloc.c:(.init.text+0xa7c): undefined reference to `vmalloc_huge'
@ 2022-04-25  8:10 Naresh Kamboju
  2022-04-25  8:28 ` Linus Torvalds
  0 siblings, 1 reply; 3+ messages in thread
From: Naresh Kamboju @ 2022-04-25  8:10 UTC (permalink / raw)
  To: linux-mm, open list
  Cc: Song Liu, Muchun Song, Christoph Hellwig, Vlastimil Babka,
	David Hildenbrand, Rik van Riel, Andrew Morton, Linus Torvalds,
	Greg Kroah-Hartman

Linux mainline arm architecture tinyconfig and allnoconfig builds failed.
These builds have config mmu not set.

# CONFIG_MMU is not set


Regressions found on arm:

   - arm-clang-14-tinyconfig
   - arm-clang-nightly-tinyconfig
   - arm-gcc-11-tinyconfig
   - arm-clang-13-tinyconfig
   - arm-gcc-11-allnoconfig
   - arm-clang-14-allnoconfig
   - arm-clang-nightly-allnoconfig
   - arm-gcc-8-allnoconfig
   - arm-clang-11-allnoconfig
   - arm-clang-11-tinyconfig
   - arm-gcc-9-allnoconfig
   - arm-gcc-9-tinyconfig
   - arm-gcc-10-allnoconfig
   - arm-gcc-8-tinyconfig
   - arm-gcc-10-tinyconfig
   - arm-clang-12-allnoconfig
   - arm-clang-12-tinyconfig
   - arm-clang-13-allnoconfig


Build error:
------------
arm-linux-gnueabihf-ld: mm/page_alloc.o: in function `alloc_large_system_hash':
page_alloc.c:(.init.text+0xa7c): undefined reference to `vmalloc_huge'
make[1]: *** [Makefile:1158: vmlinux] Error 1


# To install tuxmake on your system globally:
# sudo pip3 install -U tuxmake

tuxmake --runtime podman --target-arch arm --toolchain gcc-11
--kconfig tinyconfig


Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>


--
Linaro LKFT
https://lkft.linaro.org

[1] https://builds.tuxbuild.com/28GNGapkjXsbIbRSnHoGILqmaFp/


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: page_alloc.c:(.init.text+0xa7c): undefined reference to `vmalloc_huge'
  2022-04-25  8:10 page_alloc.c:(.init.text+0xa7c): undefined reference to `vmalloc_huge' Naresh Kamboju
@ 2022-04-25  8:28 ` Linus Torvalds
  2022-04-25  8:44   ` Naresh Kamboju
  0 siblings, 1 reply; 3+ messages in thread
From: Linus Torvalds @ 2022-04-25  8:28 UTC (permalink / raw)
  To: Naresh Kamboju
  Cc: linux-mm, open list, Song Liu, Muchun Song, Christoph Hellwig,
	Vlastimil Babka, David Hildenbrand, Rik van Riel, Andrew Morton,
	Greg Kroah-Hartman

[-- Attachment #1: Type: text/plain, Size: 408 bytes --]

On Mon, Apr 25, 2022 at 1:10 AM Naresh Kamboju
<naresh.kamboju@linaro.org> wrote:
>
> # CONFIG_MMU is not set

I just sent the stupid and straightforward patch in

  https://lore.kernel.org/all/CAHk-=wi5DYKbFE4j-jC2HGsKVuf1RpZbEiYt4tSXuxGKiN9oJg@mail.gmail.com/

but then I thought maybe the alias patch is as simple as the attached.

So does either (or both) of these patches work?

                  Linus

[-- Attachment #2: patch.diff --]
[-- Type: text/x-patch, Size: 407 bytes --]

 mm/nommu.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mm/nommu.c b/mm/nommu.c
index 55a9e48a7a02..9d7afc2d959e 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -226,6 +226,8 @@ void *vmalloc(unsigned long size)
 }
 EXPORT_SYMBOL(vmalloc);
 
+void *vmalloc_huge(unsigned long size, gfp_t gfp_mask) __weak __alias(__vmalloc);
+
 /*
  *	vzalloc - allocate virtually contiguous memory with zero fill
  *

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: page_alloc.c:(.init.text+0xa7c): undefined reference to `vmalloc_huge'
  2022-04-25  8:28 ` Linus Torvalds
@ 2022-04-25  8:44   ` Naresh Kamboju
  0 siblings, 0 replies; 3+ messages in thread
From: Naresh Kamboju @ 2022-04-25  8:44 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-mm, open list, Song Liu, Muchun Song, Christoph Hellwig,
	Vlastimil Babka, David Hildenbrand, Rik van Riel, Andrew Morton,
	Greg Kroah-Hartman

Hi Linus,

On Mon, 25 Apr 2022 at 13:58, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> On Mon, Apr 25, 2022 at 1:10 AM Naresh Kamboju
> <naresh.kamboju@linaro.org> wrote:
> >
> > # CONFIG_MMU is not set
>
> I just sent the stupid and straightforward patch in
>
>   https://lore.kernel.org/all/CAHk-=wi5DYKbFE4j-jC2HGsKVuf1RpZbEiYt4tSXuxGKiN9oJg@mail.gmail.com/
>
> but then I thought maybe the alias patch is as simple as the attached.
>
> So does either (or both) of these patches work?

Yes.
I have tested these two patches and both the way the build passes.

Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>

- Naresh
>
>                   Linus


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-25  8:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-25  8:10 page_alloc.c:(.init.text+0xa7c): undefined reference to `vmalloc_huge' Naresh Kamboju
2022-04-25  8:28 ` Linus Torvalds
2022-04-25  8:44   ` Naresh Kamboju

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).