Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 148574
b: refs/heads/master
c: 89ecd50
h: refs/heads/master
v: v3
  • Loading branch information
Graf Yang authored and Mike Frysinger committed Jun 12, 2009
1 parent fd40b90 commit 33c1bbe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c72aa0794a0ecc0b87ba9d5546215c26c8c80668
refs/heads/master: 89ecd506917ba6e86ede072efbef6c69d01db4dd
12 changes: 10 additions & 2 deletions trunk/arch/blackfin/mm/sram-alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;

Expand Down

0 comments on commit 33c1bbe

Please sign in to comment.