From: "David Hildenbrand (Red Hat)" <davidhildenbrandkernel@gmail.com>
To: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
Zhang Chujun <zhangchujun@cmss.chinamobile.com>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
thomas.weissschuh@linutronix.de
Subject: Re: [PATCH] selftest/vm_util: remove unused variables
Date: Thu, 6 Nov 2025 11:04:20 +0100 [thread overview]
Message-ID: <2b4a69db-7845-4289-b962-1144b708f53b@gmail.com> (raw)
In-Reply-To: <9c08ffec-81fc-47dd-8830-c81b28f4e9e1@lucifer.local>
On 05.11.25 23:16, Lorenzo Stoakes wrote:
> Andrew - can we drop this from mm-new please? It's broken the build.
>
> I get a splurge of linker errors building the mm selftests otherwise:
>
> /usr/bin/ld: /tmp/ccA0DyGC.o: in function `__pagemap_scan_get_categories':
> vm_util.c:(.text+0x1e9): undefined reference to `__page_size'
> /usr/bin/ld: vm_util.c:(.text+0x2bd): undefined reference to `__page_size'
> /usr/bin/ld: /tmp/ccA0DyGC.o: in function `allocate_transhuge':
> vm_util.c:(.text+0xb90): undefined reference to `__page_shift'
> /usr/bin/ld: vm_util.c:(.text+0xbfe): undefined reference to `__page_shift'
> /usr/bin/ld: vm_util.c:(.text+0xc52): undefined reference to `__page_size'
> /usr/bin/ld: vm_util.c:(.text+0xc67): undefined reference to `__page_shift'
> /usr/bin/ld: vm_util.c:(.text+0xc72): undefined reference to `__page_size'
> /usr/bin/ld: vm_util.c:(.text+0xc87): undefined reference to `__page_shift'
> /usr/bin/ld: vm_util.c:(.text+0xc9c): undefined reference to `__page_size'
> /usr/bin/ld: vm_util.c:(.text+0xcc4): undefined reference to `__page_size'
>
> etc.
>
> The idea that nobody uses these variables is simply false, see vm_util.h in same
> directory:
>
> extern unsigned int __page_size;
> extern unsigned int __page_shift;
>
> static inline unsigned int psize(void)
> {
> if (!__page_size)
> __page_size = sysconf(_SC_PAGESIZE);
> return __page_size;
> }
>
> static inline unsigned int pshift(void)
> {
> if (!__page_shift)
> __page_shift = (ffsl(psize()) - 1);
> return __page_shift;
> }
>
> So this patch just seems to be completely broken?
Grml, I only skipped over the file and didn't think of the header. Nasty.
Note to myself to not trust anybody that they are even performing a
basic compile test. Hard to believe that's not the case when wanting to
contribute to the Linux kernel ...
prev parent reply other threads:[~2025-11-06 10:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-04 6:28 Zhang Chujun
2025-11-05 22:16 ` Lorenzo Stoakes
2025-11-06 10:04 ` David Hildenbrand (Red Hat) [this message]
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=2b4a69db-7845-4289-b962-1144b708f53b@gmail.com \
--to=davidhildenbrandkernel@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=thomas.weissschuh@linutronix.de \
--cc=zhangchujun@cmss.chinamobile.com \
/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