aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorYasunori Goto <y-goto@jp.fujitsu.com>2006-10-20 02:28:31 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-20 13:26:38 -0400
commit887b95931b4072e60e3bf4253ff7bffe372bca46 (patch)
tree9d6a9fa71532e1e0846b31ff71431b1067e89601 /drivers
parent6cbe44cd8d48a92856295f445183f52bf42a544d (diff)
[PATCH] acpi memory hotplug: remove strange add_memory fail message
I wrote a patch to avoid redundant memory hot-add call at boot time. This was cause of strange fail message of memory hotplug like "ACPI: add_memory failed". Memory is recognized by early boot code with EFI/E820. But, if DSDT describes memory devices for them, then hot-add code is called for already recognized memory, and it shows fail messages with -EEXIST. So, sys admin will misunderstand this message as something wrong by it. This patch avoids them by preventing redundant hot-add call until completion of driver initialization. [akpm@osdl.org: cleanups] Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com> Cc: "Brown, Len" <len.brown@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/acpi_memhotplug.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
index 9090b5acc5e3..6bcd9e8e7bcb 100644
--- a/drivers/acpi/acpi_memhotplug.c
+++ b/drivers/acpi/acpi_memhotplug.c
@@ -85,6 +85,8 @@ struct acpi_memory_device {
85 struct list_head res_list; 85 struct list_head res_list;
86}; 86};
87 87
88static int acpi_hotmem_initialized;
89
88static acpi_status 90static acpi_status
89acpi_memory_get_resource(struct acpi_resource *resource, void *context) 91acpi_memory_get_resource(struct acpi_resource *resource, void *context)
90{ 92{
@@ -438,6 +440,15 @@ static int acpi_memory_device_start (struct acpi_device *device)
438 struct acpi_memory_device *mem_device; 440 struct acpi_memory_device *mem_device;
439 int result = 0; 441 int result = 0;
440 442
443 /*
444 * Early boot code has recognized memory area by EFI/E820.
445 * If DSDT shows these memory devices on boot, hotplug is not necessary
446 * for them. So, it just returns until completion of this driver's
447 * start up.
448 */
449 if (!acpi_hotmem_initialized)
450 return 0;
451
441 mem_device = acpi_driver_data(device); 452 mem_device = acpi_driver_data(device);
442 453
443 if (!acpi_memory_check_device(mem_device)) { 454 if (!acpi_memory_check_device(mem_device)) {
@@ -537,6 +548,7 @@ static int __init acpi_memory_device_init(void)
537 return -ENODEV; 548 return -ENODEV;
538 } 549 }
539 550
551 acpi_hotmem_initialized = 1;
540 return 0; 552 return 0;
541} 553}
542 554