While compiling suspend2-sources-2.6.18 kernel on amd64 machine it bailed out with: " undefined reference to `e820_mark_nosave_regions' ". On another x86 machine kernel compiled fine. CC [M] lib/crc-ccitt.o CC [M] lib/libcrc32c.o CC [M] lib/ts_kmp.o CC [M] lib/ts_bm.o CC [M] lib/ts_fsm.o CC arch/x86_64/lib/io.o AS arch/x86_64/lib/iomap_copy.o LD arch/x86_64/lib/built-in.o CC arch/x86_64/lib/bitops.o CC arch/x86_64/lib/bitstr.o AS arch/x86_64/lib/clear_page.o AS arch/x86_64/lib/copy_page.o AS arch/x86_64/lib/copy_user.o AS arch/x86_64/lib/csum-copy.o CC arch/x86_64/lib/csum-partial.o CC arch/x86_64/lib/csum-wrappers.o CC arch/x86_64/lib/delay.o AS arch/x86_64/lib/getuser.o AS arch/x86_64/lib/memcpy.o CC arch/x86_64/lib/memmove.o AS arch/x86_64/lib/memset.o AS arch/x86_64/lib/putuser.o AS arch/x86_64/lib/thunk.o CC arch/x86_64/lib/usercopy.o AR arch/x86_64/lib/lib.a GEN .version CHK include/linux/compile.h UPD include/linux/compile.h CC init/version.o LD init/built-in.o LD vmlinux arch/x86_64/kernel/built-in.o: In function `setup_arch': (.init.text+0x18e0): undefined reference to `e820_mark_nosave_regions' make: *** [vmlinux] Error 1 As a quick check I grepped for the problematic symbol: # pwd /usr/src/linux-2.6.18-suspend2 # grep -R e820_mark_nosave_regions . ./include/asm-x86_64/e820.h:extern void e820_mark_nosave_regions(void); ./include/asm/e820.h:extern void e820_mark_nosave_regions(void); Binary file ./arch/x86_64/kernel/built-in.o matches Binary file ./arch/x86_64/kernel/setup.o matches ./arch/x86_64/kernel/setup.c: e820_mark_nosave_regions(); Note: there's no *.c file with the actual definition of this function. Asking Google: http://www.google.pl/search?q=e820_mark_nosave_regions yielded three results, of which I copied the first one into example URL. From what I can tell it looks like that the 'e820_mark_nosave_regions' function should reside in the 'arch/x86_64/kernel/e820.c' file. But it could not be found there (vide: grep results). Probably suspend2 patches somehow missed that. Please check and fix. PS. If you want my .config, just ask and I'll attach it :-)
Same problem here. I've tried untarring the kernel source and applying the suspend2 patch from www.suspend2.net and the kernel compile fine.
The patch 4411-x86_64-nosave.patch is incomplete, which gives this error. It patches only the following: --- arch/x86_64/kernel/e820.c | 48 ++++++++++++++++++++++++++++++++++++++++= +++++ arch/x86_64/kernel/setup.c | 1 = include/asm-x86_64/e820.h | 1 = 3 files changed, 50 insertions(+) Index: linux-2.6.18/arch/x86_64/kernel/e820.c =================================================================== --- linux-2.6.18.orig/arch/x86_64/kernel/e820.c +++ linux-2.6.18/arch/x86_64/kernel/e820.c @@ -16,6 +16,7 @@ #include <linux/string.h> #include <linux/kexec.h> #include <linux/module.h> +#include <linux/mm.h> #include <asm/pgtable.h> #include <asm/page.h> Index: linux-2.6.18/arch/x86_64/kernel/setup.c =================================================================== --- linux-2.6.18.orig/arch/x86_64/kernel/setup.c +++ linux-2.6.18/arch/x86_64/kernel/setup.c @@ -690,6 +690,7 @@ void __init setup_arch(char **cmdline_p) probe_roms(); e820_reserve_resources(); + e820_mark_nosave_regions(); request_resource(&iomem_resource, &video_ram_resource); { Index: linux-2.6.18/include/asm-x86_64/e820.h =================================================================== --- linux-2.6.18.orig/include/asm-x86_64/e820.h +++ linux-2.6.18/include/asm-x86_64/e820.h @@ -46,6 +46,7 @@ extern void setup_memory_region(void); extern void contig_e820_setup(void); extern unsigned long e820_end_of_ram(void); extern void e820_reserve_resources(void); +extern void e820_mark_nosave_regions(void); extern void e820_print_map(char *who); extern int e820_any_mapped(unsigned long start, unsigned long end, unsigned type); extern int e820_all_mapped(unsigned long start, unsigned long end, unsigned type); while it should patch more. Complete patch (from the suspend2-patches from suspend2.net) attached.
Created attachment 97777 [details, diff] complete patch from suspend2-2.2.8-for-2.6.18
Created attachment 97781 [details, diff] Patch that actually applies The previous patch was broken (e-mail program added some stuff). I've tracked down the original patch, and had to modify it a bit to apply. Still testing if this compiles.
It compiles, links, boots and suspends to disk without problems.
(In reply to comment #5) > It compiles, links, boots and suspends to disk without problems. Thanks a lot for your efforts Jan. I just commited an updated ebuild (no version bump), so you'll have to sync (in an hour or so) and then remerge =suspend2-sources-2.6.18.
*** Bug 148918 has been marked as a duplicate of this bug. ***