Linux MIPS Architecture development
 help / color / mirror / Atom feed
* use bootmem in platform code on MIPS
@ 2010-04-27 12:14 Manuel Lauss
  2010-04-28 15:54 ` Ralf Baechle
  0 siblings, 1 reply; 4+ messages in thread
From: Manuel Lauss @ 2010-04-27 12:14 UTC (permalink / raw)
  To: Linux-MIPS

Hello,

I'd like to use bootmem to reserve large chunks of RAM (at a particular physical
address; for Au1200 MAE, CIM and framebuffer, and later Au1300 OpenGL block)
but it seems that it can't be done:  Doing __alloc_bootmem() in
plat_mem_setup() is
too early, while an arch_initcall() is too late because by then the
slab allocator is
already up and handing out random addresses and/or refusing allocations larger
than a few MBytes.

Is there another callback I could use which would allow me to use bootmem (short
of abusing plat_smp_setup)?

Would a separate callback like this be an acceptable solution?

--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -487,6 +487,10 @@ static void __init arch_mem_init(char **cmdline_p)
        }

        bootmem_init();
+
+       if (plat_bootmem_init)
+               plat_bootmem_init();
+
        sparse_init();
        paging_init();
 }

Thanks,
     Manuel Lauss

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-04-28 18:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-27 12:14 use bootmem in platform code on MIPS Manuel Lauss
2010-04-28 15:54 ` Ralf Baechle
2010-04-28 16:28   ` Manuel Lauss
2010-04-28 18:59     ` David Daney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox