[opensuse-kernel] undefined reference to page_to_nid
Hi, I bisected down the stack and patches.arch/mm-avoid-bad-page-on-lru gives me a link-time error on i386/pae. arch/x86/built-in.o: In function `dma_generic_alloc_coherent': (.text+0x6b95): undefined reference to `page_to_nid' arch/x86/built-in.o: In function `nommu_map_sg': pci-nommu.c:(.text+0x805f): undefined reference to `page_to_nid' arch/x86/built-in.o: In function `nommu_map_page': pci-nommu.c:(.text+0x8168): undefined reference to `page_to_nid' arch/x86/built-in.o: In function `machine_kexec': (.text+0x1ca36): undefined reference to `page_to_nid' arch/x86/built-in.o: In function `vmi_kmap_atomic_pte': vmi_32.c:(.text+0x21567): undefined reference to `page_to_nid' arch/x86/built-in.o:kvm.c:(.text+0x21c3e): more undefined references to `page_to_nid' follow -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On Sunday 2009-09-06 14:02, Jan Engelhardt wrote:
I bisected down the stack and patches.arch/mm-avoid-bad-page-on-lru gives me a link-time error on i386/pae.
arch/x86/built-in.o: In function `dma_generic_alloc_coherent': (.text+0x6b95): undefined reference to `page_to_nid' arch/x86/built-in.o: In function `nommu_map_sg': pci-nommu.c:(.text+0x805f): undefined reference to `page_to_nid' arch/x86/built-in.o: In function `nommu_map_page': pci-nommu.c:(.text+0x8168): undefined reference to `page_to_nid' arch/x86/built-in.o: In function `machine_kexec': (.text+0x1ca36): undefined reference to `page_to_nid' arch/x86/built-in.o: In function `vmi_kmap_atomic_pte': vmi_32.c:(.text+0x21567): undefined reference to `page_to_nid' arch/x86/built-in.o:kvm.c:(.text+0x21c3e): more undefined references to `page_to_nid' follow
For I-don't-know-what reason, this also happens again on patches.suse/unlock_page-speedup.patch. It seems that by adding page flags (which these patches do), there are more than 32 around, seeming like a reasonable cause for this error. When there are more than 32, this fires: (include/linux/mm.h) #if SECTIONS_WIDTH+ZONES_WIDTH+NODES_SHIFT <= BITS_PER_LONG - NR_PAGEFLAGS #define NODES_WIDTH NODES_SHIFT #else #ifdef CONFIG_SPARSEMEM_VMEMMAP #error "Vmemmap: No space for nodes field in page flags" #endif #define NODES_WIDTH 0 <========== #endif And subsequently #if !(NODES_WIDTH > 0 || NODES_SHIFT == 0) #define NODE_NOT_IN_PAGE_FLAGS #endif And further #ifdef NODE_NOT_IN_PAGE_FLAGS extern int page_to_nid(struct page *page); #else page_to_nid is defined in mm/sparse.c, but sparse.c is never compiled because SPARSEMEM is not selected, but DISCONTIG is - per .config. -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
participants (1)
-
Jan Engelhardt