From: KAMEZAWA Hiroyuki Fixes #error condition. This check's meaning is: --for 32bits-- 4 (struct page's alignment) * PAGES_PER_SECTION % PAGE_SIZE == 0 --for 64bits-- 8 (struct page's alignment) * PAGES_PER_SECTION % PAGE_SIZE == 0 Then, vmem_map is aligned per section. This check may be removed if I (or someone) can write clean patch for not aligned vmem_map. Signed-off-by: KAMEZAWA Hiroyuki Cc: Andy Whitcroft Cc: Dave Hansen Cc: Martin Bligh Cc: "Luck, Tony" Cc: Christoph Lameter Signed-off-by: Andrew Morton --- include/linux/mmzone.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN include/linux/mmzone.h~virtual-memmap-on-sparsemem-v3-generic-virtual-fix include/linux/mmzone.h --- a/include/linux/mmzone.h~virtual-memmap-on-sparsemem-v3-generic-virtual-fix +++ a/include/linux/mmzone.h @@ -690,7 +690,7 @@ extern int __section_nr(struct mem_secti #define SECTION_NID_SHIFT 2 #ifdef CONFIG_SPARSEMEM_VMEMMAP -#if (((BITS_PER_LONG/4) * PAGES_PER_SECTION) % PAGE_SIZE) != 0 +#if (((BITS_PER_LONG/8) * PAGES_PER_SECTION) % PAGE_SIZE) != 0 #error "PAGE_SIZE/SECTION_SIZE relationship is not suitable for vmem_map" #endif extern struct page* mem_map; _