lkml.org 
[lkml]   [1999]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] Re: [patch] bootmem bitmap always considered dma memory

On Thu, 9 Dec 1999, [iso-8859-1] Mika Penttilä wrote:

> Aren't the highmem pages also considered as PG_DMA, because
> free_area_init_core() sets the PG_DMA flag and it isn't cleared. in
> mem_init() ?

This is a bug, but it didnt have any bad effect so far because nothing
really tried to use highpages for direct swapping or direct IO. The
attached onliner fixes this.

free_page() doesnt use PG_DMA anymore, it's freeing stuff based on
page->zone. Probably other places should use page->zone as well, not
PG_DMA.

-- mingo
--- linux/arch/i386/mm/init.c.orig2 Thu Dec 9 06:16:08 1999
+++ linux/arch/i386/mm/init.c Thu Dec 9 06:16:57 1999
@@ -581,6 +581,7 @@
continue;
}
ClearPageReserved(page);
+ clear_bit(PG_DMA, &page->flags);
set_bit(PG_highmem, &page->flags);
atomic_set(&page->count, 1);
__free_page(page);
\
 
 \ /
  Last update: 2005-03-22 13:55    [W:1.971 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site