From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerald Schaefer Subject: Re: [RFC PATCH v5 12/19] memory-hotplug: introduce new function arch_remove_memory() Date: Tue, 31 Jul 2012 14:40:00 +0200 Message-ID: <20120731144000.33fd4a0a@thinkpad> References: <50126B83.3050201@cn.fujitsu.com> <50126E2F.8010301@cn.fujitsu.com> <20120730102305.GB3631@osiris.boeblingen.de.ibm.com> <50166379.4090305@cn.fujitsu.com> Reply-To: gerald.schaefer@de.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <50166379.4090305@cn.fujitsu.com> Sender: owner-linux-mm@kvack.org To: Wen Congyang Cc: Heiko Carstens , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-acpi@vger.kernel.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-ia64@vger.kernel.org, cmetcalf@tilera.com, rientjes@google.com, liuj97@gmail.com, len.brown@intel.com, benh@kernel.crashing.org, paulus@samba.org, cl@linux.com, minchan.kim@gmail.com, akpm@linux-foundation.org, kosaki.motohiro@jp.fujitsu.com, Yasuaki ISIMATU List-Id: linux-acpi@vger.kernel.org On Mon, 30 Jul 2012 18:35:37 +0800 Wen Congyang wrote: > At 07/30/2012 06:23 PM, Heiko Carstens Wrote: > > On Fri, Jul 27, 2012 at 06:32:15PM +0800, Wen Congyang wrote: > >> We don't call __add_pages() directly in the function add_memory() > >> because some other architecture related things need to be done > >> before or after calling __add_pages(). So we should introduce > >> a new function arch_remove_memory() to revert the things > >> done in arch_add_memory(). > >> > >> Note: the function for s390 is not implemented(I don't know how to > >> implement it for s390). > >=20 > > There is no hardware or firmware interface which could trigger a > > hot memory remove on s390. So there is nothing that needs to be > > implemented. >=20 > Thanks for providing this information. >=20 > According to this, arch_remove_memory() for s390 can just return > -EBUSY. Yes, but there is a prototype mismatch for arch_remove_memory() on s390 and also other architectures (u64 vs. unsigned long). arch/s390/mm/init.c:262: error: conflicting types for =E2=80=98arch_remove_memory=E2=80=99 include/linux/memory_hotplug.h:88: err= or: previous declaration of =E2=80=98arch_remove_memory=E2=80=99 was here In memory_hotplug.h you have: extern int arch_remove_memory(unsigned long start, unsigned long size); On all archs other than x86 you have: int arch_remove_memory(u64 start, u64 size) -- 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: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerald Schaefer Date: Tue, 31 Jul 2012 12:40:00 +0000 Subject: Re: [RFC PATCH v5 12/19] memory-hotplug: introduce new function arch_remove_memory() Message-Id: <20120731144000.33fd4a0a@thinkpad> List-Id: References: <50126B83.3050201@cn.fujitsu.com> <50126E2F.8010301@cn.fujitsu.com> <20120730102305.GB3631@osiris.boeblingen.de.ibm.com> <50166379.4090305@cn.fujitsu.com> In-Reply-To: <50166379.4090305@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: Wen Congyang Cc: Heiko Carstens , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-acpi@vger.kernel.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-ia64@vger.kernel.org, cmetcalf@tilera.com, rientjes@google.com, liuj97@gmail.com, len.brown@intel.com, benh@kernel.crashing.org, paulus@samba.org, cl@linux.com, minchan.kim@gmail.com, akpm@linux-foundation.org, kosaki.motohiro@jp.fujitsu.com, Yasuaki ISIMATU On Mon, 30 Jul 2012 18:35:37 +0800 Wen Congyang wrote: > At 07/30/2012 06:23 PM, Heiko Carstens Wrote: > > On Fri, Jul 27, 2012 at 06:32:15PM +0800, Wen Congyang wrote: > >> We don't call __add_pages() directly in the function add_memory() > >> because some other architecture related things need to be done > >> before or after calling __add_pages(). So we should introduce > >> a new function arch_remove_memory() to revert the things > >> done in arch_add_memory(). > >> > >> Note: the function for s390 is not implemented(I don't know how to > >> implement it for s390). > > > > There is no hardware or firmware interface which could trigger a > > hot memory remove on s390. So there is nothing that needs to be > > implemented. > > Thanks for providing this information. > > According to this, arch_remove_memory() for s390 can just return > -EBUSY. Yes, but there is a prototype mismatch for arch_remove_memory() on s390 and also other architectures (u64 vs. unsigned long). arch/s390/mm/init.c:262: error: conflicting types for ‘arch_remove_memory’ include/linux/memory_hotplug.h:88: error: previous declaration of ‘arch_remove_memory’ was here In memory_hotplug.h you have: extern int arch_remove_memory(unsigned long start, unsigned long size); On all archs other than x86 you have: int arch_remove_memory(u64 start, u64 size) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "e06smtp15.uk.ibm.com", Issuer "GeoTrust SSL CA" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 391742C0089 for ; Tue, 31 Jul 2012 22:40:40 +1000 (EST) Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 31 Jul 2012 13:40:35 +0100 Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by d06nrmr1707.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q6VCe5XW2724072 for ; Tue, 31 Jul 2012 13:40:05 +0100 Received: from d06av05.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q6VCe3cV001509 for ; Tue, 31 Jul 2012 06:40:04 -0600 Date: Tue, 31 Jul 2012 14:40:00 +0200 From: Gerald Schaefer To: Wen Congyang Subject: Re: [RFC PATCH v5 12/19] memory-hotplug: introduce new function arch_remove_memory() Message-ID: <20120731144000.33fd4a0a@thinkpad> In-Reply-To: <50166379.4090305@cn.fujitsu.com> References: <50126B83.3050201@cn.fujitsu.com> <50126E2F.8010301@cn.fujitsu.com> <20120730102305.GB3631@osiris.boeblingen.de.ibm.com> <50166379.4090305@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: linux-s390@vger.kernel.org, linux-ia64@vger.kernel.org, len.brown@intel.com, linux-acpi@vger.kernel.org, linux-sh@vger.kernel.org, Heiko Carstens , linux-kernel@vger.kernel.org, cmetcalf@tilera.com, linux-mm@kvack.org, Yasuaki ISIMATU , paulus@samba.org, minchan.kim@gmail.com, kosaki.motohiro@jp.fujitsu.com, rientjes@google.com, cl@linux.com, linuxppc-dev@lists.ozlabs.org, akpm@linux-foundation.org, liuj97@gmail.com Reply-To: gerald.schaefer@de.ibm.com List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, 30 Jul 2012 18:35:37 +0800 Wen Congyang wrote: > At 07/30/2012 06:23 PM, Heiko Carstens Wrote: > > On Fri, Jul 27, 2012 at 06:32:15PM +0800, Wen Congyang wrote: > >> We don't call __add_pages() directly in the function add_memory() > >> because some other architecture related things need to be done > >> before or after calling __add_pages(). So we should introduce > >> a new function arch_remove_memory() to revert the things > >> done in arch_add_memory(). > >> > >> Note: the function for s390 is not implemented(I don't know how to > >> implement it for s390). > >=20 > > There is no hardware or firmware interface which could trigger a > > hot memory remove on s390. So there is nothing that needs to be > > implemented. >=20 > Thanks for providing this information. >=20 > According to this, arch_remove_memory() for s390 can just return > -EBUSY. Yes, but there is a prototype mismatch for arch_remove_memory() on s390 and also other architectures (u64 vs. unsigned long). arch/s390/mm/init.c:262: error: conflicting types for =E2=80=98arch_remove_memory=E2=80=99 include/linux/memory_hotplug.h:88: err= or: previous declaration of =E2=80=98arch_remove_memory=E2=80=99 was here In memory_hotplug.h you have: extern int arch_remove_memory(unsigned long start, unsigned long size); On all archs other than x86 you have: int arch_remove_memory(u64 start, u64 size) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756228Ab2GaMkO (ORCPT ); Tue, 31 Jul 2012 08:40:14 -0400 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:45669 "EHLO e06smtp14.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756183Ab2GaMkK convert rfc822-to-8bit (ORCPT ); Tue, 31 Jul 2012 08:40:10 -0400 Date: Tue, 31 Jul 2012 14:40:00 +0200 From: Gerald Schaefer To: Wen Congyang Cc: Heiko Carstens , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-acpi@vger.kernel.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-ia64@vger.kernel.org, cmetcalf@tilera.com, rientjes@google.com, liuj97@gmail.com, len.brown@intel.com, benh@kernel.crashing.org, paulus@samba.org, cl@linux.com, minchan.kim@gmail.com, akpm@linux-foundation.org, kosaki.motohiro@jp.fujitsu.com, Yasuaki ISIMATU Subject: Re: [RFC PATCH v5 12/19] memory-hotplug: introduce new function arch_remove_memory() Message-ID: <20120731144000.33fd4a0a@thinkpad> In-Reply-To: <50166379.4090305@cn.fujitsu.com> References: <50126B83.3050201@cn.fujitsu.com> <50126E2F.8010301@cn.fujitsu.com> <20120730102305.GB3631@osiris.boeblingen.de.ibm.com> <50166379.4090305@cn.fujitsu.com> Reply-To: gerald.schaefer@de.ibm.com X-Mailer: Claws Mail 3.7.9 (GTK+ 2.24.6; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT x-cbid: 12073112-1948-0000-0000-0000028B946C Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 30 Jul 2012 18:35:37 +0800 Wen Congyang wrote: > At 07/30/2012 06:23 PM, Heiko Carstens Wrote: > > On Fri, Jul 27, 2012 at 06:32:15PM +0800, Wen Congyang wrote: > >> We don't call __add_pages() directly in the function add_memory() > >> because some other architecture related things need to be done > >> before or after calling __add_pages(). So we should introduce > >> a new function arch_remove_memory() to revert the things > >> done in arch_add_memory(). > >> > >> Note: the function for s390 is not implemented(I don't know how to > >> implement it for s390). > > > > There is no hardware or firmware interface which could trigger a > > hot memory remove on s390. So there is nothing that needs to be > > implemented. > > Thanks for providing this information. > > According to this, arch_remove_memory() for s390 can just return > -EBUSY. Yes, but there is a prototype mismatch for arch_remove_memory() on s390 and also other architectures (u64 vs. unsigned long). arch/s390/mm/init.c:262: error: conflicting types for ‘arch_remove_memory’ include/linux/memory_hotplug.h:88: error: previous declaration of ‘arch_remove_memory’ was here In memory_hotplug.h you have: extern int arch_remove_memory(unsigned long start, unsigned long size); On all archs other than x86 you have: int arch_remove_memory(u64 start, u64 size)