From 33c1bbeff426ed504eb92b8dfc170915f7f82114 Mon Sep 17 00:00:00 2001 From: Graf Yang Date: Mon, 25 May 2009 06:40:42 +0000 Subject: [PATCH] --- yaml --- r: 148574 b: refs/heads/master c: 89ecd506917ba6e86ede072efbef6c69d01db4dd h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/blackfin/mm/sram-alloc.c | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index e27883cbe808..1f1d865f65e9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c72aa0794a0ecc0b87ba9d5546215c26c8c80668 +refs/heads/master: 89ecd506917ba6e86ede072efbef6c69d01db4dd diff --git a/trunk/arch/blackfin/mm/sram-alloc.c b/trunk/arch/blackfin/mm/sram-alloc.c index 36376d8418fa..fa54a4ee3d6c 100644 --- a/trunk/arch/blackfin/mm/sram-alloc.c +++ b/trunk/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;