aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2008-05-12 09:43:36 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-08 05:31:29 -0400
commit886533a3e370a6d5c4e46819d1e14bd2f20dbb3a (patch)
tree11baa49aa2214d5118432ca3b48a3274f3f29c7c
parent864fc31ea59798905a37cd896a3e093915a3b366 (diff)
x86: numa_64.c fix shadowed variable
sparse mutters: arch/x86/mm/numa_64.c:195:27: warning: symbol 'end_pfn' shadows an earlier one Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--arch/x86/mm/numa_64.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c
index 824344f1742f..a1f3778b4680 100644
--- a/arch/x86/mm/numa_64.c
+++ b/arch/x86/mm/numa_64.c
@@ -179,7 +179,7 @@ static void * __init early_node_mem(int nodeid, unsigned long start,
179void __init setup_node_bootmem(int nodeid, unsigned long start, 179void __init setup_node_bootmem(int nodeid, unsigned long start,
180 unsigned long end) 180 unsigned long end)
181{ 181{
182 unsigned long start_pfn, end_pfn, bootmap_pages, bootmap_size; 182 unsigned long start_pfn, last_pfn, bootmap_pages, bootmap_size;
183 unsigned long bootmap_start, nodedata_phys; 183 unsigned long bootmap_start, nodedata_phys;
184 void *bootmap; 184 void *bootmap;
185 const int pgdat_size = round_up(sizeof(pg_data_t), PAGE_SIZE); 185 const int pgdat_size = round_up(sizeof(pg_data_t), PAGE_SIZE);
@@ -191,7 +191,7 @@ void __init setup_node_bootmem(int nodeid, unsigned long start,
191 start, end); 191 start, end);
192 192
193 start_pfn = start >> PAGE_SHIFT; 193 start_pfn = start >> PAGE_SHIFT;
194 end_pfn = end >> PAGE_SHIFT; 194 last_pfn = end >> PAGE_SHIFT;
195 195
196 node_data[nodeid] = early_node_mem(nodeid, start, end, pgdat_size, 196 node_data[nodeid] = early_node_mem(nodeid, start, end, pgdat_size,
197 SMP_CACHE_BYTES); 197 SMP_CACHE_BYTES);
@@ -204,7 +204,7 @@ void __init setup_node_bootmem(int nodeid, unsigned long start,
204 memset(NODE_DATA(nodeid), 0, sizeof(pg_data_t)); 204 memset(NODE_DATA(nodeid), 0, sizeof(pg_data_t));
205 NODE_DATA(nodeid)->bdata = &plat_node_bdata[nodeid]; 205 NODE_DATA(nodeid)->bdata = &plat_node_bdata[nodeid];
206 NODE_DATA(nodeid)->node_start_pfn = start_pfn; 206 NODE_DATA(nodeid)->node_start_pfn = start_pfn;
207 NODE_DATA(nodeid)->node_spanned_pages = end_pfn - start_pfn; 207 NODE_DATA(nodeid)->node_spanned_pages = last_pfn - start_pfn;
208 208
209 /* 209 /*
210 * Find a place for the bootmem map 210 * Find a place for the bootmem map
@@ -213,7 +213,7 @@ void __init setup_node_bootmem(int nodeid, unsigned long start,
213 * early_node_mem will get that with find_e820_area instead 213 * early_node_mem will get that with find_e820_area instead
214 * of alloc_bootmem, that could clash with reserved range 214 * of alloc_bootmem, that could clash with reserved range
215 */ 215 */
216 bootmap_pages = bootmem_bootmap_pages(end_pfn - start_pfn); 216 bootmap_pages = bootmem_bootmap_pages(last_pfn - start_pfn);
217 nid = phys_to_nid(nodedata_phys); 217 nid = phys_to_nid(nodedata_phys);
218 if (nid == nodeid) 218 if (nid == nodeid)
219 bootmap_start = round_up(nodedata_phys + pgdat_size, PAGE_SIZE); 219 bootmap_start = round_up(nodedata_phys + pgdat_size, PAGE_SIZE);
@@ -235,7 +235,7 @@ void __init setup_node_bootmem(int nodeid, unsigned long start,
235 235
236 bootmap_size = init_bootmem_node(NODE_DATA(nodeid), 236 bootmap_size = init_bootmem_node(NODE_DATA(nodeid),
237 bootmap_start >> PAGE_SHIFT, 237 bootmap_start >> PAGE_SHIFT,
238 start_pfn, end_pfn); 238 start_pfn, last_pfn);
239 239
240 printk(KERN_INFO " bootmap [%016lx - %016lx] pages %lx\n", 240 printk(KERN_INFO " bootmap [%016lx - %016lx] pages %lx\n",
241 bootmap_start, bootmap_start + bootmap_size - 1, 241 bootmap_start, bootmap_start + bootmap_size - 1,
@@ -400,15 +400,15 @@ static int __init split_nodes_by_size(struct bootnode *nodes, u64 *addr,
400} 400}
401 401
402/* 402/*
403 * Sets up the system RAM area from start_pfn to end_pfn according to the 403 * Sets up the system RAM area from start_pfn to last_pfn according to the
404 * numa=fake command-line option. 404 * numa=fake command-line option.
405 */ 405 */
406static struct bootnode nodes[MAX_NUMNODES] __initdata; 406static struct bootnode nodes[MAX_NUMNODES] __initdata;
407 407
408static int __init numa_emulation(unsigned long start_pfn, unsigned long end_pfn) 408static int __init numa_emulation(unsigned long start_pfn, unsigned long last_pfn)
409{ 409{
410 u64 size, addr = start_pfn << PAGE_SHIFT; 410 u64 size, addr = start_pfn << PAGE_SHIFT;
411 u64 max_addr = end_pfn << PAGE_SHIFT; 411 u64 max_addr = last_pfn << PAGE_SHIFT;
412 int num_nodes = 0, num = 0, coeff_flag, coeff = -1, i; 412 int num_nodes = 0, num = 0, coeff_flag, coeff = -1, i;
413 413
414 memset(&nodes, 0, sizeof(nodes)); 414 memset(&nodes, 0, sizeof(nodes));
@@ -514,7 +514,7 @@ out:
514} 514}
515#endif /* CONFIG_NUMA_EMU */ 515#endif /* CONFIG_NUMA_EMU */
516 516
517void __init numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn) 517void __init numa_initmem_init(unsigned long start_pfn, unsigned long last_pfn)
518{ 518{
519 int i; 519 int i;
520 520
@@ -522,7 +522,7 @@ void __init numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn)
522 nodes_clear(node_online_map); 522 nodes_clear(node_online_map);
523 523
524#ifdef CONFIG_NUMA_EMU 524#ifdef CONFIG_NUMA_EMU
525 if (cmdline && !numa_emulation(start_pfn, end_pfn)) 525 if (cmdline && !numa_emulation(start_pfn, last_pfn))
526 return; 526 return;
527 nodes_clear(node_possible_map); 527 nodes_clear(node_possible_map);
528 nodes_clear(node_online_map); 528 nodes_clear(node_online_map);
@@ -530,7 +530,7 @@ void __init numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn)
530 530
531#ifdef CONFIG_ACPI_NUMA 531#ifdef CONFIG_ACPI_NUMA
532 if (!numa_off && !acpi_scan_nodes(start_pfn << PAGE_SHIFT, 532 if (!numa_off && !acpi_scan_nodes(start_pfn << PAGE_SHIFT,
533 end_pfn << PAGE_SHIFT)) 533 last_pfn << PAGE_SHIFT))
534 return; 534 return;
535 nodes_clear(node_possible_map); 535 nodes_clear(node_possible_map);
536 nodes_clear(node_online_map); 536 nodes_clear(node_online_map);
@@ -538,7 +538,7 @@ void __init numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn)
538 538
539#ifdef CONFIG_K8_NUMA 539#ifdef CONFIG_K8_NUMA
540 if (!numa_off && !k8_scan_nodes(start_pfn<<PAGE_SHIFT, 540 if (!numa_off && !k8_scan_nodes(start_pfn<<PAGE_SHIFT,
541 end_pfn<<PAGE_SHIFT)) 541 last_pfn<<PAGE_SHIFT))
542 return; 542 return;
543 nodes_clear(node_possible_map); 543 nodes_clear(node_possible_map);
544 nodes_clear(node_online_map); 544 nodes_clear(node_online_map);
@@ -548,7 +548,7 @@ void __init numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn)
548 548
549 printk(KERN_INFO "Faking a node at %016lx-%016lx\n", 549 printk(KERN_INFO "Faking a node at %016lx-%016lx\n",
550 start_pfn << PAGE_SHIFT, 550 start_pfn << PAGE_SHIFT,
551 end_pfn << PAGE_SHIFT); 551 last_pfn << PAGE_SHIFT);
552 /* setup dummy node covering all memory */ 552 /* setup dummy node covering all memory */
553 memnode_shift = 63; 553 memnode_shift = 63;
554 memnodemap = memnode.embedded_map; 554 memnodemap = memnode.embedded_map;
@@ -557,8 +557,8 @@ void __init numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn)
557 node_set(0, node_possible_map); 557 node_set(0, node_possible_map);
558 for (i = 0; i < NR_CPUS; i++) 558 for (i = 0; i < NR_CPUS; i++)
559 numa_set_node(i, 0); 559 numa_set_node(i, 0);
560 e820_register_active_regions(0, start_pfn, end_pfn); 560 e820_register_active_regions(0, start_pfn, last_pfn);
561 setup_node_bootmem(0, start_pfn << PAGE_SHIFT, end_pfn << PAGE_SHIFT); 561 setup_node_bootmem(0, start_pfn << PAGE_SHIFT, last_pfn << PAGE_SHIFT);
562} 562}
563 563
564unsigned long __init numa_free_all_bootmem(void) 564unsigned long __init numa_free_all_bootmem(void)