Commit 5d481f49 authored by Sonic Zhang's avatar Sonic Zhang Committed by Bryan Wu

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: default avatarSonic Zhang <sonic.zhang@analog.com>
Signed-off-by: default avatarBryan Wu <cooloney@kernel.org>
parent 1a8caeeb
This diff is collapsed.
......@@ -30,9 +30,7 @@
#ifndef __BLACKFIN_SRAM_H__
#define __BLACKFIN_SRAM_H__
extern void l1sram_init(void);
extern void l1_inst_sram_init(void);
extern void l1_data_sram_init(void);
extern void bfin_sram_init(void);
extern void *l1sram_alloc(size_t);
#endif
......@@ -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)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment