Re: [PATCH] powerpc/mm: update arch_{add,remove}_memory() for radix

2016-06-29 Thread Reza Arbab
On Tue, Jun 28, 2016 at 09:21:05PM +1000, Michael Ellerman wrote: No, you need to use mmu_linear_psize for the hotplug case. But you can probably factor out a common routine that both cases use, and hide the hash vs radix check in that. Okay, I'm trying to refactor {create,remove}_section_mapp

Re: [PATCH] powerpc/mm: update arch_{add,remove}_memory() for radix

2016-06-28 Thread Aneesh Kumar K.V
Michael Ellerman writes: > On Thu, 2016-06-23 at 14:37 -0500, Reza Arbab wrote: >> On Thu, Jun 23, 2016 at 10:47:20PM +0530, 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. >>

Re: [PATCH] powerpc/mm: update arch_{add,remove}_memory() for radix

2016-06-28 Thread Michael Ellerman
On Thu, 2016-06-23 at 14:37 -0500, Reza Arbab wrote: > On Thu, Jun 23, 2016 at 10:47:20PM +0530, 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 vme

Re: [PATCH] powerpc/mm: update arch_{add,remove}_memory() for radix

2016-06-23 Thread Balbir Singh
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. > > > T

Re: [PATCH] powerpc/mm: update arch_{add,remove}_memory() for radix

2016-06-23 Thread Reza Arbab
On Thu, Jun 23, 2016 at 02:37:39PM -0500, Reza Arbab wrote: Could it be that the functions just need to be renamed hash__create_mapping()/radix__create_mapping() and moved out of #ifdef SPARSEMEM_VMEMMAP? Or vice-versa, maybe the callers should have been wrapped in the first place: arch_add

Re: [PATCH] powerpc/mm: update arch_{add,remove}_memory() for radix

2016-06-23 Thread Reza Arbab
On Thu, Jun 23, 2016 at 10:47:20PM +0530, 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. Th

Re: [PATCH] powerpc/mm: update arch_{add,remove}_memory() for radix

2016-06-23 Thread Nathan Fontenot
On 06/23/2016 12:17 PM, 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. > >

Re: [PATCH] powerpc/mm: update arch_{add,remove}_memory() for radix

2016-06-23 Thread Aneesh Kumar K.V
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

[PATCH] powerpc/mm: update arch_{add,remove}_memory() for radix

2016-06-23 Thread Reza Arbab
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. Signed-off-by: Reza Arbab --- arch/powerpc/mm/mem.c | 8 1 file changed, 4 insert