diff -ru linux-2.5.70-clean/arch/i386/mm/discontig.c linux-2.5.70-numa-mem=1/arch/i386/mm/discontig.c --- linux-2.5.70-clean/arch/i386/mm/discontig.c Mon May 26 18:00:40 2003 +++ linux-2.5.70-numa-mem=1/arch/i386/mm/discontig.c Fri Jun 6 16:52:18 2003 @@ -114,10 +114,16 @@ */ static void __init find_max_pfn_node(int nid) { - if (node_start_pfn[nid] >= node_end_pfn[nid]) - BUG(); if (node_end_pfn[nid] > max_pfn) node_end_pfn[nid] = max_pfn; + /* + * if a user has given mem=XXXX, then we need to make sure + * that the node _starts_ before that, too, not just ends + */ + if (node_start_pfn[nid] > max_pfn) + node_start_pfn[nid] = max_pfn; + if (node_start_pfn[nid] > node_end_pfn[nid]) + BUG(); } /* diff -ru linux-2.5.70-clean/mm/page_alloc.c linux-2.5.70-numa-mem=1/mm/page_alloc.c --- linux-2.5.70-clean/mm/page_alloc.c Mon May 26 18:00:22 2003 +++ linux-2.5.70-numa-mem=1/mm/page_alloc.c Fri Jun 6 16:57:30 2003 @@ -1153,8 +1153,11 @@ for (i = 0; i < MAX_NR_ZONES; i++) size += zones_size[i]; size = LONG_ALIGN((size + 7) >> 3); - pgdat->valid_addr_bitmap = (unsigned long *)alloc_bootmem_node(pgdat, size); - memset(pgdat->valid_addr_bitmap, 0, size); + if (size) { + pgdat->valid_addr_bitmap = + (unsigned long *)alloc_bootmem_node(pgdat, size); + memset(pgdat->valid_addr_bitmap, 0, size); + } } /*