All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cleanup some i386 mm init code
@ 2002-09-28  1:26 Christoph Hellwig
  0 siblings, 0 replies; only message in thread
From: Christoph Hellwig @ 2002-09-28  1:26 UTC (permalink / raw)
  To: marcelo; +Cc: gone, linux-kernel

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


--- linux-2.4.20-pre5/arch/i386/mm/init.c	Tue Aug 20 11:36:59 2002
+++ linux/arch/i386/mm/init.c	Fri Sep  6 13:14:37 2002
@@ -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 */
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-09-27 18:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-28  1:26 [PATCH] cleanup some i386 mm init code Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.