From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yasunori Goto Subject: Re: [PATCH 2/2] acpi hotplug cleanups, move install notifier to add function Date: Mon, 28 Aug 2006 17:08:39 +0900 Message-ID: <20060828165449.F61C.Y-GOTO@jp.fujitsu.com> References: <20060825205423.0778.Y-GOTO@jp.fujitsu.com> <1156701501.1852.20.camel@linux-1vxn.site> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:46251 "EHLO fgwmail6.fujitsu.co.jp") by vger.kernel.org with ESMTP id S1751418AbWH1IKJ (ORCPT ); Mon, 28 Aug 2006 04:10:09 -0400 In-Reply-To: <1156701501.1852.20.camel@linux-1vxn.site> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: mail@renninger.de Cc: trenn@suse.de, akpm@osdl.org, "Brown, Len" , keith mannthey , ACPI-ML , Linux Kernel ML , Linux Hotplug Memory Support , naveen.b.s@intel.com > @@ -390,6 +296,13 @@ static int acpi_memory_device_add(struct > if (!device) > return -EINVAL; > > + /* Check for _STA and EJ0 func */ > + if (!device->flags.dynamic_status || !device->flags.ejectable){ > + printk(KERN_INFO PREFIX "Memory device %s has no _STA or" > + "EJ0/EJD function", acpi_device_bid(device)); > + return -ENODEV; > + } > + > mem_device = kmalloc(sizeof(struct acpi_memory_device), GFP_KERNEL); > if (!mem_device) > return -ENOMEM; One comment. Memory device might not have _EJ0/_EJD, but parent device (like one NUMA node) might be able to be ejectable. In this case, only the parent device has _EJ0/_EJD. So, one more check is necessary. (If a node is hot-added, container driver of acpi calls acpi_memhotplug driver.) Thanks. -- Yasunori Goto