From: Michael Ellerman <mpe@ellerman.id.au>
To: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] powerpc: Remove more traces of bootmem
Date: Tue, 18 Nov 2014 21:28:20 +1100 [thread overview]
Message-ID: <1416306500.28359.1.camel@concordia> (raw)
In-Reply-To: <1416293575-1847-1-git-send-email-mpe@ellerman.id.au>
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
prev parent reply other threads:[~2014-11-18 10:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-18 6:52 [PATCH] powerpc: Remove more traces of bootmem Michael Ellerman
2014-11-18 10:26 ` David Laight
2014-11-19 5:29 ` Michael Ellerman
2014-11-19 7:57 ` Michael Ellerman
2014-11-18 10:28 ` Michael Ellerman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1416306500.28359.1.camel@concordia \
--to=mpe@ellerman.id.au \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).