linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Geoff Levand <geoffrey.levand@am.sony.com>
Cc: "linuxppc-dev@ozlabs.org" <linuxppc-dev@ozlabs.org>,
	Paul Mackerras <paulus@samba.org>
Subject: Re: PS3: Fix memory hotplug
Date: Wed, 14 May 2008 23:48:45 -0700	[thread overview]
Message-ID: <1210834125.8297.80.camel@pasglop> (raw)
In-Reply-To: <4829C07A.4040407@am.sony.com>


On Tue, 2008-05-13 at 09:23 -0700, Geoff Levand wrote:
> A change was made to walk_memory_resource() in commit
> 4b119e21d0c66c22e8ca03df05d9de623d0eb50f that added a
> check of find_lmb().  Add the corresponding lmb_add()
> call to ps3_mm_add_memory() so that that check will
> succeed.
> 
> This fixes the condition where the PS3 boots up with
> just the 128 MiB of boot memory.
> 
> Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
> ---

When you do an lmb_add you should probably also do an lmb_analyze to
update the total memory count etc...

That leads to some interesting issues such as the LMB stuff wasn't
really meant to be dynamically modified after boot, and thus the kernel
has no locks in there. That can be an issue...

Paul, any thoughts here ? Should we add a lock ? That would mean being
careful as the LMB stuff can be called very early, and spinlock wants
things like PACA and possibly lockdep to be around.. 

Ben.

> Paul,
> 
> Please send this one upstream at your earliest convenience.
> 
> -Geoff
> 
>  arch/powerpc/platforms/ps3/mm.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> --- a/arch/powerpc/platforms/ps3/mm.c
> +++ b/arch/powerpc/platforms/ps3/mm.c
> @@ -317,6 +317,8 @@ static int __init ps3_mm_add_memory(void
>  		return result;
>  	}
>  
> +	lmb_add(start_addr, map.r1.size);
> +
>  	result = online_pages(start_pfn, nr_pages);
>  
>  	if (result)
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

  reply	other threads:[~2008-05-15  6:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-13 16:23 PS3: Fix memory hotplug Geoff Levand
2008-05-15  6:48 ` Benjamin Herrenschmidt [this message]
2008-05-15  6:51   ` Benjamin Herrenschmidt
2008-05-15  7:02     ` David Miller
2008-05-20  0:40       ` [rfc] [patch] LMB: Add basic spin locking to lmb Geoff Levand
2008-05-20  0:55         ` [patch v2] " Geoff Levand
2008-05-20  2:22           ` David Miller
2008-05-20  2:32             ` Benjamin Herrenschmidt
2008-05-20  2:34               ` David Miller
2008-05-15  9:38   ` PS3: Fix memory hotplug Paul Mackerras
2008-05-21 18:31     ` Geoff Levand
2008-05-15 20:09 ` [patch v2] " Geoff Levand
2008-05-21 16:41   ` Geoff Levand

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=1210834125.8297.80.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=geoffrey.levand@am.sony.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.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).