From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751594AbcFXDWt (ORCPT ); Thu, 23 Jun 2016 23:22:49 -0400 Received: from mail-pa0-f68.google.com ([209.85.220.68]:36737 "EHLO mail-pa0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751235AbcFXDWr (ORCPT ); Thu, 23 Jun 2016 23:22:47 -0400 Subject: Re: [PATCH] powerpc/mm: update arch_{add,remove}_memory() for radix To: "Aneesh Kumar K.V" , Reza Arbab , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Dan Williams , Gavin Shan , David Gibson , Vasant Hegde , Scott Wood , "Oliver O'Halloran" , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <1466699962-22412-1-git-send-email-arbab@linux.vnet.ibm.com> <87mvmbygdb.fsf@skywalker.in.ibm.com> From: Balbir Singh Message-ID: Date: Fri, 24 Jun 2016 13:22:37 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <87mvmbygdb.fsf@skywalker.in.ibm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24/06/16 03:17, Aneesh Kumar K.V wrote: > Reza Arbab writes: > >> These functions are making direct calls to the hash table APIs, >> leading to a BUG() on systems using radix. >> >> Switch them to the vmemmap_{create,remove}_mapping() wrappers, and >> move to the __meminit section. > > > They are really not the same. They can possibly end up using different > base page size. Also vmemmap is available only with SPARSEMEM_VMEMMAP > enabled. Does hotplug depend on sparsemem vmemmap ? # eventually, we can have this option just 'select SPARSEMEM' config MEMORY_HOTPLUG bool "Allow for memory hot-add" depends on SPARSEMEM || X86_64_ACPI_NUMA depends on ARCH_ENABLE_MEMORY_HOTPLUG We depend on sparsemem for sure. vmemmap is just a way of getting the memory virtually mapped. From the patch perspective, I think we need the equivalent of just mapping the pages in kernel. The address may differ based on whether vmemmap is used or not and of-course page_size, Balbir Singh