From: kernel test robot <lkp@intel.com>
To: Luiz Capitulino <luizcap@redhat.com>
Cc: oe-kbuild-all@lists.linux.dev,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: [linux-next:master 5933/6583] include/asm-generic/memory_model.h:47:21: error: implicit declaration of function 'page_to_section'; did you mean 'present_section'?
Date: Wed, 26 Feb 2025 18:18:48 +0800 [thread overview]
Message-ID: <202502261825.F56aq7iS-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 8433c776e1eb1371f5cd40b5fd3a61f9c7b7f3ad
commit: a2d6e9c1a867bb9f13943cb8483e2ab85b630bcd [5933/6583] mm: page_ext: add an iteration API for page extensions
config: i386-buildonly-randconfig-001-20250226 (https://download.01.org/0day-ci/archive/20250226/202502261825.F56aq7iS-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250226/202502261825.F56aq7iS-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502261825.F56aq7iS-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from arch/x86/include/asm/page.h:89,
from arch/x86/include/asm/thread_info.h:12,
from include/linux/thread_info.h:60,
from include/linux/spinlock.h:60,
from include/linux/swait.h:7,
from include/linux/completion.h:12,
from include/linux/crypto.h:15,
from arch/x86/kernel/asm-offsets.c:9:
include/linux/page_ext.h: In function 'page_ext_iter_begin':
>> include/asm-generic/memory_model.h:47:21: error: implicit declaration of function 'page_to_section'; did you mean 'present_section'? [-Werror=implicit-function-declaration]
47 | int __sec = page_to_section(__pg); \
| ^~~~~~~~~~~~~~~
include/asm-generic/memory_model.h:64:21: note: in expansion of macro '__page_to_pfn'
64 | #define page_to_pfn __page_to_pfn
| ^~~~~~~~~~~~~
include/linux/page_ext.h:131:27: note: in expansion of macro 'page_to_pfn'
131 | iter->start_pfn = page_to_pfn(page);
| ^~~~~~~~~~~
In file included from include/linux/memcontrol.h:21,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from arch/x86/kernel/asm-offsets.c:14:
include/linux/mm.h: At top level:
>> include/linux/mm.h:1965:29: error: conflicting types for 'page_to_section'; have 'long unsigned int(const struct page *)'
1965 | static inline unsigned long page_to_section(const struct page *page)
| ^~~~~~~~~~~~~~~
include/asm-generic/memory_model.h:47:21: note: previous implicit declaration of 'page_to_section' with type 'int()'
47 | int __sec = page_to_section(__pg); \
| ^~~~~~~~~~~~~~~
include/asm-generic/memory_model.h:64:21: note: in expansion of macro '__page_to_pfn'
64 | #define page_to_pfn __page_to_pfn
| ^~~~~~~~~~~~~
include/linux/page_ext.h:131:27: note: in expansion of macro 'page_to_pfn'
131 | iter->start_pfn = page_to_pfn(page);
| ^~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:102: arch/x86/kernel/asm-offsets.s] Error 1 shuffle=1418848070
make[3]: Target 'prepare' not remade because of errors.
make[2]: *** [Makefile:1264: prepare0] Error 2 shuffle=1418848070
make[2]: Target 'prepare' not remade because of errors.
make[1]: *** [Makefile:251: __sub-make] Error 2 shuffle=1418848070
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:251: __sub-make] Error 2 shuffle=1418848070
make: Target 'prepare' not remade because of errors.
vim +47 include/asm-generic/memory_model.h
8f6aac419bd590 Christoph Lameter 2007-10-16 39
a117e66ed45ac0 KAMEZAWA Hiroyuki 2006-03-27 40 #elif defined(CONFIG_SPARSEMEM)
a117e66ed45ac0 KAMEZAWA Hiroyuki 2006-03-27 41 /*
1a49123b343461 Zhang Yanfei 2013-10-03 42 * Note: section's mem_map is encoded to reflect its start_pfn.
a117e66ed45ac0 KAMEZAWA Hiroyuki 2006-03-27 43 * section[i].section_mem_map == mem_map's address - start_pfn;
a117e66ed45ac0 KAMEZAWA Hiroyuki 2006-03-27 44 */
67de648211fa04 Andy Whitcroft 2006-06-23 45 #define __page_to_pfn(pg) \
aa462abe8aaf21 Ian Campbell 2011-08-17 46 ({ const struct page *__pg = (pg); \
a117e66ed45ac0 KAMEZAWA Hiroyuki 2006-03-27 @47 int __sec = page_to_section(__pg); \
f05b6284ee5d3b Randy Dunlap 2007-02-10 48 (unsigned long)(__pg - __section_mem_map_addr(__nr_to_section(__sec))); \
a117e66ed45ac0 KAMEZAWA Hiroyuki 2006-03-27 49 })
a117e66ed45ac0 KAMEZAWA Hiroyuki 2006-03-27 50
:::::: The code at line 47 was first introduced by commit
:::::: a117e66ed45ac0569c039ea60bd7a9a61e031858 [PATCH] unify pfn_to_page: generic functions
:::::: TO: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
:::::: CC: Linus Torvalds <torvalds@g5.osdl.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-02-26 10:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202502261825.F56aq7iS-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=luizcap@redhat.com \
--cc=oe-kbuild-all@lists.linux.dev \
/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