From: Wen Congyang Date: Fri, 16 Nov 2012 01:04:05 +0000 (+0100) Subject: ACPI / memhotplug: deal with eject request in hotplug queue X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~88^2~13^2~17 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=315bbae9c5cb1f54a6d6fd47b9cf325fbedccf05;p=pandora-kernel.git ACPI / memhotplug: deal with eject request in hotplug queue The memory device can be removed by 2 ways: 1. send eject request by SCI 2. echo 1 >/sys/bus/pci/devices/PNP0C80:XX/eject We handle the 1st case in the module acpi_memhotplug, and handle the 2nd case in ACPI eject notification. This 2 events may happen at the same time, so we may touch acpi_memory_device.res_list at the same time. This patch reimplements memory-hotremove support through an ACPI eject notification. Now the memory device is offlined and hotremoved only in the function acpi_memory_device_remove() which is protected by device_lock(). Signed-off-by: Wen Congyang Reviewed-by: Yasuaki Ishimatsu Reviewed-by: Toshi Kani Signed-off-by: Rafael J. Wysocki --- Reading git-diff-tree failed