aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mm
diff options
context:
space:
mode:
authorGraf Yang <graf.yang@analog.com>2009-05-25 06:40:42 +0000
committerMike Frysinger <vapier@gentoo.org>2009-06-12 06:11:51 -0400
commit89ecd506917ba6e86ede072efbef6c69d01db4dd (patch)
tree3e98b210fde164a21cccbf27a769cf07b7f4857a /arch/blackfin/mm
parentc72aa0794a0ecc0b87ba9d5546215c26c8c80668 (diff)
downloadkernel_samsung_smdk4412-89ecd506917ba6e86ede072efbef6c69d01db4dd.zip
kernel_samsung_smdk4412-89ecd506917ba6e86ede072efbef6c69d01db4dd.tar.gz
kernel_samsung_smdk4412-89ecd506917ba6e86ede072efbef6c69d01db4dd.tar.bz2
Blackfin: fix handling of initial L1 reservation
This restores some L1 reservation logic that was lost during the Blackfin SMP merge. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mm')
-rw-r--r--arch/blackfin/mm/sram-alloc.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/blackfin/mm/sram-alloc.c b/arch/blackfin/mm/sram-alloc.c
index 36376d8..fa54a4e 100644
--- a/arch/blackfin/mm/sram-alloc.c
+++ b/arch/blackfin/mm/sram-alloc.c
@@ -83,6 +83,14 @@ static struct kmem_cache *sram_piece_cache;
static void __init l1sram_init(void)
{
unsigned int cpu;
+ unsigned long reserve;
+
+#ifdef CONFIG_SMP
+ reserve = 0;
+#else
+ reserve = sizeof(struct l1_scratch_task_info);
+#endif
+
for (cpu = 0; cpu < num_possible_cpus(); ++cpu) {
per_cpu(free_l1_ssram_head, cpu).next =
kmem_cache_alloc(sram_piece_cache, GFP_KERNEL);
@@ -91,8 +99,8 @@ static void __init l1sram_init(void)
return;
}
- per_cpu(free_l1_ssram_head, cpu).next->paddr = (void *)get_l1_scratch_start_cpu(cpu);
- per_cpu(free_l1_ssram_head, cpu).next->size = L1_SCRATCH_LENGTH;
+ per_cpu(free_l1_ssram_head, cpu).next->paddr = (void *)get_l1_scratch_start_cpu(cpu) + reserve;
+ per_cpu(free_l1_ssram_head, cpu).next->size = L1_SCRATCH_LENGTH - reserve;
per_cpu(free_l1_ssram_head, cpu).next->pid = 0;
per_cpu(free_l1_ssram_head, cpu).next->next = NULL;