Commit 09821ff1 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

x86/boot/e820: Prefix the E820_* type names with "E820_TYPE_"



So there's a number of constants that start with "E820" but which
are not types - these create a confusing mixture when seen together
with 'enum e820_type' values:

	E820MAP
	E820NR
	E820_X_MAX
	E820MAX

To better differentiate the 'enum e820_type' values prefix them
with E820_TYPE_.

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: default avatarIngo Molnar <mingo@kernel.org>
parent 6afc03b8
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -944,15 +944,15 @@ static efi_status_t setup_e820(struct boot_params *params,
		case EFI_MEMORY_MAPPED_IO:
		case EFI_MEMORY_MAPPED_IO_PORT_SPACE:
		case EFI_PAL_CODE:
			e820_type = E820_RESERVED;
			e820_type = E820_TYPE_RESERVED;
			break;

		case EFI_UNUSABLE_MEMORY:
			e820_type = E820_UNUSABLE;
			e820_type = E820_TYPE_UNUSABLE;
			break;

		case EFI_ACPI_RECLAIM_MEMORY:
			e820_type = E820_ACPI;
			e820_type = E820_TYPE_ACPI;
			break;

		case EFI_LOADER_CODE:
@@ -960,15 +960,15 @@ static efi_status_t setup_e820(struct boot_params *params,
		case EFI_BOOT_SERVICES_CODE:
		case EFI_BOOT_SERVICES_DATA:
		case EFI_CONVENTIONAL_MEMORY:
			e820_type = E820_RAM;
			e820_type = E820_TYPE_RAM;
			break;

		case EFI_ACPI_MEMORY_NVS:
			e820_type = E820_NVS;
			e820_type = E820_TYPE_NVS;
			break;

		case EFI_PERSISTENT_MEMORY:
			e820_type = E820_PMEM;
			e820_type = E820_TYPE_PMEM;
			break;

		default:
+1 −1
Original line number Diff line number Diff line
@@ -435,7 +435,7 @@ static void process_e820_entry(struct e820_entry *entry,
	unsigned long start_orig;

	/* Skip non-RAM entries. */
	if (entry->type != E820_RAM)
	if (entry->type != E820_TYPE_RAM)
		return;

	/* On 32-bit, ignore entries entirely above our maximum. */
+1 −1
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ static inline int aperture_valid(u64 aper_base, u32 aper_size, u32 min_size)
		printk(KERN_INFO "Aperture beyond 4GB. Ignoring.\n");
		return 0;
	}
	if (e820__mapped_any(aper_base, aper_base + aper_size, E820_RAM)) {
	if (e820__mapped_any(aper_base, aper_base + aper_size, E820_TYPE_RAM)) {
		printk(KERN_INFO "Aperture pointing to e820 RAM. Ignoring.\n");
		return 0;
	}
+8 −8
Original line number Diff line number Diff line
@@ -7,12 +7,12 @@
#ifndef __ASSEMBLY__

enum e820_type {
	E820_RAM		= 1,
	E820_RESERVED		= 2,
	E820_ACPI		= 3,
	E820_NVS		= 4,
	E820_UNUSABLE		= 5,
	E820_PMEM		= 7,
	E820_TYPE_RAM		= 1,
	E820_TYPE_RESERVED	= 2,
	E820_TYPE_ACPI		= 3,
	E820_TYPE_NVS		= 4,
	E820_TYPE_UNUSABLE	= 5,
	E820_TYPE_PMEM		= 7,

	/*
	 * This is a non-standardized way to represent ADR or
@@ -25,7 +25,7 @@ enum e820_type {
	 *   type of memory, but newer versions switched to 12 as
	 *   6 was assigned differently. Some time they will learn... )
	 */
	E820_PRAM		= 12,
	E820_TYPE_PRAM		= 12,

	/*
	 * Reserved RAM used by the kernel itself if
@@ -34,7 +34,7 @@ enum e820_type {
	 * and so should not include any memory that the BIOS
	 * might alter over the S3 transition:
	 */
	E820_RESERVED_KERN	= 128,
	E820_TYPE_RESERVED_KERN	= 128,
};

/*
+1 −1
Original line number Diff line number Diff line
@@ -1715,6 +1715,6 @@ int __acpi_release_global_lock(unsigned int *lock)

void __init arch_reserve_mem_area(acpi_physical_address addr, size_t size)
{
	e820__range_add(addr, size, E820_ACPI);
	e820__range_add(addr, size, E820_TYPE_ACPI);
	e820__update_table_print();
}
Loading