Commit cbe37d09 authored by Badari Pulavarty's avatar Badari Pulavarty Committed by Linus Torvalds

[PATCH] mm: remove PG_highmem

Remove PG_highmem, to save a page flag.  Use is_highmem() instead.  It'll
generate a little more code, but we don't use PageHigheMem() in many places.
Signed-off-by: default avatarBadari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 73219d17
...@@ -169,7 +169,6 @@ void __init mem_init(void) ...@@ -169,7 +169,6 @@ void __init mem_init(void)
struct page *page = &mem_map[pfn]; struct page *page = &mem_map[pfn];
ClearPageReserved(page); ClearPageReserved(page);
set_bit(PG_highmem, &page->flags);
set_page_count(page, 1); set_page_count(page, 1);
__free_page(page); __free_page(page);
totalram_pages++; totalram_pages++;
......
...@@ -269,7 +269,6 @@ void __init one_highpage_init(struct page *page, int pfn, int bad_ppro) ...@@ -269,7 +269,6 @@ void __init one_highpage_init(struct page *page, int pfn, int bad_ppro)
{ {
if (page_is_ram(pfn) && !(bad_ppro && page_kills_ppro(pfn))) { if (page_is_ram(pfn) && !(bad_ppro && page_kills_ppro(pfn))) {
ClearPageReserved(page); ClearPageReserved(page);
set_bit(PG_highmem, &page->flags);
set_page_count(page, 1); set_page_count(page, 1);
__free_page(page); __free_page(page);
totalhigh_pages++; totalhigh_pages++;
......
...@@ -232,7 +232,6 @@ void __init mem_init(void) ...@@ -232,7 +232,6 @@ void __init mem_init(void)
#ifdef CONFIG_LIMITED_DMA #ifdef CONFIG_LIMITED_DMA
set_page_address(page, lowmem_page_address(page)); set_page_address(page, lowmem_page_address(page));
#endif #endif
set_bit(PG_highmem, &page->flags);
set_page_count(page, 1); set_page_count(page, 1);
__free_page(page); __free_page(page);
totalhigh_pages++; totalhigh_pages++;
......
...@@ -469,7 +469,6 @@ void __init mem_init(void) ...@@ -469,7 +469,6 @@ void __init mem_init(void)
struct page *page = mem_map + pfn; struct page *page = mem_map + pfn;
ClearPageReserved(page); ClearPageReserved(page);
set_bit(PG_highmem, &page->flags);
set_page_count(page, 1); set_page_count(page, 1);
__free_page(page); __free_page(page);
totalhigh_pages++; totalhigh_pages++;
......
...@@ -384,7 +384,6 @@ void map_high_region(unsigned long start_pfn, unsigned long end_pfn) ...@@ -384,7 +384,6 @@ void map_high_region(unsigned long start_pfn, unsigned long end_pfn)
struct page *page = pfn_to_page(tmp); struct page *page = pfn_to_page(tmp);
ClearPageReserved(page); ClearPageReserved(page);
set_bit(PG_highmem, &page->flags);
set_page_count(page, 1); set_page_count(page, 1);
__free_page(page); __free_page(page);
totalhigh_pages++; totalhigh_pages++;
......
...@@ -53,7 +53,6 @@ static void setup_highmem(unsigned long highmem_start, ...@@ -53,7 +53,6 @@ static void setup_highmem(unsigned long highmem_start,
for(i = 0; i < highmem_len >> PAGE_SHIFT; i++){ for(i = 0; i < highmem_len >> PAGE_SHIFT; i++){
page = &mem_map[highmem_pfn + i]; page = &mem_map[highmem_pfn + i];
ClearPageReserved(page); ClearPageReserved(page);
set_bit(PG_highmem, &page->flags);
set_page_count(page, 1); set_page_count(page, 1);
__free_page(page); __free_page(page);
} }
......
...@@ -61,21 +61,20 @@ ...@@ -61,21 +61,20 @@
#define PG_active 6 #define PG_active 6
#define PG_slab 7 /* slab debug (Suparna wants this) */ #define PG_slab 7 /* slab debug (Suparna wants this) */
#define PG_highmem 8 #define PG_checked 8 /* kill me in 2.5.<early>. */
#define PG_checked 9 /* kill me in 2.5.<early>. */ #define PG_arch_1 9
#define PG_arch_1 10 #define PG_reserved 10
#define PG_reserved 11 #define PG_private 11 /* Has something at ->private */
#define PG_private 12 /* Has something at ->private */ #define PG_writeback 12 /* Page is under writeback */
#define PG_writeback 13 /* Page is under writeback */ #define PG_nosave 13 /* Used for system suspend/resume */
#define PG_nosave 14 /* Used for system suspend/resume */ #define PG_compound 14 /* Part of a compound page */
#define PG_compound 15 /* Part of a compound page */ #define PG_swapcache 15 /* Swap page: swp_entry_t in private */
#define PG_swapcache 16 /* Swap page: swp_entry_t in private */ #define PG_mappedtodisk 16 /* Has blocks allocated on-disk */
#define PG_mappedtodisk 17 /* Has blocks allocated on-disk */ #define PG_reclaim 17 /* To be reclaimed asap */
#define PG_reclaim 18 /* To be reclaimed asap */ #define PG_nosave_free 18 /* Free, should not be written */
#define PG_nosave_free 19 /* Free, should not be written */ #define PG_uncached 19 /* Page has been mapped as uncached */
#define PG_uncached 20 /* Page has been mapped as uncached */
/* /*
* Global page accounting. One instance per CPU. Only unsigned longs are * Global page accounting. One instance per CPU. Only unsigned longs are
...@@ -215,7 +214,7 @@ extern void __mod_page_state(unsigned offset, unsigned long delta); ...@@ -215,7 +214,7 @@ extern void __mod_page_state(unsigned offset, unsigned long delta);
#define TestSetPageSlab(page) test_and_set_bit(PG_slab, &(page)->flags) #define TestSetPageSlab(page) test_and_set_bit(PG_slab, &(page)->flags)
#ifdef CONFIG_HIGHMEM #ifdef CONFIG_HIGHMEM
#define PageHighMem(page) test_bit(PG_highmem, &(page)->flags) #define PageHighMem(page) is_highmem(page_zone(page))
#else #else
#define PageHighMem(page) 0 /* needed to optimize away at compile time */ #define PageHighMem(page) 0 /* needed to optimize away at compile time */
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment