[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20061208163020.4650bbaa.akpm@osdl.org>
Date: Fri, 8 Dec 2006 16:30:20 -0800
From: Andrew Morton <akpm@...l.org>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc: linux-kernel@...r.kernel.org, clameter@...r.sgi.com,
apw@...dowen.org
Subject: Re: [RFC] [PATCH] virtual memmap on sparsemem v3 [3/4] static
virtual mem_map
On Fri, 8 Dec 2006 16:07:08 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com> wrote:
> This patch adds support for statically allocated virtual mem_map.
> (means virtual address of mem_map array is defined statically.)
> This removes reference to *(&mem_map).
>
> Signed-Off-By: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
>
>
> Index: devel-2.6.19/include/linux/mmzone.h
> ===================================================================
> --- devel-2.6.19.orig/include/linux/mmzone.h 2006-12-08 15:04:30.000000000 +0900
> +++ devel-2.6.19/include/linux/mmzone.h 2006-12-08 15:05:18.000000000 +0900
> @@ -618,8 +618,13 @@
> #if (((BITS_PER_LONG/4) * PAGES_PER_SECTION) % PAGE_SIZE) != 0
> #error "PAGE_SIZE/SECTION_SIZE relationship is not suitable for vmem_map"
> #endif
> +#ifdef CONFIG_SPARSEMEM_VMEMMAP_STATIC
> +#include <linux/mm_types.h>
> +extern struct page mem_map[];
> +#else
> extern struct page* mem_map;
> #endif
> +#endif
This looks rather unpleasant - what went wrong here?
Would prefer to unconditionally include the header file - conditional inclusions
like this can cause compile failures when someone changes a config option. They
generally raise the complexity level.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists