Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751424AbWH1IK1 (ORCPT ); Mon, 28 Aug 2006 04:10:27 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751428AbWH1IK0 (ORCPT ); Mon, 28 Aug 2006 04:10:26 -0400 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 Date: Mon, 28 Aug 2006 17:08:39 +0900 From: Yasunori Goto To: mail@renninger.de Subject: Re: [PATCH 2/2] acpi hotplug cleanups, move install notifier to add function 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 In-Reply-To: <1156701501.1852.20.camel@linux-1vxn.site> References: <20060825205423.0778.Y-GOTO@jp.fujitsu.com> <1156701501.1852.20.camel@linux-1vxn.site> X-Mailer-Plugin: BkASPil for Becky!2 Ver.2.068 Message-Id: <20060828165449.F61C.Y-GOTO@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.24.02 [ja] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1048 Lines: 37 > @@ -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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/