On Mon, Nov 26, 2018 at 12:21:34AM -0800, Christoph Hellwig wrote:
> > static void __init *early_alloc_aligned(unsigned long sz, unsigned long
> > align)
> > {
> > - void *ptr = __va(memblock_phys_alloc(sz, align));
> > - memset(ptr, 0, sz);
> > - return ptr;
> > + return memblock_alloc(
> static void __init *early_alloc_aligned(unsigned long sz, unsigned long
> align)
> {
> - void *ptr = __va(memblock_phys_alloc(sz, align));
> - memset(ptr, 0, sz);
> - return ptr;
> + return memblock_alloc(sz, align);
> }
What is the point of keeping this wrapper?
> static v
On Mon, Nov 26, 2018 at 08:03:55AM +0100, Christophe LEROY wrote:
>
>
> Le 25/11/2018 à 22:44, Mike Rapoport a écrit :
> >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
Le 25/11/2018 à 22:44, Mike Rapoport a écrit :
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
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