From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rafael J. Wysocki" Subject: Re: [PATCH] X86/acpi: remove redundant logic of acpi memory hotadd Date: Fri, 07 Dec 2012 23:19:29 +0100 Message-ID: <4326596.xCAz7vOgOp@vostro.rjw.lan> References: Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7Bit Return-path: Received: from hydra.sisk.pl ([212.160.235.94]:44614 "EHLO hydra.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1424688Ab2LGWOf (ORCPT ); Fri, 7 Dec 2012 17:14:35 -0500 In-Reply-To: Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: "Liu, Jinsong" , Toshi Kani , Wen Congyang Cc: "Wysocki, Rafael J" , "lenb@kernel.org" , "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Konrad Rzeszutek Wilk , Jiang Liu On Tuesday, December 04, 2012 01:39:54 AM Liu, Jinsong wrote: > Resend it, add Rafael and linux-acpi@vger.kernel.org I wonder what memory hotplug people think about that. Thanks, Rafael > =============== > From 1d39279e45c54ce531691da5ffe261e7689dd92c Mon Sep 17 00:00:00 2001 > From: Liu Jinsong > Date: Wed, 14 Nov 2012 18:52:06 +0800 > Subject: [PATCH] X86/acpi: remove redundant logic of acpi memory hotadd > > When memory hotadd, acpi_memory_enable_device has already been done > at drv->ops.add (acpi_memory_device_add), no need to do it again > at notify callback. > > At acpi_memory_enable_device, acpi_memory_get_device_resources > is also a redundant action, since it has been done at drv->ops.add. > > Signed-off-by: Liu Jinsong > --- > drivers/acpi/acpi_memhotplug.c | 17 ----------------- > 1 files changed, 0 insertions(+), 17 deletions(-) > > diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c > index 24c807f..a6489fd 100644 > --- a/drivers/acpi/acpi_memhotplug.c > +++ b/drivers/acpi/acpi_memhotplug.c > @@ -220,15 +220,6 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device) > struct acpi_memory_info *info; > int node; > > - > - /* Get the range from the _CRS */ > - result = acpi_memory_get_device_resources(mem_device); > - if (result) { > - printk(KERN_ERR PREFIX "get_device_resources failed\n"); > - mem_device->state = MEMORY_INVALID_STATE; > - return result; > - } > - > node = acpi_get_node(mem_device->device->handle); > /* > * Tell the VM there is more memory here... > @@ -357,14 +348,6 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data) > break; > } > > - if (acpi_memory_check_device(mem_device)) > - break; > - > - if (acpi_memory_enable_device(mem_device)) { > - printk(KERN_ERR PREFIX "Cannot enable memory device\n"); > - break; > - } > - > ost_code = ACPI_OST_SC_SUCCESS; > break; > > -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.