aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2008-05-12 09:43:37 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-05-25 04:55:12 -0400
commita91eea6df383f26fc4fcbefcbdb5aee8facd17fd (patch)
tree730289432e316346af74e9999511f4aca056bbf1 /arch
parent7f028bc0fd119a4fc65aedc07728ce85c8813d33 (diff)
x86: fix shadow variables of global end_pnf in e820_64.c
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/e820_64.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/arch/x86/kernel/e820_64.c b/arch/x86/kernel/e820_64.c
index 07941b554519..5a9bc9244dc6 100644
--- a/arch/x86/kernel/e820_64.c
+++ b/arch/x86/kernel/e820_64.c
@@ -51,21 +51,21 @@ static unsigned long __initdata end_user_pfn = MAXMEM>>PAGE_SHIFT;
51 */ 51 */
52unsigned long __init e820_end_of_ram(void) 52unsigned long __init e820_end_of_ram(void)
53{ 53{
54 unsigned long end_pfn; 54 unsigned long last_pfn;
55 55
56 end_pfn = find_max_pfn_with_active_regions(); 56 last_pfn = find_max_pfn_with_active_regions();
57 57
58 if (end_pfn > max_pfn_mapped) 58 if (last_pfn > max_pfn_mapped)
59 max_pfn_mapped = end_pfn; 59 max_pfn_mapped = last_pfn;
60 if (max_pfn_mapped > MAXMEM>>PAGE_SHIFT) 60 if (max_pfn_mapped > MAXMEM>>PAGE_SHIFT)
61 max_pfn_mapped = MAXMEM>>PAGE_SHIFT; 61 max_pfn_mapped = MAXMEM>>PAGE_SHIFT;
62 if (end_pfn > end_user_pfn) 62 if (last_pfn > end_user_pfn)
63 end_pfn = end_user_pfn; 63 last_pfn = end_user_pfn;
64 if (end_pfn > max_pfn_mapped) 64 if (last_pfn > max_pfn_mapped)
65 end_pfn = max_pfn_mapped; 65 last_pfn = max_pfn_mapped;
66 66
67 printk(KERN_INFO "max_pfn_mapped = %lu\n", max_pfn_mapped); 67 printk(KERN_INFO "max_pfn_mapped = %lu\n", max_pfn_mapped);
68 return end_pfn; 68 return last_pfn;
69} 69}
70 70
71/* 71/*
@@ -124,12 +124,12 @@ void __init e820_mark_nosave_regions(void)
124} 124}
125 125
126/* 126/*
127 * Finds an active region in the address range from start_pfn to end_pfn and 127 * Finds an active region in the address range from start_pfn to last_pfn and
128 * returns its range in ei_startpfn and ei_endpfn for the e820 entry. 128 * returns its range in ei_startpfn and ei_endpfn for the e820 entry.
129 */ 129 */
130static int __init e820_find_active_region(const struct e820entry *ei, 130static int __init e820_find_active_region(const struct e820entry *ei,
131 unsigned long start_pfn, 131 unsigned long start_pfn,
132 unsigned long end_pfn, 132 unsigned long last_pfn,
133 unsigned long *ei_startpfn, 133 unsigned long *ei_startpfn,
134 unsigned long *ei_endpfn) 134 unsigned long *ei_endpfn)
135{ 135{
@@ -146,14 +146,14 @@ static int __init e820_find_active_region(const struct e820entry *ei,
146 146
147 /* Skip if map is outside the node */ 147 /* Skip if map is outside the node */
148 if (ei->type != E820_RAM || *ei_endpfn <= start_pfn || 148 if (ei->type != E820_RAM || *ei_endpfn <= start_pfn ||
149 *ei_startpfn >= end_pfn) 149 *ei_startpfn >= last_pfn)
150 return 0; 150 return 0;
151 151
152 /* Check for overlaps */ 152 /* Check for overlaps */
153 if (*ei_startpfn < start_pfn) 153 if (*ei_startpfn < start_pfn)
154 *ei_startpfn = start_pfn; 154 *ei_startpfn = start_pfn;
155 if (*ei_endpfn > end_pfn) 155 if (*ei_endpfn > last_pfn)
156 *ei_endpfn = end_pfn; 156 *ei_endpfn = last_pfn;
157 157
158 /* Obey end_user_pfn to save on memmap */ 158 /* Obey end_user_pfn to save on memmap */
159 if (*ei_startpfn >= end_user_pfn) 159 if (*ei_startpfn >= end_user_pfn)
@@ -167,7 +167,7 @@ static int __init e820_find_active_region(const struct e820entry *ei,
167/* Walk the e820 map and register active regions within a node */ 167/* Walk the e820 map and register active regions within a node */
168void __init 168void __init
169e820_register_active_regions(int nid, unsigned long start_pfn, 169e820_register_active_regions(int nid, unsigned long start_pfn,
170 unsigned long end_pfn) 170 unsigned long last_pfn)
171{ 171{
172 unsigned long ei_startpfn; 172 unsigned long ei_startpfn;
173 unsigned long ei_endpfn; 173 unsigned long ei_endpfn;
@@ -175,7 +175,7 @@ e820_register_active_regions(int nid, unsigned long start_pfn,
175 175
176 for (i = 0; i < e820.nr_map; i++) 176 for (i = 0; i < e820.nr_map; i++)
177 if (e820_find_active_region(&e820.map[i], 177 if (e820_find_active_region(&e820.map[i],
178 start_pfn, end_pfn, 178 start_pfn, last_pfn,
179 &ei_startpfn, &ei_endpfn)) 179 &ei_startpfn, &ei_endpfn))
180 add_active_range(nid, ei_startpfn, ei_endpfn); 180 add_active_range(nid, ei_startpfn, ei_endpfn);
181} 181}
@@ -188,13 +188,13 @@ e820_register_active_regions(int nid, unsigned long start_pfn,
188unsigned long __init e820_hole_size(unsigned long start, unsigned long end) 188unsigned long __init e820_hole_size(unsigned long start, unsigned long end)
189{ 189{
190 unsigned long start_pfn = start >> PAGE_SHIFT; 190 unsigned long start_pfn = start >> PAGE_SHIFT;
191 unsigned long end_pfn = end >> PAGE_SHIFT; 191 unsigned long last_pfn = end >> PAGE_SHIFT;
192 unsigned long ei_startpfn, ei_endpfn, ram = 0; 192 unsigned long ei_startpfn, ei_endpfn, ram = 0;
193 int i; 193 int i;
194 194
195 for (i = 0; i < e820.nr_map; i++) { 195 for (i = 0; i < e820.nr_map; i++) {
196 if (e820_find_active_region(&e820.map[i], 196 if (e820_find_active_region(&e820.map[i],
197 start_pfn, end_pfn, 197 start_pfn, last_pfn,
198 &ei_startpfn, &ei_endpfn)) 198 &ei_startpfn, &ei_endpfn))
199 ram += ei_endpfn - ei_startpfn; 199 ram += ei_endpfn - ei_startpfn;
200 } 200 }