aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-06-15 21:58:51 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-08 04:37:01 -0400
commitd0be6bdea103b8d04c8a3495538b7c0011ae4129 (patch)
treeb2f40f629457feda4e20eb145ed6e4b676f6effd
parent6df8809bbd1b48cc6d428df7372ed749c8711641 (diff)
x86: rename two e820 related functions
rename update_memory_range to e820_update_range rename add_memory_region to e820_add_region to make it more clear that they are about e820 map operations. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--arch/x86/kernel/aperture_64.c2
-rw-r--r--arch/x86/kernel/cpu/mtrr/main.c2
-rw-r--r--arch/x86/kernel/e820.c16
-rw-r--r--arch/x86/kernel/efi.c2
-rw-r--r--arch/x86/lguest/boot.c2
-rw-r--r--arch/x86/mach-default/setup.c4
-rw-r--r--arch/x86/mach-visws/setup.c6
-rw-r--r--arch/x86/mach-voyager/setup.c12
-rw-r--r--arch/x86/xen/setup.c4
-rw-r--r--include/asm-x86/e820.h4
10 files changed, 27 insertions, 27 deletions
diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c
index 479926d9e004..66b140932b23 100644
--- a/arch/x86/kernel/aperture_64.c
+++ b/arch/x86/kernel/aperture_64.c
@@ -292,7 +292,7 @@ void __init early_gart_iommu_check(void)
292 E820_RAM)) { 292 E820_RAM)) {
293 /* reserved it, so we can resuse it in second kernel */ 293 /* reserved it, so we can resuse it in second kernel */
294 printk(KERN_INFO "update e820 for GART\n"); 294 printk(KERN_INFO "update e820 for GART\n");
295 add_memory_region(aper_base, aper_size, E820_RESERVED); 295 e820_add_region(aper_base, aper_size, E820_RESERVED);
296 update_e820(); 296 update_e820();
297 } 297 }
298 return; 298 return;
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c
index 0642201784e0..105afe12beb0 100644
--- a/arch/x86/kernel/cpu/mtrr/main.c
+++ b/arch/x86/kernel/cpu/mtrr/main.c
@@ -1440,7 +1440,7 @@ static u64 __init real_trim_memory(unsigned long start_pfn,
1440 trim_size <<= PAGE_SHIFT; 1440 trim_size <<= PAGE_SHIFT;
1441 trim_size -= trim_start; 1441 trim_size -= trim_start;
1442 1442
1443 return update_memory_range(trim_start, trim_size, E820_RAM, 1443 return e820_update_range(trim_start, trim_size, E820_RAM,
1444 E820_RESERVED); 1444 E820_RESERVED);
1445} 1445}
1446/** 1446/**
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index 774063f11be0..5051ce744b4e 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -94,7 +94,7 @@ int __init e820_all_mapped(u64 start, u64 end, unsigned type)
94/* 94/*
95 * Add a memory region to the kernel e820 map. 95 * Add a memory region to the kernel e820 map.
96 */ 96 */
97void __init add_memory_region(u64 start, u64 size, int type) 97void __init e820_add_region(u64 start, u64 size, int type)
98{ 98{
99 int x = e820.nr_map; 99 int x = e820.nr_map;
100 100
@@ -384,12 +384,12 @@ int __init copy_e820_map(struct e820entry *biosmap, int nr_map)
384 if (start > end) 384 if (start > end)
385 return -1; 385 return -1;
386 386
387 add_memory_region(start, size, type); 387 e820_add_region(start, size, type);
388 } while (biosmap++, --nr_map); 388 } while (biosmap++, --nr_map);
389 return 0; 389 return 0;
390} 390}
391 391
392u64 __init update_memory_range(u64 start, u64 size, unsigned old_type, 392u64 __init e820_update_range(u64 start, u64 size, unsigned old_type,
393 unsigned new_type) 393 unsigned new_type)
394{ 394{
395 int i; 395 int i;
@@ -414,7 +414,7 @@ u64 __init update_memory_range(u64 start, u64 size, unsigned old_type,
414 final_end = min(start + size, ei->addr + ei->size); 414 final_end = min(start + size, ei->addr + ei->size);
415 if (final_start >= final_end) 415 if (final_start >= final_end)
416 continue; 416 continue;
417 add_memory_region(final_start, final_end - final_start, 417 e820_add_region(final_start, final_end - final_start,
418 new_type); 418 new_type);
419 real_updated_size += final_end - final_start; 419 real_updated_size += final_end - final_start;
420 } 420 }
@@ -774,7 +774,7 @@ u64 __init early_reserve_e820(u64 startt, u64 sizet, u64 align)
774 return 0; 774 return 0;
775 775
776 addr = round_down(start + size - sizet, align); 776 addr = round_down(start + size - sizet, align);
777 update_memory_range(addr, sizet, E820_RAM, E820_RESERVED); 777 e820_update_range(addr, sizet, E820_RAM, E820_RESERVED);
778 printk(KERN_INFO "update e820 for early_reserve_e820\n"); 778 printk(KERN_INFO "update e820 for early_reserve_e820\n");
779 update_e820(); 779 update_e820();
780 780
@@ -949,13 +949,13 @@ static int __init parse_memmap_opt(char *p)
949 userdef = 1; 949 userdef = 1;
950 if (*p == '@') { 950 if (*p == '@') {
951 start_at = memparse(p+1, &p); 951 start_at = memparse(p+1, &p);
952 add_memory_region(start_at, mem_size, E820_RAM); 952 e820_add_region(start_at, mem_size, E820_RAM);
953 } else if (*p == '#') { 953 } else if (*p == '#') {
954 start_at = memparse(p+1, &p); 954 start_at = memparse(p+1, &p);
955 add_memory_region(start_at, mem_size, E820_ACPI); 955 e820_add_region(start_at, mem_size, E820_ACPI);
956 } else if (*p == '$') { 956 } else if (*p == '$') {
957 start_at = memparse(p+1, &p); 957 start_at = memparse(p+1, &p);
958 add_memory_region(start_at, mem_size, E820_RESERVED); 958 e820_add_region(start_at, mem_size, E820_RESERVED);
959 } else { 959 } else {
960 end_user_pfn = (mem_size >> PAGE_SHIFT); 960 end_user_pfn = (mem_size >> PAGE_SHIFT);
961 } 961 }
diff --git a/arch/x86/kernel/efi.c b/arch/x86/kernel/efi.c
index d5c7fcdd1861..473c89fe5073 100644
--- a/arch/x86/kernel/efi.c
+++ b/arch/x86/kernel/efi.c
@@ -233,7 +233,7 @@ static void __init add_efi_memmap(void)
233 e820_type = E820_RAM; 233 e820_type = E820_RAM;
234 else 234 else
235 e820_type = E820_RESERVED; 235 e820_type = E820_RESERVED;
236 add_memory_region(start, size, e820_type); 236 e820_add_region(start, size, e820_type);
237 } 237 }
238 sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map); 238 sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map);
239} 239}
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
index 5e4772907c6e..e72cf0793fbe 100644
--- a/arch/x86/lguest/boot.c
+++ b/arch/x86/lguest/boot.c
@@ -835,7 +835,7 @@ static __init char *lguest_memory_setup(void)
835 835
836 /* The Linux bootloader header contains an "e820" memory map: the 836 /* The Linux bootloader header contains an "e820" memory map: the
837 * Launcher populated the first entry with our memory limit. */ 837 * Launcher populated the first entry with our memory limit. */
838 add_memory_region(boot_params.e820_map[0].addr, 838 e820_add_region(boot_params.e820_map[0].addr,
839 boot_params.e820_map[0].size, 839 boot_params.e820_map[0].size,
840 boot_params.e820_map[0].type); 840 boot_params.e820_map[0].type);
841 841
diff --git a/arch/x86/mach-default/setup.c b/arch/x86/mach-default/setup.c
index 56b4c39cb7fa..7ae692a76769 100644
--- a/arch/x86/mach-default/setup.c
+++ b/arch/x86/mach-default/setup.c
@@ -184,8 +184,8 @@ char * __init machine_specific_memory_setup(void)
184 } 184 }
185 185
186 e820.nr_map = 0; 186 e820.nr_map = 0;
187 add_memory_region(0, LOWMEMSIZE(), E820_RAM); 187 e820_add_region(0, LOWMEMSIZE(), E820_RAM);
188 add_memory_region(HIGH_MEMORY, mem_size << 10, E820_RAM); 188 e820_add_region(HIGH_MEMORY, mem_size << 10, E820_RAM);
189 } 189 }
190 return who; 190 return who;
191} 191}
diff --git a/arch/x86/mach-visws/setup.c b/arch/x86/mach-visws/setup.c
index de4c9dbd086f..d67868ec9b7f 100644
--- a/arch/x86/mach-visws/setup.c
+++ b/arch/x86/mach-visws/setup.c
@@ -175,9 +175,9 @@ char * __init machine_specific_memory_setup(void)
175 sgivwfb_mem_size &= ~((1 << 20) - 1); 175 sgivwfb_mem_size &= ~((1 << 20) - 1);
176 sgivwfb_mem_phys = mem_size - gfx_mem_size; 176 sgivwfb_mem_phys = mem_size - gfx_mem_size;
177 177
178 add_memory_region(0, LOWMEMSIZE(), E820_RAM); 178 e820_add_region(0, LOWMEMSIZE(), E820_RAM);
179 add_memory_region(HIGH_MEMORY, mem_size - sgivwfb_mem_size - HIGH_MEMORY, E820_RAM); 179 e820_add_region(HIGH_MEMORY, mem_size - sgivwfb_mem_size - HIGH_MEMORY, E820_RAM);
180 add_memory_region(sgivwfb_mem_phys, sgivwfb_mem_size, E820_RESERVED); 180 e820_add_region(sgivwfb_mem_phys, sgivwfb_mem_size, E820_RESERVED);
181 181
182 return "PROM"; 182 return "PROM";
183} 183}
diff --git a/arch/x86/mach-voyager/setup.c b/arch/x86/mach-voyager/setup.c
index f4aca9fa9546..f27b583154e5 100644
--- a/arch/x86/mach-voyager/setup.c
+++ b/arch/x86/mach-voyager/setup.c
@@ -74,7 +74,7 @@ char *__init machine_specific_memory_setup(void)
74 74
75 e820.nr_map = 0; 75 e820.nr_map = 0;
76 for (i = 0; voyager_memory_detect(i, &addr, &length); i++) { 76 for (i = 0; voyager_memory_detect(i, &addr, &length); i++) {
77 add_memory_region(addr, length, E820_RAM); 77 e820_add_region(addr, length, E820_RAM);
78 } 78 }
79 return who; 79 return who;
80 } else if (voyager_level == 4) { 80 } else if (voyager_level == 4) {
@@ -92,14 +92,14 @@ char *__init machine_specific_memory_setup(void)
92 tom = (boot_params.screen_info.ext_mem_k) << 10; 92 tom = (boot_params.screen_info.ext_mem_k) << 10;
93 } 93 }
94 who = "Voyager-TOM"; 94 who = "Voyager-TOM";
95 add_memory_region(0, 0x9f000, E820_RAM); 95 e820_add_region(0, 0x9f000, E820_RAM);
96 /* map from 1M to top of memory */ 96 /* map from 1M to top of memory */
97 add_memory_region(1 * 1024 * 1024, tom - 1 * 1024 * 1024, 97 e820_add_region(1 * 1024 * 1024, tom - 1 * 1024 * 1024,
98 E820_RAM); 98 E820_RAM);
99 /* FIXME: Should check the ASICs to see if I need to 99 /* FIXME: Should check the ASICs to see if I need to
100 * take out the 8M window. Just do it at the moment 100 * take out the 8M window. Just do it at the moment
101 * */ 101 * */
102 add_memory_region(8 * 1024 * 1024, 8 * 1024 * 1024, 102 e820_add_region(8 * 1024 * 1024, 8 * 1024 * 1024,
103 E820_RESERVED); 103 E820_RESERVED);
104 return who; 104 return who;
105 } 105 }
@@ -131,8 +131,8 @@ char *__init machine_specific_memory_setup(void)
131 } 131 }
132 132
133 e820.nr_map = 0; 133 e820.nr_map = 0;
134 add_memory_region(0, LOWMEMSIZE(), E820_RAM); 134 e820_add_region(0, LOWMEMSIZE(), E820_RAM);
135 add_memory_region(HIGH_MEMORY, mem_size << 10, E820_RAM); 135 e820_add_region(HIGH_MEMORY, mem_size << 10, E820_RAM);
136 } 136 }
137 return who; 137 return who;
138} 138}
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
index 82517e4a752a..9001c9df04d8 100644
--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
@@ -39,8 +39,8 @@ char * __init xen_memory_setup(void)
39 unsigned long max_pfn = xen_start_info->nr_pages; 39 unsigned long max_pfn = xen_start_info->nr_pages;
40 40
41 e820.nr_map = 0; 41 e820.nr_map = 0;
42 add_memory_region(0, LOWMEMSIZE(), E820_RAM); 42 e820_add_region(0, LOWMEMSIZE(), E820_RAM);
43 add_memory_region(HIGH_MEMORY, PFN_PHYS(max_pfn)-HIGH_MEMORY, E820_RAM); 43 e820_add_region(HIGH_MEMORY, PFN_PHYS(max_pfn)-HIGH_MEMORY, E820_RAM);
44 44
45 return "Xen"; 45 return "Xen";
46} 46}
diff --git a/include/asm-x86/e820.h b/include/asm-x86/e820.h
index a5959e3a5626..6b0ce745a60c 100644
--- a/include/asm-x86/e820.h
+++ b/include/asm-x86/e820.h
@@ -60,12 +60,12 @@ extern struct e820map e820;
60 60
61extern int e820_any_mapped(u64 start, u64 end, unsigned type); 61extern int e820_any_mapped(u64 start, u64 end, unsigned type);
62extern int e820_all_mapped(u64 start, u64 end, unsigned type); 62extern int e820_all_mapped(u64 start, u64 end, unsigned type);
63extern void add_memory_region(u64 start, u64 size, int type); 63extern void e820_add_region(u64 start, u64 size, int type);
64extern void e820_print_map(char *who); 64extern void e820_print_map(char *who);
65extern int 65extern int
66sanitize_e820_map(struct e820entry *biosmap, int max_nr_map, int *pnr_map); 66sanitize_e820_map(struct e820entry *biosmap, int max_nr_map, int *pnr_map);
67extern int copy_e820_map(struct e820entry *biosmap, int nr_map); 67extern int copy_e820_map(struct e820entry *biosmap, int nr_map);
68extern u64 update_memory_range(u64 start, u64 size, unsigned old_type, 68extern u64 e820_update_range(u64 start, u64 size, unsigned old_type,
69 unsigned new_type); 69 unsigned new_type);
70extern void update_e820(void); 70extern void update_e820(void);
71extern void e820_setup_gap(void); 71extern void e820_setup_gap(void);