init/main.c:540:2: error: implicit declaration of function 'pgd_cache_init'
Subsystems (2)
Quoted 48 lines · kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/mm head: ef5f22b4e5caf7e5ac12b28d4c9566c95d709ba5 commit: ef5f22b4e5caf7e5ac12b28d4c9566c95d709ba5 [36/36] x86/mm: Initialize PGD cache during mm initialization config: openrisc-or1ksim_defconfig (attached as .config) compiler: or1k-linux-gcc (GCC) 6.0.0 20160327 (experimental)reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
git checkoutef5f22b4e5caf7e5ac12b28d4c9566c95d709ba5
# save the attached .config to linux build tree
make.cross ARCH=openriscIf you fix the issue, kindly add following tag
Reported-by kbuild test robot <[email protected]>All errors (new ones prefixed by >>):
init/main.c: In function 'mm_init':Quoted 1 line
Quoted 1 line
init/main.c:540:2: error: implicit declaration of function 'pgd_cache_init' [-Werror=implicit-function-declaration]pgd_cache_init(); ^~~~~~~~~~~~~~cc1: some warnings being treated as errors
vim +/pgd_cache_init +540
init/main.c519
520 /*
521 * Set up kernel memory allocators
522 */
523 static void__initmm_init(void)
524 {
525 /*
526 *page_extrequires contiguous pages,
527 * bigger thanMAX_ORDERunless SPARSEMEM.
528 */
529page_ext_init_flatmem();
530mem_init();
531kmem_cache_init();
532pgtable_init();
533debug_objects_mem_init();
534vmalloc_init();
535ioremap_huge_init();
536 /* Should be run before the first non-init thread is created */
537init_espfix_bsp();
538 /* Should be run after espfix64 is set up. */
539pti_init();
Quoted 8 lines
Quoted 1 line
540
pgd_cache_init();541 }
542---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
<.config.gz>
Sorry for that - I got confused and forgot this is not arch-specific code. I don’t see the latest commit in the x86/mm tree, so I assume you can squash the following on top?
-- >8 --
Subject: [PATCH] x86/mm: Fix breakage due to missing pgd_cache_init()
Set pgd_cache_init() as a weak symbol.
--- arch/x86/include/asm/pgtable.h | 1 - include/asm-generic/pgtable.h | 2 ++ init/main.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-)
arch/x86/include/asm/pgtable.h +0 -1
@@ -1027,7 +1027,6 @@ static inline int pgd_none(pgd_t pgd)extern int direct_gbpages;void init_mem_mapping (void ); -void pgd_cache_init (void );void early_alloc_pgt_buf (void );extern void memblock_find_dma_reserve (void );
include/asm-generic/pgtable.h +2 -0
@@ -1126,6 +1126,8 @@ int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn,static inline void init_espfix_bsp (void ) { }#endif +extern void __init pgd_cache_init (void ); +#ifndef __HAVE_ARCH_PFN_MODIFY_ALLOWEDstatic inline bool pfn_modify_allowed (unsigned long pfn,pgprot_t prot) {
init/main.c +2 -0
@@ -506,6 +506,8 @@ void __init __weak mem_encrypt_init(void) { }void __init __weak poking_init (void ) { } +void __init __weak pgd_cache_init (void ) { } +bool initcall_debug;core_param (initcall_debug, initcall_debug, bool,0644 );
Signature · 1 line
2.17.1