Re: [PATCH v2 5/6] arch: simplify several early memory allocations

2018-12-06 Thread Mike Rapoport
On Thu, Dec 06, 2018 at 07:08:26PM +0100, Sam Ravnborg wrote: > On Mon, Dec 03, 2018 at 06:49:21PM +0200, Mike Rapoport wrote: > > On Mon, Dec 03, 2018 at 05:29:08PM +0100, Sam Ravnborg wrote: > > > Hi Mike. > > > > > > > index c37955d..2a17665 100644 > > > > --- a/arch/sparc/kernel/prom_64.c > >

Re: [PATCH v2 5/6] arch: simplify several early memory allocations

2018-12-06 Thread Sam Ravnborg
On Mon, Dec 03, 2018 at 06:49:21PM +0200, Mike Rapoport wrote: > On Mon, Dec 03, 2018 at 05:29:08PM +0100, Sam Ravnborg wrote: > > Hi Mike. > > > > > index c37955d..2a17665 100644 > > > --- a/arch/sparc/kernel/prom_64.c > > > +++ b/arch/sparc/kernel/prom_64.c > > > @@ -34,16 +34,13 @@ > > > > >

Re: [PATCH v2 5/6] arch: simplify several early memory allocations

2018-12-03 Thread Mike Rapoport
On Mon, Dec 03, 2018 at 05:29:08PM +0100, Sam Ravnborg wrote: > Hi Mike. > > > index c37955d..2a17665 100644 > > --- a/arch/sparc/kernel/prom_64.c > > +++ b/arch/sparc/kernel/prom_64.c > > @@ -34,16 +34,13 @@ > > > > void * __init prom_early_alloc(unsigned long size) > > { > > - unsigned lon

Re: [PATCH v2 5/6] arch: simplify several early memory allocations

2018-12-03 Thread Sam Ravnborg
Hi Mike. > index c37955d..2a17665 100644 > --- a/arch/sparc/kernel/prom_64.c > +++ b/arch/sparc/kernel/prom_64.c > @@ -34,16 +34,13 @@ > > void * __init prom_early_alloc(unsigned long size) > { > - unsigned long paddr = memblock_phys_alloc(size, SMP_CACHE_BYTES); > - void *ret; > +

[PATCH v2 5/6] arch: simplify several early memory allocations

2018-12-03 Thread Mike Rapoport
There are several early memory allocations in arch/ code that use memblock_phys_alloc() to allocate memory, convert the returned physical address to the virtual address and then set the allocated memory to zero. Exactly the same behaviour can be achieved simply by calling memblock_alloc(): it allo