cleanup some i386 mm init code

cleanup some i386 mm init code

Post by Christoph Hellwi » Sat, 28 Sep 2002 20:20:06



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

 #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 */

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. [RESENT] cleanup some i386 mm init code

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

 #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 */

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. Help: How to turn off microphone in Linux?

3. i386 mm init cleanup part 2

4. CD Ripper s/w for Linux with CDDB Capability??

5. i386 mm init cleanup part 1

6. MX record outside domain

7. compiling the arch/i386/mm/init.c file

8. Dial in and Dial out???

9. 2.5.52 a/arch/i386/mm/init.c

10. i386 specific slab cache init code

11. 2.5.68-bk3 #if cleanup kernel/* and mm/* (5/6)

12. [2.5] replace flush_map() in arch/i386/mm/pageattr.c w ith flush_tlb_all()

13. [2.5] replace flush_map() in arch/i386/mm/pageattr.c with flush_tlb_all()