* [PATCH 0/2] acpi,memory-hotplug : remove memory device by acpi_bus_remove() @ 2012-10-04 1:44 Yasuaki Ishimatsu 2012-10-04 1:46 ` [PATCH 1/2] acpi,memory-hotplug : export the function acpi_bus_remove() Yasuaki Ishimatsu 2012-10-04 1:48 ` [PATCH 2/2] acpi,memory-hotplug : call acpi_bus_remo() to remove memory device Yasuaki Ishimatsu 0 siblings, 2 replies; 5+ messages in thread From: Yasuaki Ishimatsu @ 2012-10-04 1:44 UTC (permalink / raw) To: linux-acpi, linux-kernel, linux-mm; +Cc: len.brown, wency 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. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] acpi,memory-hotplug : export the function acpi_bus_remove() 2012-10-04 1:44 [PATCH 0/2] acpi,memory-hotplug : remove memory device by acpi_bus_remove() Yasuaki Ishimatsu @ 2012-10-04 1:46 ` Yasuaki Ishimatsu 2012-10-04 1:48 ` [PATCH 2/2] acpi,memory-hotplug : call acpi_bus_remo() to remove memory device Yasuaki Ishimatsu 1 sibling, 0 replies; 5+ messages in thread From: Yasuaki Ishimatsu @ 2012-10-04 1:46 UTC (permalink / raw) To: linux-acpi, linux-kernel, linux-mm; +Cc: len.brown, wency From: Wen Congyang <wency@cn.fujitsu.com> 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. CC: Len Brown <len.brown@intel.com> Reviewed-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> --- drivers/acpi/scan.c | 3 ++- include/acpi/acpi_bus.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) Index: linux-3.6/drivers/acpi/scan.c =================================================================== --- linux-3.6.orig/drivers/acpi/scan.c 2012-10-03 18:16:57.206246798 +0900 +++ linux-3.6/drivers/acpi/scan.c 2012-10-03 18:17:49.974249714 +0900 @@ -1224,7 +1224,7 @@ static int acpi_device_set_context(struc return -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_d return 0; } +EXPORT_SYMBOL(acpi_bus_remove); static int acpi_add_single_object(struct acpi_device **child, acpi_handle handle, int type, Index: linux-3.6/include/acpi/acpi_bus.h =================================================================== --- linux-3.6.orig/include/acpi/acpi_bus.h 2012-10-03 18:16:57.208246800 +0900 +++ linux-3.6/include/acpi/acpi_bus.h 2012-10-03 18:17:49.976249717 +0900 @@ -360,6 +360,7 @@ bool acpi_bus_power_manageable(acpi_hand bool 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); -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] acpi,memory-hotplug : call acpi_bus_remo() to remove memory device 2012-10-04 1:44 [PATCH 0/2] acpi,memory-hotplug : remove memory device by acpi_bus_remove() Yasuaki Ishimatsu 2012-10-04 1:46 ` [PATCH 1/2] acpi,memory-hotplug : export the function acpi_bus_remove() Yasuaki Ishimatsu @ 2012-10-04 1:48 ` Yasuaki Ishimatsu 2012-10-04 2:41 ` Yinghai Lu 1 sibling, 1 reply; 5+ messages in thread From: Yasuaki Ishimatsu @ 2012-10-04 1:48 UTC (permalink / raw) To: linux-acpi, linux-kernel, linux-mm; +Cc: len.brown, wency From: Wen Congyang <wency@cn.fujitsu.com> 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 <len.brown@intel.com> Reviewed-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> --- drivers/acpi/acpi_memhotplug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Index: linux-3.6/drivers/acpi/acpi_memhotplug.c =================================================================== --- linux-3.6.orig/drivers/acpi/acpi_memhotplug.c 2012-10-03 18:17:47.802249170 +0900 +++ linux-3.6/drivers/acpi/acpi_memhotplug.c 2012-10-03 18:17:52.471250299 +0900 @@ -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; -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] acpi,memory-hotplug : call acpi_bus_remo() to remove memory device 2012-10-04 1:48 ` [PATCH 2/2] acpi,memory-hotplug : call acpi_bus_remo() to remove memory device Yasuaki Ishimatsu @ 2012-10-04 2:41 ` Yinghai Lu 2012-10-19 1:50 ` Wen Congyang 0 siblings, 1 reply; 5+ messages in thread From: Yinghai Lu @ 2012-10-04 2:41 UTC (permalink / raw) To: Yasuaki Ishimatsu; +Cc: linux-acpi, linux-kernel, linux-mm, len.brown, wency On Wed, Oct 3, 2012 at 6:48 PM, Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> wrote: > From: Wen Congyang <wency@cn.fujitsu.com> > > 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 <len.brown@intel.com> > Reviewed-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> > Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> > --- > drivers/acpi/acpi_memhotplug.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > Index: linux-3.6/drivers/acpi/acpi_memhotplug.c > =================================================================== > --- linux-3.6.orig/drivers/acpi/acpi_memhotplug.c 2012-10-03 18:17:47.802249170 +0900 > +++ linux-3.6/drivers/acpi/acpi_memhotplug.c 2012-10-03 18:17:52.471250299 +0900 > @@ -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 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] acpi,memory-hotplug : call acpi_bus_remo() to remove memory device 2012-10-04 2:41 ` Yinghai Lu @ 2012-10-19 1:50 ` Wen Congyang 0 siblings, 0 replies; 5+ messages in thread From: Wen Congyang @ 2012-10-19 1:50 UTC (permalink / raw) To: Yinghai Lu Cc: Yasuaki Ishimatsu, linux-acpi, linux-kernel, linux-mm, len.brown At 10/04/2012 10:41 AM, Yinghai Lu Wrote: > On Wed, Oct 3, 2012 at 6:48 PM, Yasuaki Ishimatsu > <isimatu.yasuaki@jp.fujitsu.com> wrote: >> From: Wen Congyang <wency@cn.fujitsu.com> >> >> 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 <len.brown@intel.com> >> Reviewed-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> >> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> >> --- >> drivers/acpi/acpi_memhotplug.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> Index: linux-3.6/drivers/acpi/acpi_memhotplug.c >> =================================================================== >> --- linux-3.6.orig/drivers/acpi/acpi_memhotplug.c 2012-10-03 18:17:47.802249170 +0900 >> +++ linux-3.6/drivers/acpi/acpi_memhotplug.c 2012-10-03 18:17:52.471250299 +0900 >> @@ -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? Sorry for late reply. It's OK to use acpi_bus_trim(), and I will update this patch soon. Thanks Wen Congyang > > Yinghai > -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-10-19 1:44 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-10-04 1:44 [PATCH 0/2] acpi,memory-hotplug : remove memory device by acpi_bus_remove() Yasuaki Ishimatsu 2012-10-04 1:46 ` [PATCH 1/2] acpi,memory-hotplug : export the function acpi_bus_remove() Yasuaki Ishimatsu 2012-10-04 1:48 ` [PATCH 2/2] acpi,memory-hotplug : call acpi_bus_remo() to remove memory device Yasuaki Ishimatsu 2012-10-04 2:41 ` Yinghai Lu 2012-10-19 1:50 ` Wen Congyang
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).