[RFC/PATCH 3/7] x86, mm: Use max_pfn instead of highend_pfn

From: Pekka Enberg
Date: Fri Oct 28 2011 - 10:23:34 EST


The 'highend_pfn' variable is always set to 'max_pfn' so just use the latter
directly.

Cc: Tejun Heo <tj@xxxxxxxxxx>
Cc: Yinghai Lu <yinghai@xxxxxxxxxx>
Cc: H. Peter Anvin <hpa@xxxxxxxxxxxxxxx>
Cc: David Rientjes <rientjes@xxxxxxxxxx>
Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx>
---
arch/x86/mm/init_32.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
index 434c97d..6101894 100644
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -54,7 +54,7 @@
#include <asm/page_types.h>
#include <asm/init.h>

-unsigned long highstart_pfn, highend_pfn;
+unsigned long highstart_pfn;

static noinline int do_test_wp_bit(void);

@@ -647,14 +647,14 @@ void __init find_low_pfn_range(void)
void __init initmem_init(void)
{
#ifdef CONFIG_HIGHMEM
- highstart_pfn = highend_pfn = max_pfn;
+ highstart_pfn = max_pfn;
if (max_pfn > max_low_pfn)
highstart_pfn = max_low_pfn;
- memblock_x86_register_active_regions(0, 0, highend_pfn);
+ memblock_x86_register_active_regions(0, 0, max_pfn);
sparse_memory_present_with_active_regions(0);
printk(KERN_NOTICE "%ldMB HIGHMEM available.\n",
- pages_to_mb(highend_pfn - highstart_pfn));
- num_physpages = highend_pfn;
+ pages_to_mb(max_pfn - highstart_pfn));
+ num_physpages = max_pfn;
high_memory = (void *) __va(highstart_pfn * PAGE_SIZE - 1) + 1;
#else
memblock_x86_register_active_regions(0, 0, max_low_pfn);
@@ -683,7 +683,7 @@ static void __init zone_sizes_init(void)
#endif
max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
#ifdef CONFIG_HIGHMEM
- max_zone_pfns[ZONE_HIGHMEM] = highend_pfn;
+ max_zone_pfns[ZONE_HIGHMEM] = max_pfn;
#endif

free_area_init_nodes(max_zone_pfns);
--
1.7.6.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/