Skip to contentSkip to conversation

2.4.9-ac4: undefined reference pgtable_cache_init

DISCUSSION Frank Davis 3 participants 4 messages Aug 30, 2001

lore
Share & tools
lore
#0 lore raw

Hello,
During make bzImage, I received the following:

init/main.o: In function 'start_kernel' init/main.o(.text.init+0x842): undefined reference to 'pgtable_cache_init'
make: *** [vmlinux] Error 1

Regards,
Frank

#2 lore raw
Quoted 8 lines · Russell King
Quoted 5 lines · Frank Davis

Hello,
During make bzImage, I received the following:

init/main.o: In function 'start_kernel' init/main.o(.text.init+0x842): undefined reference to 'pgtable_cache_init'

Which architecture are you building for?

I've seen this as well on i386. It crops up when you are using HIGHMEM. In include/asm-i386/pgtable.h you declare pgtable_cache_init if HIGHMEM is on, or define it to the empty while loop if not. It really needs to be calling init_pae_pgd_cache instead though. Try this patch against 2.4.9-ac4. I don't know if changing the name of init_pae_pgd_cache was the Right Thing (tm) to do, but it worked for me. It's not getting called anywhere else anyways.

-Paul Larson

arch/i386/mm/init.c +1 -1
diff -urN linux-2.4.9-ac4/arch/i386/mm/init.c linux-new/arch/i386/mm/init.c
@@ -583,7 +583,7 @@
 
 struct kmem_cache_s *pae_pgd_cachep;
 
-void __init init_pae_pgd_cache(void)
+void __init pgtable_cache_init(void)
 {
 	/*
 	 * PAE pgds must be 16-byte aligned:
#3 lore raw
In reply to Frank Davis
Quoted 7 lines · Paul Larson

I've seen this as well on i386. It crops up when you are using HIGHMEM. In include/asm-i386/pgtable.h you declare pgtable_cache_init if HIGHMEM is on, or define it to the empty while loop if not. It really needs to be calling init_pae_pgd_cache instead though. Try this patch against 2.4.9-ac4. I don't know if changing the name of init_pae_pgd_cache was the Right Thing (tm) to do, but it worked for me. It's not getting called anywhere else anyways.

It got changed because we don't want to add multiple architecture specific functions to init/main.c, but rather have one generic call which any architecture can use for this type of thing.

--
Russell King ([email protected]) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html