summaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mm/init.c
diff options
context:
space:
mode:
authorSonic Zhang <sonic.zhang@analog.com>2008-07-19 14:51:31 +0800
committerBryan Wu <cooloney@kernel.org>2008-07-19 14:51:31 +0800
commit5d481f497559245ecfb1b95cafe39bfbf037fda5 (patch)
tree2fda653110eee285def1a063bde65c3a45e7bc5f /arch/blackfin/mm/init.c
parent1a8caeebe3689ad4ef67d7ff5d4143f7748deedd (diff)
downloadop-kernel-dev-5d481f497559245ecfb1b95cafe39bfbf037fda5.zip
op-kernel-dev-5d481f497559245ecfb1b95cafe39bfbf037fda5.tar.gz
Blackfin arch: change L1 malloc to base on slab cache and lists.
Remove the sram piece limitation and improve the performance to alloc/free sram piece data. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/mm/init.c')
-rw-r--r--arch/blackfin/mm/init.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/blackfin/mm/init.c b/arch/blackfin/mm/init.c
index ec3141f..4aab21f 100644
--- a/arch/blackfin/mm/init.c
+++ b/arch/blackfin/mm/init.c
@@ -164,11 +164,14 @@ void __init mem_init(void)
"(%uk init code, %uk kernel code, %uk data, %uk dma, %uk reserved)\n",
(unsigned long) freepages << (PAGE_SHIFT-10), _ramend >> 10,
initk, codek, datak, DMA_UNCACHED_REGION >> 10, (reservedpages << (PAGE_SHIFT-10)));
+}
+
+static int __init sram_init(void)
+{
+ unsigned long tmp;
/* Initialize the blackfin L1 Memory. */
- l1sram_init();
- l1_data_sram_init();
- l1_inst_sram_init();
+ bfin_sram_init();
/* Allocate this once; never free it. We assume this gives us a
pointer to the start of L1 scratchpad memory; panic if it
@@ -179,7 +182,10 @@ void __init mem_init(void)
tmp, (unsigned long)L1_SCRATCH_TASK_INFO);
panic("No L1, time to give up\n");
}
+
+ return 0;
}
+pure_initcall(sram_init);
static void __init free_init_pages(const char *what, unsigned long begin, unsigned long end)
{
OpenPOWER on IntegriCloud