Skip to contentSkip to conversation

cleanup some i386 mm init code

PATCH New Christoph Hellwig 1 participant 1 message Sep 27, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cleanup some i386 mm init code

Cleanup one_highpage_init() as in 2.5. Patricia ACKed this change long ago.

arch/i386/mm/init.c +7 -14
@@ -449,21 +449,14 @@ static inline int page_kills_ppro(unsign
 #ifdef CONFIG_HIGHMEM
 void __init one_highpage_init(struct page *page, int pfn, int bad_ppro)
 {
-	if (!page_is_ram(pfn)) {
+	if (page_is_ram(pfn) && !(bad_ppro && page_kills_ppro(pfn))) {
+		ClearPageReserved(page);
+		set_bit(PG_highmem, &page->flags);
+		set_page_count(page, 1);
+		__free_page(page);
+		totalhigh_pages++;
+	} else
 		SetPageReserved(page);
-		return;
-	}
-	
-	if (bad_ppro && page_kills_ppro(pfn)) {
-		SetPageReserved(page);
-		return;
-	}
-	
-	ClearPageReserved(page);
-	set_bit(PG_highmem, &page->flags);
-	atomic_set(&page->count, 1);
-	__free_page(page);
-	totalhigh_pages++;
 }
 #endif /* CONFIG_HIGHMEM */