diff options
author | Jiang Liu <liuj97@gmail.com> | 2013-04-29 18:07:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-29 18:54:32 -0400 |
commit | 5e7ccf8635c93b493f7d378a57ce300fbe1484e8 (patch) | |
tree | 9cc7852368506ef8d7272ec82456664adb8001a1 /arch | |
parent | 5b472b2057f5bac344a94ab85c621235202ab9a4 (diff) |
mm/x86: use free_highmem_page() to free highmem pages into buddy system
Use helper function free_highmem_page() to free highmem pages into
the buddy system.
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Cong Wang <amwang@redhat.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Attilio Rao <attilio.rao@citrix.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/mm/highmem_32.c | 1 | ||||
-rw-r--r-- | arch/x86/mm/init_32.c | 10 |
2 files changed, 1 insertions, 10 deletions
diff --git a/arch/x86/mm/highmem_32.c b/arch/x86/mm/highmem_32.c index 6f31ee56c008..252b8f5489ba 100644 --- a/arch/x86/mm/highmem_32.c +++ b/arch/x86/mm/highmem_32.c | |||
@@ -137,5 +137,4 @@ void __init set_highmem_pages_init(void) | |||
137 | add_highpages_with_active_regions(nid, zone_start_pfn, | 137 | add_highpages_with_active_regions(nid, zone_start_pfn, |
138 | zone_end_pfn); | 138 | zone_end_pfn); |
139 | } | 139 | } |
140 | totalram_pages += totalhigh_pages; | ||
141 | } | 140 | } |
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index 2d19001151d5..3ac7e319918d 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c | |||
@@ -427,14 +427,6 @@ static void __init permanent_kmaps_init(pgd_t *pgd_base) | |||
427 | pkmap_page_table = pte; | 427 | pkmap_page_table = pte; |
428 | } | 428 | } |
429 | 429 | ||
430 | static void __init add_one_highpage_init(struct page *page) | ||
431 | { | ||
432 | ClearPageReserved(page); | ||
433 | init_page_count(page); | ||
434 | __free_page(page); | ||
435 | totalhigh_pages++; | ||
436 | } | ||
437 | |||
438 | void __init add_highpages_with_active_regions(int nid, | 430 | void __init add_highpages_with_active_regions(int nid, |
439 | unsigned long start_pfn, unsigned long end_pfn) | 431 | unsigned long start_pfn, unsigned long end_pfn) |
440 | { | 432 | { |
@@ -448,7 +440,7 @@ void __init add_highpages_with_active_regions(int nid, | |||
448 | start_pfn, end_pfn); | 440 | start_pfn, end_pfn); |
449 | for ( ; pfn < e_pfn; pfn++) | 441 | for ( ; pfn < e_pfn; pfn++) |
450 | if (pfn_valid(pfn)) | 442 | if (pfn_valid(pfn)) |
451 | add_one_highpage_init(pfn_to_page(pfn)); | 443 | free_highmem_page(pfn_to_page(pfn)); |
452 | } | 444 | } |
453 | } | 445 | } |
454 | #else | 446 | #else |