| To: | Linux-MIPS <linux-mips@linux-mips.org> |
|---|---|
| Subject: | use bootmem in platform code on MIPS |
| From: | Manuel Lauss <manuel.lauss@googlemail.com> |
| Date: | Tue, 27 Apr 2010 14:14:32 +0200 |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=jFSdP2eKxW2WctFyaOKBOQDDYlcJ/rdfHayiC4xnCL0=; b=TYeLiXJPapCkUE1t2gRxVlwcAFsxQrnWHZCkodNMwIOfHCcTqNyf5PPdbWSgFKrpPV 6VT6U4FmtMl+rA9hMQRynUuKmMz5vV4Gk/5qUnNRiC4QD294DZ3ZreL/oYIXJiMQ+3GN zhhOg9jIQU9Atp+zD9PySkUiKCfvQHGKHa4t8= |
| Domainkey-signature: | a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=WH08/WiMIL5/DWb7jF3YeHaTKR+VKCqxUhxMtHXc8V+1UsHther/kJeBWptqMX92vn qAsDYfhK1MS9zmuD4plQS/gAuiFMX0t+vk+d3ns/S2DYvbIC3UsTQxsbAgTN38ekdh+w uaOyVsPqV+2Tok35sy083VaALIp9pk+Rp1UUs= |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| Sender: | linux-mips-bounce@linux-mips.org |
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
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Cavium mips64 perf counters, Giant Sand Fan's |
|---|---|
| Next by Date: | issue with gdb load_symbol_file command when loading symbols for MIPS kernel modules, David Olien |
| Previous by Thread: | [PATCH 1/2] MIPS: Fixup and cleanup of TO_PHYS(), TO_CAC(), TO_UNCAC(), Wu Zhangjin |
| Next by Thread: | Re: use bootmem in platform code on MIPS, Ralf Baechle |
| Indexes: | [Date] [Thread] [Top] [All Lists] |