diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-01-27 07:54:38 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-01-28 03:33:16 -0500 |
commit | 61a50101638254d38e3f4281265b44de0f2cba4e (patch) | |
tree | c57b88b903c3b5d01b2742b63e02e98aa1d91225 | |
parent | acd4c048728814505fae8e224cf9074bd1ad291e (diff) |
x86/boot/e820: Rename everything to e820_table
No change in functionality.
Cc: Alex Thorlton <athorlton@sgi.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Huang, Ying <ying.huang@intel.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul Jackson <pj@sgi.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Tejun Heo <tj@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Wei Yang <richard.weiyang@gmail.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | Documentation/x86/zero-page.txt | 4 | ||||
-rw-r--r-- | arch/x86/boot/compressed/eboot.c | 22 | ||||
-rw-r--r-- | arch/x86/boot/compressed/kaslr.c | 2 | ||||
-rw-r--r-- | arch/x86/boot/memory.c | 4 | ||||
-rw-r--r-- | arch/x86/include/asm/e820/api.h | 6 | ||||
-rw-r--r-- | arch/x86/include/asm/e820/types.h | 4 | ||||
-rw-r--r-- | arch/x86/include/uapi/asm/bootparam.h | 2 | ||||
-rw-r--r-- | arch/x86/kernel/crash.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/e820.c | 152 | ||||
-rw-r--r-- | arch/x86/kernel/early-quirks.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/kexec-bzimage64.c | 10 | ||||
-rw-r--r-- | arch/x86/kernel/resource.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/setup.c | 10 | ||||
-rw-r--r-- | arch/x86/kernel/tboot.c | 8 | ||||
-rw-r--r-- | arch/x86/lguest/boot.c | 6 | ||||
-rw-r--r-- | arch/x86/platform/efi/efi.c | 2 | ||||
-rw-r--r-- | arch/x86/power/hibernate_64.c | 8 | ||||
-rw-r--r-- | arch/x86/xen/setup.c | 76 | ||||
-rw-r--r-- | tools/lguest/lguest.c | 2 |
19 files changed, 163 insertions, 163 deletions
diff --git a/Documentation/x86/zero-page.txt b/Documentation/x86/zero-page.txt index b323b705f419..363dca7b446b 100644 --- a/Documentation/x86/zero-page.txt +++ b/Documentation/x86/zero-page.txt | |||
@@ -27,12 +27,12 @@ Offset Proto Name Meaning | |||
27 | 1C0/020 ALL efi_info EFI 32 information (struct efi_info) | 27 | 1C0/020 ALL efi_info EFI 32 information (struct efi_info) |
28 | 1E0/004 ALL alk_mem_k Alternative mem check, in KB | 28 | 1E0/004 ALL alk_mem_k Alternative mem check, in KB |
29 | 1E4/004 ALL scratch Scratch field for the kernel setup code | 29 | 1E4/004 ALL scratch Scratch field for the kernel setup code |
30 | 1E8/001 ALL e820_entries Number of entries in e820_array (below) | 30 | 1E8/001 ALL e820_entries Number of entries in e820_table (below) |
31 | 1E9/001 ALL eddbuf_entries Number of entries in eddbuf (below) | 31 | 1E9/001 ALL eddbuf_entries Number of entries in eddbuf (below) |
32 | 1EA/001 ALL edd_mbr_sig_buf_entries Number of entries in edd_mbr_sig_buffer | 32 | 1EA/001 ALL edd_mbr_sig_buf_entries Number of entries in edd_mbr_sig_buffer |
33 | (below) | 33 | (below) |
34 | 1EF/001 ALL sentinel Used to detect broken bootloaders | 34 | 1EF/001 ALL sentinel Used to detect broken bootloaders |
35 | 290/040 ALL edd_mbr_sig_buffer EDD MBR signatures | 35 | 290/040 ALL edd_mbr_sig_buffer EDD MBR signatures |
36 | 2D0/A00 ALL e820_array E820 memory map table | 36 | 2D0/A00 ALL e820_table E820 memory map table |
37 | (array of struct e820_entry) | 37 | (array of struct e820_entry) |
38 | D00/1EC ALL eddbuf EDD data (array of struct edd_info) | 38 | D00/1EC ALL eddbuf EDD data (array of struct edd_info) |
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c index b5cc1e72c63a..04c406f9aee3 100644 --- a/arch/x86/boot/compressed/eboot.c +++ b/arch/x86/boot/compressed/eboot.c | |||
@@ -917,7 +917,7 @@ static void add_e820ext(struct boot_params *params, | |||
917 | static efi_status_t setup_e820(struct boot_params *params, | 917 | static efi_status_t setup_e820(struct boot_params *params, |
918 | struct setup_data *e820ext, u32 e820ext_size) | 918 | struct setup_data *e820ext, u32 e820ext_size) |
919 | { | 919 | { |
920 | struct e820_entry *e820_array = ¶ms->e820_array[0]; | 920 | struct e820_entry *e820_table = ¶ms->e820_table[0]; |
921 | struct efi_info *efi = ¶ms->efi_info; | 921 | struct efi_info *efi = ¶ms->efi_info; |
922 | struct e820_entry *prev = NULL; | 922 | struct e820_entry *prev = NULL; |
923 | u32 nr_entries; | 923 | u32 nr_entries; |
@@ -982,7 +982,7 @@ static efi_status_t setup_e820(struct boot_params *params, | |||
982 | continue; | 982 | continue; |
983 | } | 983 | } |
984 | 984 | ||
985 | if (nr_entries == ARRAY_SIZE(params->e820_array)) { | 985 | if (nr_entries == ARRAY_SIZE(params->e820_table)) { |
986 | u32 need = (nr_desc - i) * sizeof(struct e820_entry) + | 986 | u32 need = (nr_desc - i) * sizeof(struct e820_entry) + |
987 | sizeof(struct setup_data); | 987 | sizeof(struct setup_data); |
988 | 988 | ||
@@ -990,18 +990,18 @@ static efi_status_t setup_e820(struct boot_params *params, | |||
990 | return EFI_BUFFER_TOO_SMALL; | 990 | return EFI_BUFFER_TOO_SMALL; |
991 | 991 | ||
992 | /* boot_params map full, switch to e820 extended */ | 992 | /* boot_params map full, switch to e820 extended */ |
993 | e820_array = (struct e820_entry *)e820ext->data; | 993 | e820_table = (struct e820_entry *)e820ext->data; |
994 | } | 994 | } |
995 | 995 | ||
996 | e820_array->addr = d->phys_addr; | 996 | e820_table->addr = d->phys_addr; |
997 | e820_array->size = d->num_pages << PAGE_SHIFT; | 997 | e820_table->size = d->num_pages << PAGE_SHIFT; |
998 | e820_array->type = e820_type; | 998 | e820_table->type = e820_type; |
999 | prev = e820_array++; | 999 | prev = e820_table++; |
1000 | nr_entries++; | 1000 | nr_entries++; |
1001 | } | 1001 | } |
1002 | 1002 | ||
1003 | if (nr_entries > ARRAY_SIZE(params->e820_array)) { | 1003 | if (nr_entries > ARRAY_SIZE(params->e820_table)) { |
1004 | u32 nr_e820ext = nr_entries - ARRAY_SIZE(params->e820_array); | 1004 | u32 nr_e820ext = nr_entries - ARRAY_SIZE(params->e820_table); |
1005 | 1005 | ||
1006 | add_e820ext(params, e820ext, nr_e820ext); | 1006 | add_e820ext(params, e820ext, nr_e820ext); |
1007 | nr_entries -= nr_e820ext; | 1007 | nr_entries -= nr_e820ext; |
@@ -1055,9 +1055,9 @@ static efi_status_t exit_boot_func(efi_system_table_t *sys_table_arg, | |||
1055 | 1055 | ||
1056 | if (first) { | 1056 | if (first) { |
1057 | nr_desc = *map->buff_size / *map->desc_size; | 1057 | nr_desc = *map->buff_size / *map->desc_size; |
1058 | if (nr_desc > ARRAY_SIZE(p->boot_params->e820_array)) { | 1058 | if (nr_desc > ARRAY_SIZE(p->boot_params->e820_table)) { |
1059 | u32 nr_e820ext = nr_desc - | 1059 | u32 nr_e820ext = nr_desc - |
1060 | ARRAY_SIZE(p->boot_params->e820_array); | 1060 | ARRAY_SIZE(p->boot_params->e820_table); |
1061 | 1061 | ||
1062 | status = alloc_e820ext(nr_e820ext, &p->e820ext, | 1062 | status = alloc_e820ext(nr_e820ext, &p->e820ext, |
1063 | &p->e820ext_size); | 1063 | &p->e820ext_size); |
diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c index f0e37236cfe1..a47f832664f2 100644 --- a/arch/x86/boot/compressed/kaslr.c +++ b/arch/x86/boot/compressed/kaslr.c | |||
@@ -518,7 +518,7 @@ static unsigned long find_random_phys_addr(unsigned long minimum, | |||
518 | 518 | ||
519 | /* Verify potential e820 positions, appending to slots list. */ | 519 | /* Verify potential e820 positions, appending to slots list. */ |
520 | for (i = 0; i < boot_params->e820_entries; i++) { | 520 | for (i = 0; i < boot_params->e820_entries; i++) { |
521 | process_e820_entry(&boot_params->e820_array[i], minimum, | 521 | process_e820_entry(&boot_params->e820_table[i], minimum, |
522 | image_size); | 522 | image_size); |
523 | if (slot_area_index == MAX_SLOT_AREA) { | 523 | if (slot_area_index == MAX_SLOT_AREA) { |
524 | debug_putstr("Aborted e820 scan (slot_areas full)!\n"); | 524 | debug_putstr("Aborted e820 scan (slot_areas full)!\n"); |
diff --git a/arch/x86/boot/memory.c b/arch/x86/boot/memory.c index f2132b3e6880..db62445b75aa 100644 --- a/arch/x86/boot/memory.c +++ b/arch/x86/boot/memory.c | |||
@@ -21,7 +21,7 @@ static int detect_memory_e820(void) | |||
21 | { | 21 | { |
22 | int count = 0; | 22 | int count = 0; |
23 | struct biosregs ireg, oreg; | 23 | struct biosregs ireg, oreg; |
24 | struct e820_entry *desc = boot_params.e820_array; | 24 | struct e820_entry *desc = boot_params.e820_table; |
25 | static struct e820_entry buf; /* static so it is zeroed */ | 25 | static struct e820_entry buf; /* static so it is zeroed */ |
26 | 26 | ||
27 | initregs(&ireg); | 27 | initregs(&ireg); |
@@ -66,7 +66,7 @@ static int detect_memory_e820(void) | |||
66 | 66 | ||
67 | *desc++ = buf; | 67 | *desc++ = buf; |
68 | count++; | 68 | count++; |
69 | } while (ireg.ebx && count < ARRAY_SIZE(boot_params.e820_array)); | 69 | } while (ireg.ebx && count < ARRAY_SIZE(boot_params.e820_table)); |
70 | 70 | ||
71 | return boot_params.e820_entries = count; | 71 | return boot_params.e820_entries = count; |
72 | } | 72 | } |
diff --git a/arch/x86/include/asm/e820/api.h b/arch/x86/include/asm/e820/api.h index 0156532dd65a..91a5c346f765 100644 --- a/arch/x86/include/asm/e820/api.h +++ b/arch/x86/include/asm/e820/api.h | |||
@@ -4,8 +4,8 @@ | |||
4 | #include <asm/e820/types.h> | 4 | #include <asm/e820/types.h> |
5 | 5 | ||
6 | /* see comment in arch/x86/kernel/e820.c */ | 6 | /* see comment in arch/x86/kernel/e820.c */ |
7 | extern struct e820_array *e820_array; | 7 | extern struct e820_table *e820_table; |
8 | extern struct e820_array *e820_array_saved; | 8 | extern struct e820_table *e820_table_saved; |
9 | 9 | ||
10 | extern unsigned long pci_mem_start; | 10 | extern unsigned long pci_mem_start; |
11 | 11 | ||
@@ -13,7 +13,7 @@ extern int e820_any_mapped(u64 start, u64 end, unsigned type); | |||
13 | extern int e820_all_mapped(u64 start, u64 end, unsigned type); | 13 | extern int e820_all_mapped(u64 start, u64 end, unsigned type); |
14 | extern void e820_add_region(u64 start, u64 size, int type); | 14 | extern void e820_add_region(u64 start, u64 size, int type); |
15 | extern void e820_print_map(char *who); | 15 | extern void e820_print_map(char *who); |
16 | extern int sanitize_e820_array(struct e820_entry *biosmap, int max_nr_map, u32 *pnr_map); | 16 | extern int sanitize_e820_table(struct e820_entry *biosmap, int max_nr_map, u32 *pnr_map); |
17 | extern u64 e820_update_range(u64 start, u64 size, unsigned old_type, unsigned new_type); | 17 | extern u64 e820_update_range(u64 start, u64 size, unsigned old_type, unsigned new_type); |
18 | extern u64 e820_remove_range(u64 start, u64 size, unsigned old_type, int checktype); | 18 | extern u64 e820_remove_range(u64 start, u64 size, unsigned old_type, int checktype); |
19 | extern void update_e820(void); | 19 | extern void update_e820(void); |
diff --git a/arch/x86/include/asm/e820/types.h b/arch/x86/include/asm/e820/types.h index e3171867e126..ae2c4e9db0d4 100644 --- a/arch/x86/include/asm/e820/types.h +++ b/arch/x86/include/asm/e820/types.h | |||
@@ -21,7 +21,7 @@ | |||
21 | * | 21 | * |
22 | * This allows for bootstrap/firmware quirks such as possible duplicate | 22 | * This allows for bootstrap/firmware quirks such as possible duplicate |
23 | * E820 entries that might need room in the same arrays, prior to the | 23 | * E820 entries that might need room in the same arrays, prior to the |
24 | * call to sanitize_e820_array() to remove duplicates. The allowance | 24 | * call to sanitize_e820_table() to remove duplicates. The allowance |
25 | * of three memory map entries per node is "enough" entries for | 25 | * of three memory map entries per node is "enough" entries for |
26 | * the initial hardware platform motivating this mechanism to make | 26 | * the initial hardware platform motivating this mechanism to make |
27 | * use of additional EFI map entries. Future platforms may want | 27 | * use of additional EFI map entries. Future platforms may want |
@@ -68,7 +68,7 @@ | |||
68 | /* | 68 | /* |
69 | * The whole array of E820 entries: | 69 | * The whole array of E820 entries: |
70 | */ | 70 | */ |
71 | struct e820_array { | 71 | struct e820_table { |
72 | __u32 nr_map; | 72 | __u32 nr_map; |
73 | struct e820_entry map[E820_X_MAX]; | 73 | struct e820_entry map[E820_X_MAX]; |
74 | }; | 74 | }; |
diff --git a/arch/x86/include/uapi/asm/bootparam.h b/arch/x86/include/uapi/asm/bootparam.h index 702f1c6d804e..5f41518f7159 100644 --- a/arch/x86/include/uapi/asm/bootparam.h +++ b/arch/x86/include/uapi/asm/bootparam.h | |||
@@ -152,7 +152,7 @@ struct boot_params { | |||
152 | struct setup_header hdr; /* setup header */ /* 0x1f1 */ | 152 | struct setup_header hdr; /* setup header */ /* 0x1f1 */ |
153 | __u8 _pad7[0x290-0x1f1-sizeof(struct setup_header)]; | 153 | __u8 _pad7[0x290-0x1f1-sizeof(struct setup_header)]; |
154 | __u32 edd_mbr_sig_buffer[EDD_MBR_SIG_MAX]; /* 0x290 */ | 154 | __u32 edd_mbr_sig_buffer[EDD_MBR_SIG_MAX]; /* 0x290 */ |
155 | struct e820_entry e820_array[E820MAX]; /* 0x2d0 */ | 155 | struct e820_entry e820_table[E820MAX]; /* 0x2d0 */ |
156 | __u8 _pad8[48]; /* 0xcd0 */ | 156 | __u8 _pad8[48]; /* 0xcd0 */ |
157 | struct edd_info eddbuf[EDDMAXNR]; /* 0xd00 */ | 157 | struct edd_info eddbuf[EDDMAXNR]; /* 0xd00 */ |
158 | __u8 _pad9[276]; /* 0xeec */ | 158 | __u8 _pad9[276]; /* 0xeec */ |
diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c index 036d9140384d..11f7eb1e2506 100644 --- a/arch/x86/kernel/crash.c +++ b/arch/x86/kernel/crash.c | |||
@@ -512,7 +512,7 @@ static int add_e820_entry(struct boot_params *params, struct e820_entry *entry) | |||
512 | if (nr_e820_entries >= E820MAX) | 512 | if (nr_e820_entries >= E820MAX) |
513 | return 1; | 513 | return 1; |
514 | 514 | ||
515 | memcpy(¶ms->e820_array[nr_e820_entries], entry, | 515 | memcpy(¶ms->e820_table[nr_e820_entries], entry, |
516 | sizeof(struct e820_entry)); | 516 | sizeof(struct e820_entry)); |
517 | params->e820_entries++; | 517 | params->e820_entries++; |
518 | return 0; | 518 | return 0; |
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index 49d47d6b1afe..ffaf94357d15 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * Handle the memory map. | 2 | * Handle the memory map. |
3 | * The functions here do the job until bootmem takes over. | 3 | * The functions here do the job until bootmem takes over. |
4 | * | 4 | * |
5 | * Getting sanitize_e820_array() in sync with i386 version by applying change: | 5 | * Getting sanitize_e820_table() in sync with i386 version by applying change: |
6 | * - Provisions for empty E820 memory regions (reported by certain BIOSes). | 6 | * - Provisions for empty E820 memory regions (reported by certain BIOSes). |
7 | * Alex Achenbach <xela@slit.de>, December 2002. | 7 | * Alex Achenbach <xela@slit.de>, December 2002. |
8 | * Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> | 8 | * Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> |
@@ -31,7 +31,7 @@ | |||
31 | * and that is also registered with modifications in the kernel resource tree | 31 | * and that is also registered with modifications in the kernel resource tree |
32 | * with the iomem_resource as parent. | 32 | * with the iomem_resource as parent. |
33 | * | 33 | * |
34 | * The e820_array_saved is directly saved after the BIOS-provided memory map is | 34 | * The e820_table_saved is directly saved after the BIOS-provided memory map is |
35 | * copied. It doesn't get modified afterwards. It's registered for the | 35 | * copied. It doesn't get modified afterwards. It's registered for the |
36 | * /sys/firmware/memmap interface. | 36 | * /sys/firmware/memmap interface. |
37 | * | 37 | * |
@@ -40,10 +40,10 @@ | |||
40 | * user can e.g. boot the original kernel with mem=1G while still booting the | 40 | * user can e.g. boot the original kernel with mem=1G while still booting the |
41 | * next kernel with full memory. | 41 | * next kernel with full memory. |
42 | */ | 42 | */ |
43 | static struct e820_array e820_array_init __initdata; | 43 | static struct e820_table e820_table_init __initdata; |
44 | static struct e820_array initial_e820_array_saved __initdata; | 44 | static struct e820_table initial_e820_table_saved __initdata; |
45 | struct e820_array *e820_array __refdata = &e820_array_init; | 45 | struct e820_table *e820_table __refdata = &e820_table_init; |
46 | struct e820_array *e820_array_saved __refdata = &initial_e820_array_saved; | 46 | struct e820_table *e820_table_saved __refdata = &initial_e820_table_saved; |
47 | 47 | ||
48 | /* For PCI or other memory-mapped resources */ | 48 | /* For PCI or other memory-mapped resources */ |
49 | unsigned long pci_mem_start = 0xaeedbabe; | 49 | unsigned long pci_mem_start = 0xaeedbabe; |
@@ -60,8 +60,8 @@ e820_any_mapped(u64 start, u64 end, unsigned type) | |||
60 | { | 60 | { |
61 | int i; | 61 | int i; |
62 | 62 | ||
63 | for (i = 0; i < e820_array->nr_map; i++) { | 63 | for (i = 0; i < e820_table->nr_map; i++) { |
64 | struct e820_entry *ei = &e820_array->map[i]; | 64 | struct e820_entry *ei = &e820_table->map[i]; |
65 | 65 | ||
66 | if (type && ei->type != type) | 66 | if (type && ei->type != type) |
67 | continue; | 67 | continue; |
@@ -83,8 +83,8 @@ int __init e820_all_mapped(u64 start, u64 end, unsigned type) | |||
83 | { | 83 | { |
84 | int i; | 84 | int i; |
85 | 85 | ||
86 | for (i = 0; i < e820_array->nr_map; i++) { | 86 | for (i = 0; i < e820_table->nr_map; i++) { |
87 | struct e820_entry *ei = &e820_array->map[i]; | 87 | struct e820_entry *ei = &e820_table->map[i]; |
88 | 88 | ||
89 | if (type && ei->type != type) | 89 | if (type && ei->type != type) |
90 | continue; | 90 | continue; |
@@ -110,7 +110,7 @@ int __init e820_all_mapped(u64 start, u64 end, unsigned type) | |||
110 | /* | 110 | /* |
111 | * Add a memory region to the kernel e820 map. | 111 | * Add a memory region to the kernel e820 map. |
112 | */ | 112 | */ |
113 | static void __init __e820_add_region(struct e820_array *e820x, u64 start, u64 size, | 113 | static void __init __e820_add_region(struct e820_table *e820x, u64 start, u64 size, |
114 | int type) | 114 | int type) |
115 | { | 115 | { |
116 | int x = e820x->nr_map; | 116 | int x = e820x->nr_map; |
@@ -130,7 +130,7 @@ static void __init __e820_add_region(struct e820_array *e820x, u64 start, u64 si | |||
130 | 130 | ||
131 | void __init e820_add_region(u64 start, u64 size, int type) | 131 | void __init e820_add_region(u64 start, u64 size, int type) |
132 | { | 132 | { |
133 | __e820_add_region(e820_array, start, size, type); | 133 | __e820_add_region(e820_table, start, size, type); |
134 | } | 134 | } |
135 | 135 | ||
136 | static void __init e820_print_type(u32 type) | 136 | static void __init e820_print_type(u32 type) |
@@ -166,12 +166,12 @@ void __init e820_print_map(char *who) | |||
166 | { | 166 | { |
167 | int i; | 167 | int i; |
168 | 168 | ||
169 | for (i = 0; i < e820_array->nr_map; i++) { | 169 | for (i = 0; i < e820_table->nr_map; i++) { |
170 | printk(KERN_INFO "%s: [mem %#018Lx-%#018Lx] ", who, | 170 | printk(KERN_INFO "%s: [mem %#018Lx-%#018Lx] ", who, |
171 | (unsigned long long) e820_array->map[i].addr, | 171 | (unsigned long long) e820_table->map[i].addr, |
172 | (unsigned long long) | 172 | (unsigned long long) |
173 | (e820_array->map[i].addr + e820_array->map[i].size - 1)); | 173 | (e820_table->map[i].addr + e820_table->map[i].size - 1)); |
174 | e820_print_type(e820_array->map[i].type); | 174 | e820_print_type(e820_table->map[i].type); |
175 | printk(KERN_CONT "\n"); | 175 | printk(KERN_CONT "\n"); |
176 | } | 176 | } |
177 | } | 177 | } |
@@ -195,7 +195,7 @@ void __init e820_print_map(char *who) | |||
195 | * sanitizing succeeds the *pnr_map will be updated with the new | 195 | * sanitizing succeeds the *pnr_map will be updated with the new |
196 | * number of valid entries (something no more than max_nr_map). | 196 | * number of valid entries (something no more than max_nr_map). |
197 | * | 197 | * |
198 | * The return value from sanitize_e820_array() is zero if it | 198 | * The return value from sanitize_e820_table() is zero if it |
199 | * successfully 'sanitized' the map entries passed in, and is -1 | 199 | * successfully 'sanitized' the map entries passed in, and is -1 |
200 | * if it did nothing, which can happen if either of (1) it was | 200 | * if it did nothing, which can happen if either of (1) it was |
201 | * only passed one map entry, or (2) any of the input map entries | 201 | * only passed one map entry, or (2) any of the input map entries |
@@ -259,7 +259,7 @@ static int __init cpcompare(const void *a, const void *b) | |||
259 | return (ap->addr != ap->pbios->addr) - (bp->addr != bp->pbios->addr); | 259 | return (ap->addr != ap->pbios->addr) - (bp->addr != bp->pbios->addr); |
260 | } | 260 | } |
261 | 261 | ||
262 | int __init sanitize_e820_array(struct e820_entry *biosmap, int max_nr_map, | 262 | int __init sanitize_e820_table(struct e820_entry *biosmap, int max_nr_map, |
263 | u32 *pnr_map) | 263 | u32 *pnr_map) |
264 | { | 264 | { |
265 | static struct change_member change_point_list[2*E820_X_MAX] __initdata; | 265 | static struct change_member change_point_list[2*E820_X_MAX] __initdata; |
@@ -385,7 +385,7 @@ int __init sanitize_e820_array(struct e820_entry *biosmap, int max_nr_map, | |||
385 | return 0; | 385 | return 0; |
386 | } | 386 | } |
387 | 387 | ||
388 | static int __init __append_e820_array(struct e820_entry *biosmap, int nr_map) | 388 | static int __init __append_e820_table(struct e820_entry *biosmap, int nr_map) |
389 | { | 389 | { |
390 | while (nr_map) { | 390 | while (nr_map) { |
391 | u64 start = biosmap->addr; | 391 | u64 start = biosmap->addr; |
@@ -414,16 +414,16 @@ static int __init __append_e820_array(struct e820_entry *biosmap, int nr_map) | |||
414 | * will have given us a memory map that we can use to properly | 414 | * will have given us a memory map that we can use to properly |
415 | * set up memory. If we aren't, we'll fake a memory map. | 415 | * set up memory. If we aren't, we'll fake a memory map. |
416 | */ | 416 | */ |
417 | static int __init append_e820_array(struct e820_entry *biosmap, int nr_map) | 417 | static int __init append_e820_table(struct e820_entry *biosmap, int nr_map) |
418 | { | 418 | { |
419 | /* Only one memory region (or negative)? Ignore it */ | 419 | /* Only one memory region (or negative)? Ignore it */ |
420 | if (nr_map < 2) | 420 | if (nr_map < 2) |
421 | return -1; | 421 | return -1; |
422 | 422 | ||
423 | return __append_e820_array(biosmap, nr_map); | 423 | return __append_e820_table(biosmap, nr_map); |
424 | } | 424 | } |
425 | 425 | ||
426 | static u64 __init __e820_update_range(struct e820_array *e820x, u64 start, | 426 | static u64 __init __e820_update_range(struct e820_table *e820x, u64 start, |
427 | u64 size, unsigned old_type, | 427 | u64 size, unsigned old_type, |
428 | unsigned new_type) | 428 | unsigned new_type) |
429 | { | 429 | { |
@@ -495,13 +495,13 @@ static u64 __init __e820_update_range(struct e820_array *e820x, u64 start, | |||
495 | u64 __init e820_update_range(u64 start, u64 size, unsigned old_type, | 495 | u64 __init e820_update_range(u64 start, u64 size, unsigned old_type, |
496 | unsigned new_type) | 496 | unsigned new_type) |
497 | { | 497 | { |
498 | return __e820_update_range(e820_array, start, size, old_type, new_type); | 498 | return __e820_update_range(e820_table, start, size, old_type, new_type); |
499 | } | 499 | } |
500 | 500 | ||
501 | static u64 __init e820_update_range_saved(u64 start, u64 size, | 501 | static u64 __init e820_update_range_saved(u64 start, u64 size, |
502 | unsigned old_type, unsigned new_type) | 502 | unsigned old_type, unsigned new_type) |
503 | { | 503 | { |
504 | return __e820_update_range(e820_array_saved, start, size, old_type, | 504 | return __e820_update_range(e820_table_saved, start, size, old_type, |
505 | new_type); | 505 | new_type); |
506 | } | 506 | } |
507 | 507 | ||
@@ -523,8 +523,8 @@ u64 __init e820_remove_range(u64 start, u64 size, unsigned old_type, | |||
523 | e820_print_type(old_type); | 523 | e820_print_type(old_type); |
524 | printk(KERN_CONT "\n"); | 524 | printk(KERN_CONT "\n"); |
525 | 525 | ||
526 | for (i = 0; i < e820_array->nr_map; i++) { | 526 | for (i = 0; i < e820_table->nr_map; i++) { |
527 | struct e820_entry *ei = &e820_array->map[i]; | 527 | struct e820_entry *ei = &e820_table->map[i]; |
528 | u64 final_start, final_end; | 528 | u64 final_start, final_end; |
529 | u64 ei_end; | 529 | u64 ei_end; |
530 | 530 | ||
@@ -568,15 +568,15 @@ u64 __init e820_remove_range(u64 start, u64 size, unsigned old_type, | |||
568 | 568 | ||
569 | void __init update_e820(void) | 569 | void __init update_e820(void) |
570 | { | 570 | { |
571 | if (sanitize_e820_array(e820_array->map, ARRAY_SIZE(e820_array->map), &e820_array->nr_map)) | 571 | if (sanitize_e820_table(e820_table->map, ARRAY_SIZE(e820_table->map), &e820_table->nr_map)) |
572 | return; | 572 | return; |
573 | printk(KERN_INFO "e820: modified physical RAM map:\n"); | 573 | printk(KERN_INFO "e820: modified physical RAM map:\n"); |
574 | e820_print_map("modified"); | 574 | e820_print_map("modified"); |
575 | } | 575 | } |
576 | static void __init update_e820_array_saved(void) | 576 | static void __init update_e820_table_saved(void) |
577 | { | 577 | { |
578 | sanitize_e820_array(e820_array_saved->map, ARRAY_SIZE(e820_array_saved->map), | 578 | sanitize_e820_table(e820_table_saved->map, ARRAY_SIZE(e820_table_saved->map), |
579 | &e820_array_saved->nr_map); | 579 | &e820_table_saved->nr_map); |
580 | } | 580 | } |
581 | #define MAX_GAP_END 0x100000000ull | 581 | #define MAX_GAP_END 0x100000000ull |
582 | /* | 582 | /* |
@@ -586,12 +586,12 @@ static int __init e820_search_gap(unsigned long *gapstart, | |||
586 | unsigned long *gapsize) | 586 | unsigned long *gapsize) |
587 | { | 587 | { |
588 | unsigned long long last = MAX_GAP_END; | 588 | unsigned long long last = MAX_GAP_END; |
589 | int i = e820_array->nr_map; | 589 | int i = e820_table->nr_map; |
590 | int found = 0; | 590 | int found = 0; |
591 | 591 | ||
592 | while (--i >= 0) { | 592 | while (--i >= 0) { |
593 | unsigned long long start = e820_array->map[i].addr; | 593 | unsigned long long start = e820_table->map[i].addr; |
594 | unsigned long long end = start + e820_array->map[i].size; | 594 | unsigned long long end = start + e820_table->map[i].size; |
595 | 595 | ||
596 | /* | 596 | /* |
597 | * Since "last" is at most 4GB, we know we'll | 597 | * Since "last" is at most 4GB, we know we'll |
@@ -650,7 +650,7 @@ __init void e820_setup_gap(void) | |||
650 | /* | 650 | /* |
651 | * Called late during init, in free_initmem(). | 651 | * Called late during init, in free_initmem(). |
652 | * | 652 | * |
653 | * Initial e820 and e820_array_saved are largish __initdata arrays. | 653 | * Initial e820 and e820_table_saved are largish __initdata arrays. |
654 | * Copy them to (usually much smaller) dynamically allocated area. | 654 | * Copy them to (usually much smaller) dynamically allocated area. |
655 | * This is done after all tweaks we ever do to them: | 655 | * This is done after all tweaks we ever do to them: |
656 | * all functions which modify them are __init functions, | 656 | * all functions which modify them are __init functions, |
@@ -658,26 +658,26 @@ __init void e820_setup_gap(void) | |||
658 | */ | 658 | */ |
659 | __init void e820_reallocate_tables(void) | 659 | __init void e820_reallocate_tables(void) |
660 | { | 660 | { |
661 | struct e820_array *n; | 661 | struct e820_table *n; |
662 | int size; | 662 | int size; |
663 | 663 | ||
664 | size = offsetof(struct e820_array, map) + sizeof(struct e820_entry) * e820_array->nr_map; | 664 | size = offsetof(struct e820_table, map) + sizeof(struct e820_entry) * e820_table->nr_map; |
665 | n = kmalloc(size, GFP_KERNEL); | 665 | n = kmalloc(size, GFP_KERNEL); |
666 | BUG_ON(!n); | 666 | BUG_ON(!n); |
667 | memcpy(n, e820_array, size); | 667 | memcpy(n, e820_table, size); |
668 | e820_array = n; | 668 | e820_table = n; |
669 | 669 | ||
670 | size = offsetof(struct e820_array, map) + sizeof(struct e820_entry) * e820_array_saved->nr_map; | 670 | size = offsetof(struct e820_table, map) + sizeof(struct e820_entry) * e820_table_saved->nr_map; |
671 | n = kmalloc(size, GFP_KERNEL); | 671 | n = kmalloc(size, GFP_KERNEL); |
672 | BUG_ON(!n); | 672 | BUG_ON(!n); |
673 | memcpy(n, e820_array_saved, size); | 673 | memcpy(n, e820_table_saved, size); |
674 | e820_array_saved = n; | 674 | e820_table_saved = n; |
675 | } | 675 | } |
676 | 676 | ||
677 | /** | 677 | /** |
678 | * Because of the size limitation of struct boot_params, only first | 678 | * Because of the size limitation of struct boot_params, only first |
679 | * 128 E820 memory entries are passed to kernel via | 679 | * 128 E820 memory entries are passed to kernel via |
680 | * boot_params.e820_array, others are passed via SETUP_E820_EXT node of | 680 | * boot_params.e820_table, others are passed via SETUP_E820_EXT node of |
681 | * linked list of struct setup_data, which is parsed here. | 681 | * linked list of struct setup_data, which is parsed here. |
682 | */ | 682 | */ |
683 | void __init parse_e820_ext(u64 phys_addr, u32 data_len) | 683 | void __init parse_e820_ext(u64 phys_addr, u32 data_len) |
@@ -689,8 +689,8 @@ void __init parse_e820_ext(u64 phys_addr, u32 data_len) | |||
689 | sdata = early_memremap(phys_addr, data_len); | 689 | sdata = early_memremap(phys_addr, data_len); |
690 | entries = sdata->len / sizeof(struct e820_entry); | 690 | entries = sdata->len / sizeof(struct e820_entry); |
691 | extmap = (struct e820_entry *)(sdata->data); | 691 | extmap = (struct e820_entry *)(sdata->data); |
692 | __append_e820_array(extmap, entries); | 692 | __append_e820_table(extmap, entries); |
693 | sanitize_e820_array(e820_array->map, ARRAY_SIZE(e820_array->map), &e820_array->nr_map); | 693 | sanitize_e820_table(e820_table->map, ARRAY_SIZE(e820_table->map), &e820_table->nr_map); |
694 | early_memunmap(sdata, data_len); | 694 | early_memunmap(sdata, data_len); |
695 | printk(KERN_INFO "e820: extended physical RAM map:\n"); | 695 | printk(KERN_INFO "e820: extended physical RAM map:\n"); |
696 | e820_print_map("extended"); | 696 | e820_print_map("extended"); |
@@ -709,8 +709,8 @@ void __init e820_mark_nosave_regions(unsigned long limit_pfn) | |||
709 | int i; | 709 | int i; |
710 | unsigned long pfn = 0; | 710 | unsigned long pfn = 0; |
711 | 711 | ||
712 | for (i = 0; i < e820_array->nr_map; i++) { | 712 | for (i = 0; i < e820_table->nr_map; i++) { |
713 | struct e820_entry *ei = &e820_array->map[i]; | 713 | struct e820_entry *ei = &e820_table->map[i]; |
714 | 714 | ||
715 | if (pfn < PFN_UP(ei->addr)) | 715 | if (pfn < PFN_UP(ei->addr)) |
716 | register_nosave_region(pfn, PFN_UP(ei->addr)); | 716 | register_nosave_region(pfn, PFN_UP(ei->addr)); |
@@ -734,8 +734,8 @@ static int __init e820_mark_nvs_memory(void) | |||
734 | { | 734 | { |
735 | int i; | 735 | int i; |
736 | 736 | ||
737 | for (i = 0; i < e820_array->nr_map; i++) { | 737 | for (i = 0; i < e820_table->nr_map; i++) { |
738 | struct e820_entry *ei = &e820_array->map[i]; | 738 | struct e820_entry *ei = &e820_table->map[i]; |
739 | 739 | ||
740 | if (ei->type == E820_NVS) | 740 | if (ei->type == E820_NVS) |
741 | acpi_nvs_register(ei->addr, ei->size); | 741 | acpi_nvs_register(ei->addr, ei->size); |
@@ -747,7 +747,7 @@ core_initcall(e820_mark_nvs_memory); | |||
747 | #endif | 747 | #endif |
748 | 748 | ||
749 | /* | 749 | /* |
750 | * pre allocated 4k and reserved it in memblock and e820_array_saved | 750 | * pre allocated 4k and reserved it in memblock and e820_table_saved |
751 | */ | 751 | */ |
752 | u64 __init early_reserve_e820(u64 size, u64 align) | 752 | u64 __init early_reserve_e820(u64 size, u64 align) |
753 | { | 753 | { |
@@ -756,8 +756,8 @@ u64 __init early_reserve_e820(u64 size, u64 align) | |||
756 | addr = __memblock_alloc_base(size, align, MEMBLOCK_ALLOC_ACCESSIBLE); | 756 | addr = __memblock_alloc_base(size, align, MEMBLOCK_ALLOC_ACCESSIBLE); |
757 | if (addr) { | 757 | if (addr) { |
758 | e820_update_range_saved(addr, size, E820_RAM, E820_RESERVED); | 758 | e820_update_range_saved(addr, size, E820_RAM, E820_RESERVED); |
759 | printk(KERN_INFO "e820: update e820_array_saved for early_reserve_e820\n"); | 759 | printk(KERN_INFO "e820: update e820_table_saved for early_reserve_e820\n"); |
760 | update_e820_array_saved(); | 760 | update_e820_table_saved(); |
761 | } | 761 | } |
762 | 762 | ||
763 | return addr; | 763 | return addr; |
@@ -782,8 +782,8 @@ static unsigned long __init e820_end_pfn(unsigned long limit_pfn, unsigned type) | |||
782 | unsigned long last_pfn = 0; | 782 | unsigned long last_pfn = 0; |
783 | unsigned long max_arch_pfn = MAX_ARCH_PFN; | 783 | unsigned long max_arch_pfn = MAX_ARCH_PFN; |
784 | 784 | ||
785 | for (i = 0; i < e820_array->nr_map; i++) { | 785 | for (i = 0; i < e820_table->nr_map; i++) { |
786 | struct e820_entry *ei = &e820_array->map[i]; | 786 | struct e820_entry *ei = &e820_table->map[i]; |
787 | unsigned long start_pfn; | 787 | unsigned long start_pfn; |
788 | unsigned long end_pfn; | 788 | unsigned long end_pfn; |
789 | 789 | ||
@@ -874,7 +874,7 @@ static int __init parse_memmap_one(char *p) | |||
874 | */ | 874 | */ |
875 | saved_max_pfn = e820_end_of_ram_pfn(); | 875 | saved_max_pfn = e820_end_of_ram_pfn(); |
876 | #endif | 876 | #endif |
877 | e820_array->nr_map = 0; | 877 | e820_table->nr_map = 0; |
878 | userdef = 1; | 878 | userdef = 1; |
879 | return 0; | 879 | return 0; |
880 | } | 880 | } |
@@ -921,8 +921,8 @@ early_param("memmap", parse_memmap_opt); | |||
921 | void __init finish_e820_parsing(void) | 921 | void __init finish_e820_parsing(void) |
922 | { | 922 | { |
923 | if (userdef) { | 923 | if (userdef) { |
924 | if (sanitize_e820_array(e820_array->map, ARRAY_SIZE(e820_array->map), | 924 | if (sanitize_e820_table(e820_table->map, ARRAY_SIZE(e820_table->map), |
925 | &e820_array->nr_map) < 0) | 925 | &e820_table->nr_map) < 0) |
926 | early_panic("Invalid user supplied memory map"); | 926 | early_panic("Invalid user supplied memory map"); |
927 | 927 | ||
928 | printk(KERN_INFO "e820: user-defined physical RAM map:\n"); | 928 | printk(KERN_INFO "e820: user-defined physical RAM map:\n"); |
@@ -1009,35 +1009,35 @@ void __init e820_reserve_resources(void) | |||
1009 | struct resource *res; | 1009 | struct resource *res; |
1010 | u64 end; | 1010 | u64 end; |
1011 | 1011 | ||
1012 | res = alloc_bootmem(sizeof(struct resource) * e820_array->nr_map); | 1012 | res = alloc_bootmem(sizeof(struct resource) * e820_table->nr_map); |
1013 | e820_res = res; | 1013 | e820_res = res; |
1014 | for (i = 0; i < e820_array->nr_map; i++) { | 1014 | for (i = 0; i < e820_table->nr_map; i++) { |
1015 | end = e820_array->map[i].addr + e820_array->map[i].size - 1; | 1015 | end = e820_table->map[i].addr + e820_table->map[i].size - 1; |
1016 | if (end != (resource_size_t)end) { | 1016 | if (end != (resource_size_t)end) { |
1017 | res++; | 1017 | res++; |
1018 | continue; | 1018 | continue; |
1019 | } | 1019 | } |
1020 | res->name = e820_type_to_string(e820_array->map[i].type); | 1020 | res->name = e820_type_to_string(e820_table->map[i].type); |
1021 | res->start = e820_array->map[i].addr; | 1021 | res->start = e820_table->map[i].addr; |
1022 | res->end = end; | 1022 | res->end = end; |
1023 | 1023 | ||
1024 | res->flags = e820_type_to_iomem_type(e820_array->map[i].type); | 1024 | res->flags = e820_type_to_iomem_type(e820_table->map[i].type); |
1025 | res->desc = e820_type_to_iores_desc(e820_array->map[i].type); | 1025 | res->desc = e820_type_to_iores_desc(e820_table->map[i].type); |
1026 | 1026 | ||
1027 | /* | 1027 | /* |
1028 | * don't register the region that could be conflicted with | 1028 | * don't register the region that could be conflicted with |
1029 | * pci device BAR resource and insert them later in | 1029 | * pci device BAR resource and insert them later in |
1030 | * pcibios_resource_survey() | 1030 | * pcibios_resource_survey() |
1031 | */ | 1031 | */ |
1032 | if (do_mark_busy(e820_array->map[i].type, res)) { | 1032 | if (do_mark_busy(e820_table->map[i].type, res)) { |
1033 | res->flags |= IORESOURCE_BUSY; | 1033 | res->flags |= IORESOURCE_BUSY; |
1034 | insert_resource(&iomem_resource, res); | 1034 | insert_resource(&iomem_resource, res); |
1035 | } | 1035 | } |
1036 | res++; | 1036 | res++; |
1037 | } | 1037 | } |
1038 | 1038 | ||
1039 | for (i = 0; i < e820_array_saved->nr_map; i++) { | 1039 | for (i = 0; i < e820_table_saved->nr_map; i++) { |
1040 | struct e820_entry *entry = &e820_array_saved->map[i]; | 1040 | struct e820_entry *entry = &e820_table_saved->map[i]; |
1041 | firmware_map_add_early(entry->addr, | 1041 | firmware_map_add_early(entry->addr, |
1042 | entry->addr + entry->size, | 1042 | entry->addr + entry->size, |
1043 | e820_type_to_string(entry->type)); | 1043 | e820_type_to_string(entry->type)); |
@@ -1069,7 +1069,7 @@ void __init e820_reserve_resources_late(void) | |||
1069 | struct resource *res; | 1069 | struct resource *res; |
1070 | 1070 | ||
1071 | res = e820_res; | 1071 | res = e820_res; |
1072 | for (i = 0; i < e820_array->nr_map; i++) { | 1072 | for (i = 0; i < e820_table->nr_map; i++) { |
1073 | if (!res->parent && res->end) | 1073 | if (!res->parent && res->end) |
1074 | insert_resource_expand_to_fit(&iomem_resource, res); | 1074 | insert_resource_expand_to_fit(&iomem_resource, res); |
1075 | res++; | 1075 | res++; |
@@ -1079,8 +1079,8 @@ void __init e820_reserve_resources_late(void) | |||
1079 | * Try to bump up RAM regions to reasonable boundaries to | 1079 | * Try to bump up RAM regions to reasonable boundaries to |
1080 | * avoid stolen RAM: | 1080 | * avoid stolen RAM: |
1081 | */ | 1081 | */ |
1082 | for (i = 0; i < e820_array->nr_map; i++) { | 1082 | for (i = 0; i < e820_table->nr_map; i++) { |
1083 | struct e820_entry *entry = &e820_array->map[i]; | 1083 | struct e820_entry *entry = &e820_table->map[i]; |
1084 | u64 start, end; | 1084 | u64 start, end; |
1085 | 1085 | ||
1086 | if (entry->type != E820_RAM) | 1086 | if (entry->type != E820_RAM) |
@@ -1110,11 +1110,11 @@ char *__init default_machine_specific_memory_setup(void) | |||
1110 | * the next section from 1mb->appropriate_mem_k | 1110 | * the next section from 1mb->appropriate_mem_k |
1111 | */ | 1111 | */ |
1112 | new_nr = boot_params.e820_entries; | 1112 | new_nr = boot_params.e820_entries; |
1113 | sanitize_e820_array(boot_params.e820_array, | 1113 | sanitize_e820_table(boot_params.e820_table, |
1114 | ARRAY_SIZE(boot_params.e820_array), | 1114 | ARRAY_SIZE(boot_params.e820_table), |
1115 | &new_nr); | 1115 | &new_nr); |
1116 | boot_params.e820_entries = new_nr; | 1116 | boot_params.e820_entries = new_nr; |
1117 | if (append_e820_array(boot_params.e820_array, boot_params.e820_entries) | 1117 | if (append_e820_table(boot_params.e820_table, boot_params.e820_entries) |
1118 | < 0) { | 1118 | < 0) { |
1119 | u64 mem_size; | 1119 | u64 mem_size; |
1120 | 1120 | ||
@@ -1128,7 +1128,7 @@ char *__init default_machine_specific_memory_setup(void) | |||
1128 | who = "BIOS-e801"; | 1128 | who = "BIOS-e801"; |
1129 | } | 1129 | } |
1130 | 1130 | ||
1131 | e820_array->nr_map = 0; | 1131 | e820_table->nr_map = 0; |
1132 | e820_add_region(0, LOWMEMSIZE(), E820_RAM); | 1132 | e820_add_region(0, LOWMEMSIZE(), E820_RAM); |
1133 | e820_add_region(HIGH_MEMORY, mem_size << 10, E820_RAM); | 1133 | e820_add_region(HIGH_MEMORY, mem_size << 10, E820_RAM); |
1134 | } | 1134 | } |
@@ -1142,7 +1142,7 @@ void __init setup_memory_map(void) | |||
1142 | char *who; | 1142 | char *who; |
1143 | 1143 | ||
1144 | who = x86_init.resources.memory_setup(); | 1144 | who = x86_init.resources.memory_setup(); |
1145 | memcpy(e820_array_saved, e820_array, sizeof(struct e820_array)); | 1145 | memcpy(e820_table_saved, e820_table, sizeof(struct e820_table)); |
1146 | printk(KERN_INFO "e820: BIOS-provided physical RAM map:\n"); | 1146 | printk(KERN_INFO "e820: BIOS-provided physical RAM map:\n"); |
1147 | e820_print_map(who); | 1147 | e820_print_map(who); |
1148 | } | 1148 | } |
@@ -1159,8 +1159,8 @@ void __init memblock_x86_fill(void) | |||
1159 | */ | 1159 | */ |
1160 | memblock_allow_resize(); | 1160 | memblock_allow_resize(); |
1161 | 1161 | ||
1162 | for (i = 0; i < e820_array->nr_map; i++) { | 1162 | for (i = 0; i < e820_table->nr_map; i++) { |
1163 | struct e820_entry *ei = &e820_array->map[i]; | 1163 | struct e820_entry *ei = &e820_table->map[i]; |
1164 | 1164 | ||
1165 | end = ei->addr + ei->size; | 1165 | end = ei->addr + ei->size; |
1166 | if (end != (resource_size_t)end) | 1166 | if (end != (resource_size_t)end) |
diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c index 31d755534c36..a6cdf9b9c7a9 100644 --- a/arch/x86/kernel/early-quirks.c +++ b/arch/x86/kernel/early-quirks.c | |||
@@ -547,7 +547,7 @@ intel_graphics_stolen(int num, int slot, int func, | |||
547 | 547 | ||
548 | /* Mark this space as reserved */ | 548 | /* Mark this space as reserved */ |
549 | e820_add_region(base, size, E820_RESERVED); | 549 | e820_add_region(base, size, E820_RESERVED); |
550 | sanitize_e820_array(e820_array->map, ARRAY_SIZE(e820_array->map), &e820_array->nr_map); | 550 | sanitize_e820_table(e820_table->map, ARRAY_SIZE(e820_table->map), &e820_table->nr_map); |
551 | } | 551 | } |
552 | 552 | ||
553 | static void __init intel_graphics_quirks(int num, int slot, int func) | 553 | static void __init intel_graphics_quirks(int num, int slot, int func) |
diff --git a/arch/x86/kernel/kexec-bzimage64.c b/arch/x86/kernel/kexec-bzimage64.c index 6bedcb9bad1e..39d340ac50eb 100644 --- a/arch/x86/kernel/kexec-bzimage64.c +++ b/arch/x86/kernel/kexec-bzimage64.c | |||
@@ -100,14 +100,14 @@ static int setup_e820_entries(struct boot_params *params) | |||
100 | { | 100 | { |
101 | unsigned int nr_e820_entries; | 101 | unsigned int nr_e820_entries; |
102 | 102 | ||
103 | nr_e820_entries = e820_array_saved->nr_map; | 103 | nr_e820_entries = e820_table_saved->nr_map; |
104 | 104 | ||
105 | /* TODO: Pass entries more than E820MAX in bootparams setup data */ | 105 | /* TODO: Pass entries more than E820MAX in bootparams setup data */ |
106 | if (nr_e820_entries > E820MAX) | 106 | if (nr_e820_entries > E820MAX) |
107 | nr_e820_entries = E820MAX; | 107 | nr_e820_entries = E820MAX; |
108 | 108 | ||
109 | params->e820_entries = nr_e820_entries; | 109 | params->e820_entries = nr_e820_entries; |
110 | memcpy(¶ms->e820_array, &e820_array_saved->map, | 110 | memcpy(¶ms->e820_table, &e820_table_saved->map, |
111 | nr_e820_entries * sizeof(struct e820_entry)); | 111 | nr_e820_entries * sizeof(struct e820_entry)); |
112 | 112 | ||
113 | return 0; | 113 | return 0; |
@@ -233,10 +233,10 @@ setup_boot_parameters(struct kimage *image, struct boot_params *params, | |||
233 | nr_e820_entries = params->e820_entries; | 233 | nr_e820_entries = params->e820_entries; |
234 | 234 | ||
235 | for (i = 0; i < nr_e820_entries; i++) { | 235 | for (i = 0; i < nr_e820_entries; i++) { |
236 | if (params->e820_array[i].type != E820_RAM) | 236 | if (params->e820_table[i].type != E820_RAM) |
237 | continue; | 237 | continue; |
238 | start = params->e820_array[i].addr; | 238 | start = params->e820_table[i].addr; |
239 | end = params->e820_array[i].addr + params->e820_array[i].size - 1; | 239 | end = params->e820_table[i].addr + params->e820_table[i].size - 1; |
240 | 240 | ||
241 | if ((start <= 0x100000) && end > 0x100000) { | 241 | if ((start <= 0x100000) && end > 0x100000) { |
242 | mem_k = (end >> 10) - (0x100000 >> 10); | 242 | mem_k = (end >> 10) - (0x100000 >> 10); |
diff --git a/arch/x86/kernel/resource.c b/arch/x86/kernel/resource.c index aeec503e0a6d..17b494d4bb86 100644 --- a/arch/x86/kernel/resource.c +++ b/arch/x86/kernel/resource.c | |||
@@ -27,8 +27,8 @@ static void remove_e820_regions(struct resource *avail) | |||
27 | int i; | 27 | int i; |
28 | struct e820_entry *entry; | 28 | struct e820_entry *entry; |
29 | 29 | ||
30 | for (i = 0; i < e820_array->nr_map; i++) { | 30 | for (i = 0; i < e820_table->nr_map; i++) { |
31 | entry = &e820_array->map[i]; | 31 | entry = &e820_table->map[i]; |
32 | 32 | ||
33 | resource_clip(avail, entry->addr, | 33 | resource_clip(avail, entry->addr, |
34 | entry->addr + entry->size - 1); | 34 | entry->addr + entry->size - 1); |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index a91db2edee9e..a3c1d39116b7 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -458,8 +458,8 @@ static void __init e820_reserve_setup_data(void) | |||
458 | early_memunmap(data, sizeof(*data)); | 458 | early_memunmap(data, sizeof(*data)); |
459 | } | 459 | } |
460 | 460 | ||
461 | sanitize_e820_array(e820_array->map, ARRAY_SIZE(e820_array->map), &e820_array->nr_map); | 461 | sanitize_e820_table(e820_table->map, ARRAY_SIZE(e820_table->map), &e820_table->nr_map); |
462 | memcpy(e820_array_saved, e820_array, sizeof(struct e820_array)); | 462 | memcpy(e820_table_saved, e820_table, sizeof(struct e820_table)); |
463 | printk(KERN_INFO "extended physical RAM map:\n"); | 463 | printk(KERN_INFO "extended physical RAM map:\n"); |
464 | e820_print_map("reserve setup_data"); | 464 | e820_print_map("reserve setup_data"); |
465 | } | 465 | } |
@@ -763,7 +763,7 @@ static void __init trim_bios_range(void) | |||
763 | */ | 763 | */ |
764 | e820_remove_range(BIOS_BEGIN, BIOS_END - BIOS_BEGIN, E820_RAM, 1); | 764 | e820_remove_range(BIOS_BEGIN, BIOS_END - BIOS_BEGIN, E820_RAM, 1); |
765 | 765 | ||
766 | sanitize_e820_array(e820_array->map, ARRAY_SIZE(e820_array->map), &e820_array->nr_map); | 766 | sanitize_e820_table(e820_table->map, ARRAY_SIZE(e820_table->map), &e820_table->nr_map); |
767 | } | 767 | } |
768 | 768 | ||
769 | /* called before trim_bios_range() to spare extra sanitize */ | 769 | /* called before trim_bios_range() to spare extra sanitize */ |
@@ -1026,7 +1026,7 @@ void __init setup_arch(char **cmdline_p) | |||
1026 | early_dump_pci_devices(); | 1026 | early_dump_pci_devices(); |
1027 | #endif | 1027 | #endif |
1028 | 1028 | ||
1029 | /* update the e820_array_saved too */ | 1029 | /* update the e820_table_saved too */ |
1030 | e820_reserve_setup_data(); | 1030 | e820_reserve_setup_data(); |
1031 | finish_e820_parsing(); | 1031 | finish_e820_parsing(); |
1032 | 1032 | ||
@@ -1056,7 +1056,7 @@ void __init setup_arch(char **cmdline_p) | |||
1056 | if (ppro_with_ram_bug()) { | 1056 | if (ppro_with_ram_bug()) { |
1057 | e820_update_range(0x70000000ULL, 0x40000ULL, E820_RAM, | 1057 | e820_update_range(0x70000000ULL, 0x40000ULL, E820_RAM, |
1058 | E820_RESERVED); | 1058 | E820_RESERVED); |
1059 | sanitize_e820_array(e820_array->map, ARRAY_SIZE(e820_array->map), &e820_array->nr_map); | 1059 | sanitize_e820_table(e820_table->map, ARRAY_SIZE(e820_table->map), &e820_table->nr_map); |
1060 | printk(KERN_INFO "fixed physical RAM map:\n"); | 1060 | printk(KERN_INFO "fixed physical RAM map:\n"); |
1061 | e820_print_map("bad_ppro"); | 1061 | e820_print_map("bad_ppro"); |
1062 | } | 1062 | } |
diff --git a/arch/x86/kernel/tboot.c b/arch/x86/kernel/tboot.c index 705f1207181a..825822688aa5 100644 --- a/arch/x86/kernel/tboot.c +++ b/arch/x86/kernel/tboot.c | |||
@@ -188,12 +188,12 @@ static int tboot_setup_sleep(void) | |||
188 | 188 | ||
189 | tboot->num_mac_regions = 0; | 189 | tboot->num_mac_regions = 0; |
190 | 190 | ||
191 | for (i = 0; i < e820_array->nr_map; i++) { | 191 | for (i = 0; i < e820_table->nr_map; i++) { |
192 | if ((e820_array->map[i].type != E820_RAM) | 192 | if ((e820_table->map[i].type != E820_RAM) |
193 | && (e820_array->map[i].type != E820_RESERVED_KERN)) | 193 | && (e820_table->map[i].type != E820_RESERVED_KERN)) |
194 | continue; | 194 | continue; |
195 | 195 | ||
196 | add_mac_region(e820_array->map[i].addr, e820_array->map[i].size); | 196 | add_mac_region(e820_table->map[i].addr, e820_table->map[i].size); |
197 | } | 197 | } |
198 | 198 | ||
199 | tboot->acpi_sinfo.kernel_s3_resume_vector = | 199 | tboot->acpi_sinfo.kernel_s3_resume_vector = |
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c index 09226a33e418..fc42e9604562 100644 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c | |||
@@ -1178,9 +1178,9 @@ static __init char *lguest_memory_setup(void) | |||
1178 | * The Linux bootloader header contains an "e820" memory map: the | 1178 | * The Linux bootloader header contains an "e820" memory map: the |
1179 | * Launcher populated the first entry with our memory limit. | 1179 | * Launcher populated the first entry with our memory limit. |
1180 | */ | 1180 | */ |
1181 | e820_add_region(boot_params.e820_array[0].addr, | 1181 | e820_add_region(boot_params.e820_table[0].addr, |
1182 | boot_params.e820_array[0].size, | 1182 | boot_params.e820_table[0].size, |
1183 | boot_params.e820_array[0].type); | 1183 | boot_params.e820_table[0].type); |
1184 | 1184 | ||
1185 | /* This string is for the boot messages. */ | 1185 | /* This string is for the boot messages. */ |
1186 | return "LGUEST"; | 1186 | return "LGUEST"; |
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c index 2543a11c9df8..9e055f6859e5 100644 --- a/arch/x86/platform/efi/efi.c +++ b/arch/x86/platform/efi/efi.c | |||
@@ -167,7 +167,7 @@ static void __init do_add_efi_memmap(void) | |||
167 | } | 167 | } |
168 | e820_add_region(start, size, e820_type); | 168 | e820_add_region(start, size, e820_type); |
169 | } | 169 | } |
170 | sanitize_e820_array(e820_array->map, ARRAY_SIZE(e820_array->map), &e820_array->nr_map); | 170 | sanitize_e820_table(e820_table->map, ARRAY_SIZE(e820_table->map), &e820_table->nr_map); |
171 | } | 171 | } |
172 | 172 | ||
173 | int __init efi_memblock_x86_reserve_range(void) | 173 | int __init efi_memblock_x86_reserve_range(void) |
diff --git a/arch/x86/power/hibernate_64.c b/arch/x86/power/hibernate_64.c index c1a245e64ed1..8fe5be0e90b2 100644 --- a/arch/x86/power/hibernate_64.c +++ b/arch/x86/power/hibernate_64.c | |||
@@ -201,7 +201,7 @@ struct restore_data_record { | |||
201 | * @map: the e820 map to be calculated | 201 | * @map: the e820 map to be calculated |
202 | * @buf: the md5 result to be stored to | 202 | * @buf: the md5 result to be stored to |
203 | */ | 203 | */ |
204 | static int get_e820_md5(struct e820_array *map, void *buf) | 204 | static int get_e820_md5(struct e820_table *map, void *buf) |
205 | { | 205 | { |
206 | struct scatterlist sg; | 206 | struct scatterlist sg; |
207 | struct crypto_ahash *tfm; | 207 | struct crypto_ahash *tfm; |
@@ -214,7 +214,7 @@ static int get_e820_md5(struct e820_array *map, void *buf) | |||
214 | 214 | ||
215 | { | 215 | { |
216 | AHASH_REQUEST_ON_STACK(req, tfm); | 216 | AHASH_REQUEST_ON_STACK(req, tfm); |
217 | size = offsetof(struct e820_array, map) | 217 | size = offsetof(struct e820_table, map) |
218 | + sizeof(struct e820_entry) * map->nr_map; | 218 | + sizeof(struct e820_entry) * map->nr_map; |
219 | ahash_request_set_tfm(req, tfm); | 219 | ahash_request_set_tfm(req, tfm); |
220 | sg_init_one(&sg, (u8 *)map, size); | 220 | sg_init_one(&sg, (u8 *)map, size); |
@@ -232,7 +232,7 @@ static int get_e820_md5(struct e820_array *map, void *buf) | |||
232 | 232 | ||
233 | static void hibernation_e820_save(void *buf) | 233 | static void hibernation_e820_save(void *buf) |
234 | { | 234 | { |
235 | get_e820_md5(e820_array_saved, buf); | 235 | get_e820_md5(e820_table_saved, buf); |
236 | } | 236 | } |
237 | 237 | ||
238 | static bool hibernation_e820_mismatch(void *buf) | 238 | static bool hibernation_e820_mismatch(void *buf) |
@@ -245,7 +245,7 @@ static bool hibernation_e820_mismatch(void *buf) | |||
245 | if (!memcmp(result, buf, MD5_DIGEST_SIZE)) | 245 | if (!memcmp(result, buf, MD5_DIGEST_SIZE)) |
246 | return false; | 246 | return false; |
247 | 247 | ||
248 | ret = get_e820_md5(e820_array_saved, result); | 248 | ret = get_e820_md5(e820_table_saved, result); |
249 | if (ret) | 249 | if (ret) |
250 | return true; | 250 | return true; |
251 | 251 | ||
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index 3cc90e902064..f98713e5a705 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c | |||
@@ -41,8 +41,8 @@ struct xen_memory_region xen_extra_mem[XEN_EXTRA_MEM_MAX_REGIONS] __initdata; | |||
41 | unsigned long xen_released_pages; | 41 | unsigned long xen_released_pages; |
42 | 42 | ||
43 | /* E820 map used during setting up memory. */ | 43 | /* E820 map used during setting up memory. */ |
44 | static struct e820_entry xen_e820_array[E820_X_MAX] __initdata; | 44 | static struct e820_entry xen_e820_table[E820_X_MAX] __initdata; |
45 | static u32 xen_e820_array_entries __initdata; | 45 | static u32 xen_e820_table_entries __initdata; |
46 | 46 | ||
47 | /* | 47 | /* |
48 | * Buffer used to remap identity mapped pages. We only need the virtual space. | 48 | * Buffer used to remap identity mapped pages. We only need the virtual space. |
@@ -198,11 +198,11 @@ void __init xen_inv_extra_mem(void) | |||
198 | */ | 198 | */ |
199 | static unsigned long __init xen_find_pfn_range(unsigned long *min_pfn) | 199 | static unsigned long __init xen_find_pfn_range(unsigned long *min_pfn) |
200 | { | 200 | { |
201 | const struct e820_entry *entry = xen_e820_array; | 201 | const struct e820_entry *entry = xen_e820_table; |
202 | unsigned int i; | 202 | unsigned int i; |
203 | unsigned long done = 0; | 203 | unsigned long done = 0; |
204 | 204 | ||
205 | for (i = 0; i < xen_e820_array_entries; i++, entry++) { | 205 | for (i = 0; i < xen_e820_table_entries; i++, entry++) { |
206 | unsigned long s_pfn; | 206 | unsigned long s_pfn; |
207 | unsigned long e_pfn; | 207 | unsigned long e_pfn; |
208 | 208 | ||
@@ -457,7 +457,7 @@ static unsigned long __init xen_foreach_remap_area(unsigned long nr_pages, | |||
457 | { | 457 | { |
458 | phys_addr_t start = 0; | 458 | phys_addr_t start = 0; |
459 | unsigned long ret_val = 0; | 459 | unsigned long ret_val = 0; |
460 | const struct e820_entry *entry = xen_e820_array; | 460 | const struct e820_entry *entry = xen_e820_table; |
461 | int i; | 461 | int i; |
462 | 462 | ||
463 | /* | 463 | /* |
@@ -471,9 +471,9 @@ static unsigned long __init xen_foreach_remap_area(unsigned long nr_pages, | |||
471 | * example) the DMI tables in a reserved region that begins on | 471 | * example) the DMI tables in a reserved region that begins on |
472 | * a non-page boundary. | 472 | * a non-page boundary. |
473 | */ | 473 | */ |
474 | for (i = 0; i < xen_e820_array_entries; i++, entry++) { | 474 | for (i = 0; i < xen_e820_table_entries; i++, entry++) { |
475 | phys_addr_t end = entry->addr + entry->size; | 475 | phys_addr_t end = entry->addr + entry->size; |
476 | if (entry->type == E820_RAM || i == xen_e820_array_entries - 1) { | 476 | if (entry->type == E820_RAM || i == xen_e820_table_entries - 1) { |
477 | unsigned long start_pfn = PFN_DOWN(start); | 477 | unsigned long start_pfn = PFN_DOWN(start); |
478 | unsigned long end_pfn = PFN_UP(end); | 478 | unsigned long end_pfn = PFN_UP(end); |
479 | 479 | ||
@@ -601,10 +601,10 @@ static void __init xen_align_and_add_e820_region(phys_addr_t start, | |||
601 | 601 | ||
602 | static void __init xen_ignore_unusable(void) | 602 | static void __init xen_ignore_unusable(void) |
603 | { | 603 | { |
604 | struct e820_entry *entry = xen_e820_array; | 604 | struct e820_entry *entry = xen_e820_table; |
605 | unsigned int i; | 605 | unsigned int i; |
606 | 606 | ||
607 | for (i = 0; i < xen_e820_array_entries; i++, entry++) { | 607 | for (i = 0; i < xen_e820_table_entries; i++, entry++) { |
608 | if (entry->type == E820_UNUSABLE) | 608 | if (entry->type == E820_UNUSABLE) |
609 | entry->type = E820_RAM; | 609 | entry->type = E820_RAM; |
610 | } | 610 | } |
@@ -620,9 +620,9 @@ bool __init xen_is_e820_reserved(phys_addr_t start, phys_addr_t size) | |||
620 | return false; | 620 | return false; |
621 | 621 | ||
622 | end = start + size; | 622 | end = start + size; |
623 | entry = xen_e820_array; | 623 | entry = xen_e820_table; |
624 | 624 | ||
625 | for (mapcnt = 0; mapcnt < xen_e820_array_entries; mapcnt++) { | 625 | for (mapcnt = 0; mapcnt < xen_e820_table_entries; mapcnt++) { |
626 | if (entry->type == E820_RAM && entry->addr <= start && | 626 | if (entry->type == E820_RAM && entry->addr <= start && |
627 | (entry->addr + entry->size) >= end) | 627 | (entry->addr + entry->size) >= end) |
628 | return false; | 628 | return false; |
@@ -645,9 +645,9 @@ phys_addr_t __init xen_find_free_area(phys_addr_t size) | |||
645 | { | 645 | { |
646 | unsigned mapcnt; | 646 | unsigned mapcnt; |
647 | phys_addr_t addr, start; | 647 | phys_addr_t addr, start; |
648 | struct e820_entry *entry = xen_e820_array; | 648 | struct e820_entry *entry = xen_e820_table; |
649 | 649 | ||
650 | for (mapcnt = 0; mapcnt < xen_e820_array_entries; mapcnt++, entry++) { | 650 | for (mapcnt = 0; mapcnt < xen_e820_table_entries; mapcnt++, entry++) { |
651 | if (entry->type != E820_RAM || entry->size < size) | 651 | if (entry->type != E820_RAM || entry->size < size) |
652 | continue; | 652 | continue; |
653 | start = entry->addr; | 653 | start = entry->addr; |
@@ -750,8 +750,8 @@ char * __init xen_memory_setup(void) | |||
750 | max_pfn = min(max_pfn, xen_start_info->nr_pages); | 750 | max_pfn = min(max_pfn, xen_start_info->nr_pages); |
751 | mem_end = PFN_PHYS(max_pfn); | 751 | mem_end = PFN_PHYS(max_pfn); |
752 | 752 | ||
753 | memmap.nr_entries = ARRAY_SIZE(xen_e820_array); | 753 | memmap.nr_entries = ARRAY_SIZE(xen_e820_table); |
754 | set_xen_guest_handle(memmap.buffer, xen_e820_array); | 754 | set_xen_guest_handle(memmap.buffer, xen_e820_table); |
755 | 755 | ||
756 | op = xen_initial_domain() ? | 756 | op = xen_initial_domain() ? |
757 | XENMEM_machine_memory_map : | 757 | XENMEM_machine_memory_map : |
@@ -760,16 +760,16 @@ char * __init xen_memory_setup(void) | |||
760 | if (rc == -ENOSYS) { | 760 | if (rc == -ENOSYS) { |
761 | BUG_ON(xen_initial_domain()); | 761 | BUG_ON(xen_initial_domain()); |
762 | memmap.nr_entries = 1; | 762 | memmap.nr_entries = 1; |
763 | xen_e820_array[0].addr = 0ULL; | 763 | xen_e820_table[0].addr = 0ULL; |
764 | xen_e820_array[0].size = mem_end; | 764 | xen_e820_table[0].size = mem_end; |
765 | /* 8MB slack (to balance backend allocations). */ | 765 | /* 8MB slack (to balance backend allocations). */ |
766 | xen_e820_array[0].size += 8ULL << 20; | 766 | xen_e820_table[0].size += 8ULL << 20; |
767 | xen_e820_array[0].type = E820_RAM; | 767 | xen_e820_table[0].type = E820_RAM; |
768 | rc = 0; | 768 | rc = 0; |
769 | } | 769 | } |
770 | BUG_ON(rc); | 770 | BUG_ON(rc); |
771 | BUG_ON(memmap.nr_entries == 0); | 771 | BUG_ON(memmap.nr_entries == 0); |
772 | xen_e820_array_entries = memmap.nr_entries; | 772 | xen_e820_table_entries = memmap.nr_entries; |
773 | 773 | ||
774 | /* | 774 | /* |
775 | * Xen won't allow a 1:1 mapping to be created to UNUSABLE | 775 | * Xen won't allow a 1:1 mapping to be created to UNUSABLE |
@@ -783,8 +783,8 @@ char * __init xen_memory_setup(void) | |||
783 | xen_ignore_unusable(); | 783 | xen_ignore_unusable(); |
784 | 784 | ||
785 | /* Make sure the Xen-supplied memory map is well-ordered. */ | 785 | /* Make sure the Xen-supplied memory map is well-ordered. */ |
786 | sanitize_e820_array(xen_e820_array, ARRAY_SIZE(xen_e820_array), | 786 | sanitize_e820_table(xen_e820_table, ARRAY_SIZE(xen_e820_table), |
787 | &xen_e820_array_entries); | 787 | &xen_e820_table_entries); |
788 | 788 | ||
789 | max_pages = xen_get_max_pages(); | 789 | max_pages = xen_get_max_pages(); |
790 | 790 | ||
@@ -811,13 +811,13 @@ char * __init xen_memory_setup(void) | |||
811 | extra_pages = min3(EXTRA_MEM_RATIO * min(max_pfn, PFN_DOWN(MAXMEM)), | 811 | extra_pages = min3(EXTRA_MEM_RATIO * min(max_pfn, PFN_DOWN(MAXMEM)), |
812 | extra_pages, max_pages - max_pfn); | 812 | extra_pages, max_pages - max_pfn); |
813 | i = 0; | 813 | i = 0; |
814 | addr = xen_e820_array[0].addr; | 814 | addr = xen_e820_table[0].addr; |
815 | size = xen_e820_array[0].size; | 815 | size = xen_e820_table[0].size; |
816 | while (i < xen_e820_array_entries) { | 816 | while (i < xen_e820_table_entries) { |
817 | bool discard = false; | 817 | bool discard = false; |
818 | 818 | ||
819 | chunk_size = size; | 819 | chunk_size = size; |
820 | type = xen_e820_array[i].type; | 820 | type = xen_e820_table[i].type; |
821 | 821 | ||
822 | if (type == E820_RAM) { | 822 | if (type == E820_RAM) { |
823 | if (addr < mem_end) { | 823 | if (addr < mem_end) { |
@@ -840,9 +840,9 @@ char * __init xen_memory_setup(void) | |||
840 | size -= chunk_size; | 840 | size -= chunk_size; |
841 | if (size == 0) { | 841 | if (size == 0) { |
842 | i++; | 842 | i++; |
843 | if (i < xen_e820_array_entries) { | 843 | if (i < xen_e820_table_entries) { |
844 | addr = xen_e820_array[i].addr; | 844 | addr = xen_e820_table[i].addr; |
845 | size = xen_e820_array[i].size; | 845 | size = xen_e820_table[i].size; |
846 | } | 846 | } |
847 | } | 847 | } |
848 | } | 848 | } |
@@ -861,7 +861,7 @@ char * __init xen_memory_setup(void) | |||
861 | e820_add_region(ISA_START_ADDRESS, ISA_END_ADDRESS - ISA_START_ADDRESS, | 861 | e820_add_region(ISA_START_ADDRESS, ISA_END_ADDRESS - ISA_START_ADDRESS, |
862 | E820_RESERVED); | 862 | E820_RESERVED); |
863 | 863 | ||
864 | sanitize_e820_array(e820_array->map, ARRAY_SIZE(e820_array->map), &e820_array->nr_map); | 864 | sanitize_e820_table(e820_table->map, ARRAY_SIZE(e820_table->map), &e820_table->nr_map); |
865 | 865 | ||
866 | /* | 866 | /* |
867 | * Check whether the kernel itself conflicts with the target E820 map. | 867 | * Check whether the kernel itself conflicts with the target E820 map. |
@@ -923,21 +923,21 @@ char * __init xen_auto_xlated_memory_setup(void) | |||
923 | int i; | 923 | int i; |
924 | int rc; | 924 | int rc; |
925 | 925 | ||
926 | memmap.nr_entries = ARRAY_SIZE(xen_e820_array); | 926 | memmap.nr_entries = ARRAY_SIZE(xen_e820_table); |
927 | set_xen_guest_handle(memmap.buffer, xen_e820_array); | 927 | set_xen_guest_handle(memmap.buffer, xen_e820_table); |
928 | 928 | ||
929 | rc = HYPERVISOR_memory_op(XENMEM_memory_map, &memmap); | 929 | rc = HYPERVISOR_memory_op(XENMEM_memory_map, &memmap); |
930 | if (rc < 0) | 930 | if (rc < 0) |
931 | panic("No memory map (%d)\n", rc); | 931 | panic("No memory map (%d)\n", rc); |
932 | 932 | ||
933 | xen_e820_array_entries = memmap.nr_entries; | 933 | xen_e820_table_entries = memmap.nr_entries; |
934 | 934 | ||
935 | sanitize_e820_array(xen_e820_array, ARRAY_SIZE(xen_e820_array), | 935 | sanitize_e820_table(xen_e820_table, ARRAY_SIZE(xen_e820_table), |
936 | &xen_e820_array_entries); | 936 | &xen_e820_table_entries); |
937 | 937 | ||
938 | for (i = 0; i < xen_e820_array_entries; i++) | 938 | for (i = 0; i < xen_e820_table_entries; i++) |
939 | e820_add_region(xen_e820_array[i].addr, xen_e820_array[i].size, | 939 | e820_add_region(xen_e820_table[i].addr, xen_e820_table[i].size, |
940 | xen_e820_array[i].type); | 940 | xen_e820_table[i].type); |
941 | 941 | ||
942 | /* Remove p2m info, it is not needed. */ | 942 | /* Remove p2m info, it is not needed. */ |
943 | xen_start_info->mfn_list = 0; | 943 | xen_start_info->mfn_list = 0; |
diff --git a/tools/lguest/lguest.c b/tools/lguest/lguest.c index 92a1fe3c07eb..3819e23a173e 100644 --- a/tools/lguest/lguest.c +++ b/tools/lguest/lguest.c | |||
@@ -3339,7 +3339,7 @@ int main(int argc, char *argv[]) | |||
3339 | * simple, single region. | 3339 | * simple, single region. |
3340 | */ | 3340 | */ |
3341 | boot->e820_entries = 1; | 3341 | boot->e820_entries = 1; |
3342 | boot->e820_array[0] = ((struct e820_entry) { 0, mem, E820_RAM }); | 3342 | boot->e820_table[0] = ((struct e820_entry) { 0, mem, E820_RAM }); |
3343 | /* | 3343 | /* |
3344 | * The boot header contains a command line pointer: we put the command | 3344 | * The boot header contains a command line pointer: we put the command |
3345 | * line after the boot header. | 3345 | * line after the boot header. |