From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934916AbdDFN6v convert rfc822-to-8bit (ORCPT ); Thu, 6 Apr 2017 09:58:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34994 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753996AbdDFN6n (ORCPT ); Thu, 6 Apr 2017 09:58:43 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 817F73DBCB Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jglisse@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 817F73DBCB Date: Thu, 6 Apr 2017 09:58:34 -0400 (EDT) From: Jerome Glisse To: Anshuman Khandual Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, John Hubbard , Dan Williams , Naoya Horiguchi , David Nellans , Russell King , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Martin Schwidefsky , Heiko Carstens , Yoshinori Sato , Rich Felker , Chris Metcalf , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" Message-ID: <305282435.22336766.1491487114644.JavaMail.zimbra@redhat.com> In-Reply-To: <8b5cbc13-7abe-f090-5485-8990d9a837ac@linux.vnet.ibm.com> References: <20170405204026.3940-1-jglisse@redhat.com> <20170405204026.3940-2-jglisse@redhat.com> <8b5cbc13-7abe-f090-5485-8990d9a837ac@linux.vnet.ibm.com> Subject: Re: [HMM 01/16] mm/memory/hotplug: add memory type parameter to arch_add/remove_memory MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Originating-IP: [10.19.40.126, 10.4.195.2] Thread-Topic: mm/memory/hotplug: add memory type parameter to arch_add/remove_memory Thread-Index: PIWlW+ejAJhYwnkJoL3goNyB111fxw== X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 06 Apr 2017 13:58:42 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c > > index 5f84433..0933261 100644 > > --- a/arch/powerpc/mm/mem.c > > +++ b/arch/powerpc/mm/mem.c > > @@ -126,14 +126,31 @@ int __weak remove_section_mapping(unsigned long > > start, unsigned long end) > > return -ENODEV; > > } > > > > -int arch_add_memory(int nid, u64 start, u64 size, bool for_device) > > +int arch_add_memory(int nid, u64 start, u64 size, enum memory_type type) > > { > > struct pglist_data *pgdata; > > - struct zone *zone; > > unsigned long start_pfn = start >> PAGE_SHIFT; > > unsigned long nr_pages = size >> PAGE_SHIFT; > > + bool for_device = false; > > + struct zone *zone; > > int rc; > > > > + /* > > + * Each memory_type needs special handling, so error out on an > > + * unsupported type. In particular, MEMORY_DEVICE_UNADDRESSABLE > > + * is not supported on this architecture. > > The concept of MEMORY_DEVICE_UNADDRESSABLE has not been > introduced yet in this patch if I read correctly. Correct, i did not want to add comment to all the arch file in the patch that add it because this is one of the most painful patch to rebase so instead of having more patch that are problematic for rebase i just added the proper comment ahead of time to make my constant rebasing easier. Cheers, Jérôme