linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix free_all_bootmem_core for virtual memmap
@ 2003-08-04 23:05 Jesse Barnes
  2003-08-04 23:08 ` Jesse Barnes
  0 siblings, 1 reply; 2+ messages in thread
From: Jesse Barnes @ 2003-08-04 23:05 UTC (permalink / raw)
  To: akpm, linux-kernel

Currently, free_all_bootmem_core() assumes that the bdata for a given
node will begin where the node's memory map begins.  This isn't
necessarily true on machines that use a virtual memory map (e.g. ia64
discontig machines), so we fix page to point to the first actual page of
RAM on the node, which _does_ contain the bdata struct.

Thanks,
Jesse


===== mm/bootmem.c 1.20 vs edited =====
--- 1.20/mm/bootmem.c	Fri Aug  1 03:01:02 2003
+++ edited/mm/bootmem.c	Mon Aug  4 16:01:22 2003
@@ -267,7 +267,7 @@
 
 static unsigned long __init free_all_bootmem_core(pg_data_t *pgdat)
 {
-	struct page *page = pgdat->node_mem_map;
+	struct page *page;
 	bootmem_data_t *bdata = pgdat->bdata;
 	unsigned long i, count, total = 0;
 	unsigned long idx;
@@ -276,6 +276,8 @@
 	if (!bdata->node_bootmem_map) BUG();
 
 	count = 0;
+	/* first existant page of the node */
+	page = virt_to_page(phys_to_virt(bdata->node_boot_start));
 	idx = bdata->node_low_pfn - (bdata->node_boot_start >> PAGE_SHIFT);
 	map = bdata->node_bootmem_map;
 	for (i = 0; i < idx; ) {

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] fix free_all_bootmem_core for virtual memmap
  2003-08-04 23:05 [PATCH] fix free_all_bootmem_core for virtual memmap Jesse Barnes
@ 2003-08-04 23:08 ` Jesse Barnes
  0 siblings, 0 replies; 2+ messages in thread
From: Jesse Barnes @ 2003-08-04 23:08 UTC (permalink / raw)
  To: akpm, linux-kernel

On Mon, Aug 04, 2003 at 04:05:11PM -0700, jbarnes wrote:
> Currently, free_all_bootmem_core() assumes that the bdata for a given
> node will begin where the node's memory map begins.  This isn't
> necessarily true on machines that use a virtual memory map (e.g. ia64
> discontig machines), so we fix page to point to the first actual page of
> RAM on the node, which _does_ contain the bdata struct.

Oops, fix a spelling error.

Jesse


===== mm/bootmem.c 1.20 vs edited =====
--- 1.20/mm/bootmem.c	Fri Aug  1 03:01:02 2003
+++ edited/mm/bootmem.c	Mon Aug  4 16:01:22 2003
@@ -267,7 +267,7 @@
 
 static unsigned long __init free_all_bootmem_core(pg_data_t *pgdat)
 {
-	struct page *page = pgdat->node_mem_map;
+	struct page *page;
 	bootmem_data_t *bdata = pgdat->bdata;
 	unsigned long i, count, total = 0;
 	unsigned long idx;
@@ -276,6 +276,8 @@
 	if (!bdata->node_bootmem_map) BUG();
 
 	count = 0;
+	/* first extant page of the node */
+	page = virt_to_page(phys_to_virt(bdata->node_boot_start));
 	idx = bdata->node_low_pfn - (bdata->node_boot_start >> PAGE_SHIFT);
 	map = bdata->node_bootmem_map;
 	for (i = 0; i < idx; ) {

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-08-04 23:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-04 23:05 [PATCH] fix free_all_bootmem_core for virtual memmap Jesse Barnes
2003-08-04 23:08 ` Jesse Barnes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).