[PATCH] powerpc: Remove more traces of bootmem

Michael Ellerman mpe at ellerman.id.au
Tue Nov 18 21:28:20 AEDT 2014


On Tue, 2014-11-18 at 17:52 +1100, Michael Ellerman wrote:
> diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c
> index 009a2004b876..86ed156f468f 100644
> --- a/arch/powerpc/platforms/ps3/setup.c
> +++ b/arch/powerpc/platforms/ps3/setup.c
> @@ -125,12 +125,8 @@ static void __init prealloc(struct ps3_prealloc *p)
>  	if (!p->size)
>  		return;
>  
> -	p->address = __alloc_bootmem(p->size, p->align, __pa(MAX_DMA_ADDRESS));
> -	if (!p->address) {
> -		printk(KERN_ERR "%s: Cannot allocate %s\n", __func__,
> -		       p->name);
> -		return;
> -	}
> +	p->address = __va(memblock_alloc_base(p->size, p->align,
> +					      __pa(MAX_DMA_ADDRESS)));

This should be:

> +	p->address = __va(memblock_alloc(p->size, p->align));

And a comment in the change log pointing out that MAX_DMA_ADDRESS is ~0ull on
powerpc, so limiting allocations to that is pointless.

cheers




More information about the Linuxppc-dev mailing list