(acpi:memory hotplug) Remove strange add_memory fail message
PATCH 1/1 (acpi:memory hotplug) Remove strange add_memory fail message
Hello.
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.
This patch is for 2.6.19-rc2.
I tested this patch on Tiger4 with my hot-add emulation.
Please apply.
Signed-off-by Yasunori Goto <[email protected]>
--- drivers/acpi/acpi_memhotplug.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
---
drivers/acpi/acpi_memhotplug.c +12 -0
@@ -85,6 +85,8 @@struct list_head res_list; }; +int acpi_hotmem_initialized =0 ; +static acpi_status acpi_memory_get_resource (struct acpi_resource *resource,void *context) {
@@ -438,6 +440,15 @@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 @@return -ENODEV ; } + acpi_hotmem_initialized =1 ;return 0 ; }
Signature · 1 line
Yasunori Goto