aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 36376d8418fa..fa54a4ee3d6c 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;
83static void __init l1sram_init(void) 83static void __init l1sram_init(void)
84{ 84{
85 unsigned int cpu; 85 unsigned int cpu;
86 unsigned long reserve;
87
88#ifdef CONFIG_SMP
89 reserve = 0;
90#else
91 reserve = sizeof(struct l1_scratch_task_info);
92#endif
93
86 for (cpu = 0; cpu < num_possible_cpus(); ++cpu) { 94 for (cpu = 0; cpu < num_possible_cpus(); ++cpu) {
87 per_cpu(free_l1_ssram_head, cpu).next = 95 per_cpu(free_l1_ssram_head, cpu).next =
88 kmem_cache_alloc(sram_piece_cache, GFP_KERNEL); 96 kmem_cache_alloc(sram_piece_cache, GFP_KERNEL);
@@ -91,8 +99,8 @@ static void __init l1sram_init(void)
91 return; 99 return;
92 } 100 }
93 101
94 per_cpu(free_l1_ssram_head, cpu).next->paddr = (void *)get_l1_scratch_start_cpu(cpu); 102 per_cpu(free_l1_ssram_head, cpu).next->paddr = (void *)get_l1_scratch_start_cpu(cpu) + reserve;
95 per_cpu(free_l1_ssram_head, cpu).next->size = L1_SCRATCH_LENGTH; 103 per_cpu(free_l1_ssram_head, cpu).next->size = L1_SCRATCH_LENGTH - reserve;
96 per_cpu(free_l1_ssram_head, cpu).next->pid = 0; 104 per_cpu(free_l1_ssram_head, cpu).next->pid = 0;
97 per_cpu(free_l1_ssram_head, cpu).next->next = NULL; 105 per_cpu(free_l1_ssram_head, cpu).next->next = NULL;
98 106