Hi!
> > This change causes the following compile error with CONFIG_DISCONTIGMEM
> > enabled:
> > kernel/suspend.c: In function `count_and_copy_data_pages':
> > kernel/suspend.c:479: `max_mapnr' undeclared (first use in this function)
> > kernel/suspend.c:479: (Each undeclared identifier is reported only once
> > kernel/suspend.c:479: for each function it appears in.)
> > make[1]: *** [kernel/suspend.o] Error 1
> > make: *** [kernel] Error 2
>
> max_mapnr must die. It's mostly buggy largely because it's not what
> people think it is. Most of the time people want max_pfn, and the rest
> they don't want it at all.
It seems more logical now.
> Pavel, you might also want to make config options conflict instead of
> panicking.
Actually, I think I prefer panic(). That way it will be less broken
when someone will try to fix discontigmem.
> diff -urN linux-2.5.41/kernel/suspend.c swsusp-2.5.41/kernel/suspend.c
> --- linux-2.5.41/kernel/suspend.c 2002-10-07 11:23:37.000000000 -0700
> +++ swsusp-2.5.41/kernel/suspend.c 2002-10-08 06:16:54.000000000 -0700
> @@ -474,9 +474,9 @@
> #ifdef CONFIG_DISCONTIGMEM
> panic("Discontingmem not supported");
> #else
> - BUG_ON (max_mapnr != num_physpages);
> + BUG_ON (max_pfn != num_physpages);
> #endif
> - for (pfn = 0; pfn < max_mapnr; pfn++) {
> + for (pfn = 0; pfn < max_pfn; pfn++) {
> page = pfn_to_page(pfn);
> if (PageHighMem(page))
> panic("Swsusp not supported on highmem boxes. Send 1GB of RAM to <pavel@ucw.cz> and try again ;-).");
Applied.
Pavel
-- When do you have heart between your knees? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Tue Oct 15 2002 - 22:00:27 EST