• Yasunori Goto's avatar
    [PATCH] Catch notification of memory add event of ACPI via container driver.... · dd56a8e3
    Yasunori Goto authored
    [PATCH] Catch notification of memory add event of ACPI via container driver. (avoid redundant call add_memory)
    
    When acpi_memory_device_init() is called at boottime to register struct
    memory acpi_memory_device, acpi_bus_add() are called via
    acpi_driver_attach().
    
    But it also calls ops->start() function.  It is called even if the memory
    blocks are initialized at early boottime.  In this case add_memory() return
    -EEXIST, and the memory blocks becomes INVALID state even if it is normal.
    
    This is patch to avoid calling add_memory() for already available memory.
    
    [akpm@osdl.org: coding cleanups]
    Signed-off-by: default avatarYasunori Goto <y-goto@jp.fujitsu.com>
    Cc: "Brown, Len" <len.brown@intel.com>
    Cc: Dave Hansen <haveblue@us.ibm.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    dd56a8e3
acpi_memhotplug.c 15.9 KB