acpi,memory-hotplug : remove memory device by acpi_bus_remove()
Subsystems (3)
cover acpi,memory-hotplug : remove memory device by acpi_bus_remove()
The patch-set was divided from following thread's patch-set.
https://lkml.org/lkml/2012/9/5/201
If you want to know the reason, please read following thread.
https://lkml.org/lkml/2012/10/2/83
The patch exports "acpi_bus_remove()" for removing a acpi device from a acpi bus at memory hot plug.
PATCH 1/2 acpi,memory-hotplug : export the function acpi_bus_remove()
From: Wen Congyang <[email protected]>
The function acpi_bus_remove() can remove a acpi device from acpi bus. When a acpi device is removed, we need to call this function to remove the acpi device from acpi bus. So export this function.
--- drivers/acpi/scan.c | 3 ++- include/acpi/acpi_bus.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/acpi/scan.c +2 -1
@@ -1224,7 +1224,7 @@ static int acpi_device_set_context(strucreturn -ENODEV ; } -static int acpi_bus_remove (struct acpi_device *dev,int rmdevice) +int acpi_bus_remove (struct acpi_device *dev,int rmdevice) {if (!dev)return -EINVAL ;
@@ -1246,6 +1246,7 @@ static int acpi_bus_remove(struct acpi_dreturn 0 ; } +EXPORT_SYMBOL (acpi_bus_remove); static int acpi_add_single_object(struct acpi_device **child, acpi_handle handle, int type,
include/acpi/acpi_bus.h +1 -0
@@ -360,6 +360,7 @@ bool acpi_bus_power_manageable(acpi_handbool acpi_bus_can_wakeup (acpi_handle handle);int acpi_power_resource_register_device (struct device *dev,acpi_handle handle);void acpi_power_resource_unregister_device (struct device *dev,acpi_handle handle); +int acpi_bus_remove (struct acpi_device *dev,int rmdevice);#ifdef CONFIG_ACPI_PROC_EVENT int acpi_bus_generate_proc_event (struct acpi_device *device,u8 type,int data);int acpi_bus_generate_proc_event4 (const char *class,const char *bid,u8 type,int data);
PATCH 2/2 acpi,memory-hotplug : call acpi_bus_remo() to remove memory device
In reply to Yasuaki IshimatsuFrom: Wen Congyang <[email protected]>
The memory device has been ejected and powoffed, so we can call acpi_bus_remove() to remove the memory device from acpi bus.
--- drivers/acpi/acpi_memhotplug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/acpi/acpi_memhotplug.c +2 -1
@@ -424,8 +424,9 @@ static void acpi_memory_device_notify(ac }/* -* TBD: Invoke acpi_bus_remove to cleanup data structures +* Invoke acpi_bus_remove() to remove memory device */ +acpi_bus_remove (device,1 );/* _EJ0 succeeded; _OST is not necessary */ return ;
Re: [PATCH 2/2] acpi,memory-hotplug : call acpi_bus_remo() to remove memory device
Quoted 17 lines · Yasuaki Ishimatsu
From: Wen Congyang <[email protected]>
The memory device has been ejected and powoffed, so we can call
acpi_bus_remove()to remove the memory device from acpi bus.CC Len Brown <[email protected]>Reviewed-by Yasuaki Ishimatsu <[email protected]>Signed-off-by Wen Congyang <[email protected]>--- drivers/acpi/acpi_memhotplug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)Index:
linux-3.6/drivers/acpi/acpi_memhotplug.c
===================================================================
drivers/acpi/acpi_memhotplug.c 2012-10-03 18:17:52.471250299 +0900 static void acpi_memory_device_notify(ac · line 429
Quoted 7 lines
drivers/acpi/acpi_memhotplug.c 2012-10-03 18:17:52.471250299 +0900 renamed from drivers/acpi/acpi_memhotplug.c 2012-10-03 18:17:47.802249170 +0900 +2
-1@@ -424,8 +424,9 @@ static void acpi_memory_device_notify(ac } /* - * TBD: Invoke acpi_bus_remove to cleanup data structures + * Invoke acpi_bus_remove() to remove memory device */ + acpi_bus_remove(device, 1);
why not using acpi_bus_trim instead?
Yinghai
Re: [PATCH 2/2] acpi,memory-hotplug : call acpi_bus_remo() to remove memory device
At 10/04/2012 10:41 AM, Yinghai Lu Wrote:
Quoted 21 lines
Quoted 19 lines · Yasuaki Ishimatsu
From: Wen Congyang <[email protected]>
The memory device has been ejected and powoffed, so we can call
acpi_bus_remove()to remove the memory device from acpi bus.CC Len Brown <[email protected]>Reviewed-by Yasuaki Ishimatsu <[email protected]>Signed-off-by Wen Congyang <[email protected]>--- drivers/acpi/acpi_memhotplug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)Index:
linux-3.6/drivers/acpi/acpi_memhotplug.c
===================================================================drivers/acpi/acpi_memhotplug.c 2012-10-03 18:17:52.471250299 +0900 renamed from drivers/acpi/acpi_memhotplug.c 2012-10-03 18:17:47.802249170 +0900 +0
-0@@ -424,8 +424,9 @@ static void acpi_memory_device_notify(ac }
Quoted 7 lines
drivers/acpi/acpi_memhotplug.c 2012-10-03 18:17:52.471250299 +0900 static void acpi_memory_device_notify(ac · line 429
Quoted 5 lines
drivers/acpi/acpi_memhotplug.c 2012-10-03 18:17:52.471250299 +0900 renamed from drivers/acpi/acpi_memhotplug.c 2012-10-03 18:17:47.802249170 +0900 +2
-1/* - * TBD: Invoke acpi_bus_remove to cleanup data structures + * Invoke acpi_bus_remove() to remove memory device */ + acpi_bus_remove(device, 1);why not using
acpi_bus_triminstead?
Sorry for late reply. It's OK to use acpi_bus_trim(), and I will update this patch soon.
Thanks
Wen Congyang
Quoted 3 lines
Yinghai
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>