public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Geoff Levand <geoffrey.levand@am•sony.com>
To: Benjamin Herrenschmidt <benh@kernel•crashing.org>
Cc: Linuxppc-dev@ozlabs•org
Subject: [RFC patch] powerpc/ps3: Add ps3_topology_ready routine
Date: Wed, 11 Feb 2009 15:31:19 -0800	[thread overview]
Message-ID: <49935FC7.9010006@am.sony.com> (raw)
In-Reply-To: <49935F81.7060203@am.sony.com>

Switch the PS3 hotplug memory routine ps3_mm_add_memory() from
being a core_initcall routine to being called via the new
topology_ready powerpc machdep call.

core_initcall routines run before the powerpc topology_init()
startup routine, resulting in failure of ps3_mm_add_memory()
when CONFIG_NUMA=y.

Signed-off-by: Geoff Levand <geoffrey.levand@am•sony.com>
---
 arch/powerpc/platforms/ps3/mm.c       |    4 +---
 arch/powerpc/platforms/ps3/platform.h |    1 +
 arch/powerpc/platforms/ps3/setup.c    |    6 ++++++
 3 files changed, 8 insertions(+), 3 deletions(-)

--- a/arch/powerpc/platforms/ps3/mm.c
+++ b/arch/powerpc/platforms/ps3/mm.c
@@ -289,7 +289,7 @@ static void ps3_mm_region_destroy(struct
  * ps3_mm_add_memory - hot add memory
  */
 
-static int __init ps3_mm_add_memory(void)
+int __init ps3_mm_add_memory(void)
 {
 	int result;
 	unsigned long start_addr;
@@ -328,8 +328,6 @@ static int __init ps3_mm_add_memory(void
 	return result;
 }
 
-core_initcall(ps3_mm_add_memory);
-
 /*============================================================================*/
 /* dma routines                                                               */
 /*============================================================================*/
--- a/arch/powerpc/platforms/ps3/platform.h
+++ b/arch/powerpc/platforms/ps3/platform.h
@@ -37,6 +37,7 @@ void __init ps3_mm_init(void);
 void __init ps3_mm_vas_create(unsigned long* htab_size);
 void ps3_mm_vas_destroy(void);
 void ps3_mm_shutdown(void);
+int __init ps3_mm_add_memory(void);
 
 /* irq */
 
--- a/arch/powerpc/platforms/ps3/setup.c
+++ b/arch/powerpc/platforms/ps3/setup.c
@@ -249,6 +249,11 @@ static int __init ps3_probe(void)
 	return 1;
 }
 
+static void __init ps3_topology_ready(void)
+{
+	ps3_mm_add_memory();
+}
+
 #if defined(CONFIG_KEXEC)
 static void ps3_kexec_cpu_down(int crash_shutdown, int secondary)
 {
@@ -267,6 +272,7 @@ define_machine(ps3) {
 	.name				= "PS3",
 	.probe				= ps3_probe,
 	.setup_arch			= ps3_setup_arch,
+	.topology_ready			= ps3_topology_ready,
 	.init_IRQ			= ps3_init_IRQ,
 	.panic				= ps3_panic,
 	.get_boot_time			= ps3_get_boot_time,

  reply	other threads:[~2009-02-11 23:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-11 23:30 [RFC patch] powerpc: Add topology_ready to machdep calls Geoff Levand
2009-02-11 23:31 ` Geoff Levand [this message]
2009-02-12  4:21 ` Benjamin Herrenschmidt
2009-02-12  4:21 ` Benjamin Herrenschmidt
2009-02-12 22:36 ` [patch] powerpc/ps3: Move ps3_mm_add_memory to device_initcall 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=49935FC7.9010006@am.sony.com \
    --to=geoffrey.levand@am$(echo .)sony.com \
    --cc=Linuxppc-dev@ozlabs$(echo .)org \
    --cc=benh@kernel$(echo .)crashing.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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