From 3ab3b443ebf1fc7ae011867f8144db6f54f15712 Mon Sep 17 00:00:00 2001 From: Yasunori Goto Date: Thu, 19 Oct 2006 23:28:31 -0700 Subject: [PATCH] --- yaml --- r: 39969 b: refs/heads/master c: 887b95931b4072e60e3bf4253ff7bffe372bca46 h: refs/heads/master i: 39967: 8107d0ef35b6fe9191c899990898d6639a7254bb v: v3 --- [refs] | 2 +- trunk/drivers/acpi/acpi_memhotplug.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 391081838dee..92aa798ad9df 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6cbe44cd8d48a92856295f445183f52bf42a544d +refs/heads/master: 887b95931b4072e60e3bf4253ff7bffe372bca46 diff --git a/trunk/drivers/acpi/acpi_memhotplug.c b/trunk/drivers/acpi/acpi_memhotplug.c index 9090b5acc5e3..6bcd9e8e7bcb 100644 --- a/trunk/drivers/acpi/acpi_memhotplug.c +++ b/trunk/drivers/acpi/acpi_memhotplug.c @@ -85,6 +85,8 @@ struct acpi_memory_device { struct list_head res_list; }; +static int acpi_hotmem_initialized; + static acpi_status acpi_memory_get_resource(struct acpi_resource *resource, void *context) { @@ -438,6 +440,15 @@ static int acpi_memory_device_start (struct acpi_device *device) struct acpi_memory_device *mem_device; int result = 0; + /* + * Early boot code has recognized memory area by EFI/E820. + * If DSDT shows these memory devices on boot, hotplug is not necessary + * for them. So, it just returns until completion of this driver's + * start up. + */ + if (!acpi_hotmem_initialized) + return 0; + mem_device = acpi_driver_data(device); if (!acpi_memory_check_device(mem_device)) { @@ -537,6 +548,7 @@ static int __init acpi_memory_device_init(void) return -ENODEV; } + acpi_hotmem_initialized = 1; return 0; }