From 61a50101638254d38e3f4281265b44de0f2cba4e Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 27 Jan 2017 13:54:38 +0100 Subject: x86/boot/e820: Rename everything to e820_table No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar --- arch/x86/boot/compressed/eboot.c | 22 +++++++++++----------- arch/x86/boot/compressed/kaslr.c | 2 +- arch/x86/boot/memory.c | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) (limited to 'arch/x86/boot') diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c index b5cc1e7..04c406f 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, static efi_status_t setup_e820(struct boot_params *params, struct setup_data *e820ext, u32 e820ext_size) { - struct e820_entry *e820_array = ¶ms->e820_array[0]; + struct e820_entry *e820_table = ¶ms->e820_table[0]; struct efi_info *efi = ¶ms->efi_info; struct e820_entry *prev = NULL; u32 nr_entries; @@ -982,7 +982,7 @@ static efi_status_t setup_e820(struct boot_params *params, continue; } - if (nr_entries == ARRAY_SIZE(params->e820_array)) { + if (nr_entries == ARRAY_SIZE(params->e820_table)) { u32 need = (nr_desc - i) * sizeof(struct e820_entry) + sizeof(struct setup_data); @@ -990,18 +990,18 @@ static efi_status_t setup_e820(struct boot_params *params, return EFI_BUFFER_TOO_SMALL; /* boot_params map full, switch to e820 extended */ - e820_array = (struct e820_entry *)e820ext->data; + e820_table = (struct e820_entry *)e820ext->data; } - e820_array->addr = d->phys_addr; - e820_array->size = d->num_pages << PAGE_SHIFT; - e820_array->type = e820_type; - prev = e820_array++; + e820_table->addr = d->phys_addr; + e820_table->size = d->num_pages << PAGE_SHIFT; + e820_table->type = e820_type; + prev = e820_table++; nr_entries++; } - if (nr_entries > ARRAY_SIZE(params->e820_array)) { - u32 nr_e820ext = nr_entries - ARRAY_SIZE(params->e820_array); + if (nr_entries > ARRAY_SIZE(params->e820_table)) { + u32 nr_e820ext = nr_entries - ARRAY_SIZE(params->e820_table); add_e820ext(params, e820ext, nr_e820ext); nr_entries -= nr_e820ext; @@ -1055,9 +1055,9 @@ static efi_status_t exit_boot_func(efi_system_table_t *sys_table_arg, if (first) { nr_desc = *map->buff_size / *map->desc_size; - if (nr_desc > ARRAY_SIZE(p->boot_params->e820_array)) { + if (nr_desc > ARRAY_SIZE(p->boot_params->e820_table)) { u32 nr_e820ext = nr_desc - - ARRAY_SIZE(p->boot_params->e820_array); + ARRAY_SIZE(p->boot_params->e820_table); status = alloc_e820ext(nr_e820ext, &p->e820ext, &p->e820ext_size); diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c index f0e3723..a47f832 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, /* Verify potential e820 positions, appending to slots list. */ for (i = 0; i < boot_params->e820_entries; i++) { - process_e820_entry(&boot_params->e820_array[i], minimum, + process_e820_entry(&boot_params->e820_table[i], minimum, image_size); if (slot_area_index == MAX_SLOT_AREA) { debug_putstr("Aborted e820 scan (slot_areas full)!\n"); diff --git a/arch/x86/boot/memory.c b/arch/x86/boot/memory.c index f2132b3..db62445 100644 --- a/arch/x86/boot/memory.c +++ b/arch/x86/boot/memory.c @@ -21,7 +21,7 @@ static int detect_memory_e820(void) { int count = 0; struct biosregs ireg, oreg; - struct e820_entry *desc = boot_params.e820_array; + struct e820_entry *desc = boot_params.e820_table; static struct e820_entry buf; /* static so it is zeroed */ initregs(&ireg); @@ -66,7 +66,7 @@ static int detect_memory_e820(void) *desc++ = buf; count++; - } while (ireg.ebx && count < ARRAY_SIZE(boot_params.e820_array)); + } while (ireg.ebx && count < ARRAY_SIZE(boot_params.e820_table)); return boot_params.e820_entries = count; } -- cgit v1.1