Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188470
b: refs/heads/master
c: 54536c5
h: refs/heads/master
v: v3
  • Loading branch information
Yi Li authored and Mike Frysinger committed Mar 9, 2010
1 parent b15d142 commit 26f8d27
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 19 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: 0b39db28b953945232719e7ff6fb802aa8a2be5f
refs/heads/master: 54536c5c6a807d0db7252c3b33638b88f34650ff
27 changes: 9 additions & 18 deletions trunk/arch/blackfin/mm/sram-alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ void *l1_data_A_sram_alloc(size_t size)
void *addr;
unsigned int cpu;

cpu = get_cpu();
cpu = smp_processor_id();
/* add mutex operation */
spin_lock_irqsave(&per_cpu(l1_data_sram_lock, cpu), flags);

Expand All @@ -411,7 +411,6 @@ void *l1_data_A_sram_alloc(size_t size)

/* add mutex operation */
spin_unlock_irqrestore(&per_cpu(l1_data_sram_lock, cpu), flags);
put_cpu();

pr_debug("Allocated address in l1_data_A_sram_alloc is 0x%lx+0x%lx\n",
(long unsigned int)addr, size);
Expand All @@ -430,7 +429,7 @@ int l1_data_A_sram_free(const void *addr)
int ret;
unsigned int cpu;

cpu = get_cpu();
cpu = smp_processor_id();
/* add mutex operation */
spin_lock_irqsave(&per_cpu(l1_data_sram_lock, cpu), flags);

Expand All @@ -439,7 +438,6 @@ int l1_data_A_sram_free(const void *addr)

/* add mutex operation */
spin_unlock_irqrestore(&per_cpu(l1_data_sram_lock, cpu), flags);
put_cpu();

return ret;
#else
Expand All @@ -455,7 +453,7 @@ void *l1_data_B_sram_alloc(size_t size)
void *addr;
unsigned int cpu;

cpu = get_cpu();
cpu = smp_processor_id();
/* add mutex operation */
spin_lock_irqsave(&per_cpu(l1_data_sram_lock, cpu), flags);

Expand All @@ -464,7 +462,6 @@ void *l1_data_B_sram_alloc(size_t size)

/* add mutex operation */
spin_unlock_irqrestore(&per_cpu(l1_data_sram_lock, cpu), flags);
put_cpu();

pr_debug("Allocated address in l1_data_B_sram_alloc is 0x%lx+0x%lx\n",
(long unsigned int)addr, size);
Expand All @@ -483,7 +480,7 @@ int l1_data_B_sram_free(const void *addr)
int ret;
unsigned int cpu;

cpu = get_cpu();
cpu = smp_processor_id();
/* add mutex operation */
spin_lock_irqsave(&per_cpu(l1_data_sram_lock, cpu), flags);

Expand All @@ -492,7 +489,6 @@ int l1_data_B_sram_free(const void *addr)

/* add mutex operation */
spin_unlock_irqrestore(&per_cpu(l1_data_sram_lock, cpu), flags);
put_cpu();

return ret;
#else
Expand Down Expand Up @@ -540,7 +536,7 @@ void *l1_inst_sram_alloc(size_t size)
void *addr;
unsigned int cpu;

cpu = get_cpu();
cpu = smp_processor_id();
/* add mutex operation */
spin_lock_irqsave(&per_cpu(l1_inst_sram_lock, cpu), flags);

Expand All @@ -549,7 +545,6 @@ void *l1_inst_sram_alloc(size_t size)

/* add mutex operation */
spin_unlock_irqrestore(&per_cpu(l1_inst_sram_lock, cpu), flags);
put_cpu();

pr_debug("Allocated address in l1_inst_sram_alloc is 0x%lx+0x%lx\n",
(long unsigned int)addr, size);
Expand All @@ -568,7 +563,7 @@ int l1_inst_sram_free(const void *addr)
int ret;
unsigned int cpu;

cpu = get_cpu();
cpu = smp_processor_id();
/* add mutex operation */
spin_lock_irqsave(&per_cpu(l1_inst_sram_lock, cpu), flags);

Expand All @@ -577,7 +572,6 @@ int l1_inst_sram_free(const void *addr)

/* add mutex operation */
spin_unlock_irqrestore(&per_cpu(l1_inst_sram_lock, cpu), flags);
put_cpu();

return ret;
#else
Expand All @@ -593,7 +587,7 @@ void *l1sram_alloc(size_t size)
void *addr;
unsigned int cpu;

cpu = get_cpu();
cpu = smp_processor_id();
/* add mutex operation */
spin_lock_irqsave(&per_cpu(l1sram_lock, cpu), flags);

Expand All @@ -602,7 +596,6 @@ void *l1sram_alloc(size_t size)

/* add mutex operation */
spin_unlock_irqrestore(&per_cpu(l1sram_lock, cpu), flags);
put_cpu();

return addr;
}
Expand All @@ -614,7 +607,7 @@ void *l1sram_alloc_max(size_t *psize)
void *addr;
unsigned int cpu;

cpu = get_cpu();
cpu = smp_processor_id();
/* add mutex operation */
spin_lock_irqsave(&per_cpu(l1sram_lock, cpu), flags);

Expand All @@ -623,7 +616,6 @@ void *l1sram_alloc_max(size_t *psize)

/* add mutex operation */
spin_unlock_irqrestore(&per_cpu(l1sram_lock, cpu), flags);
put_cpu();

return addr;
}
Expand All @@ -635,7 +627,7 @@ int l1sram_free(const void *addr)
int ret;
unsigned int cpu;

cpu = get_cpu();
cpu = smp_processor_id();
/* add mutex operation */
spin_lock_irqsave(&per_cpu(l1sram_lock, cpu), flags);

Expand All @@ -644,7 +636,6 @@ int l1sram_free(const void *addr)

/* add mutex operation */
spin_unlock_irqrestore(&per_cpu(l1sram_lock, cpu), flags);
put_cpu();

return ret;
}
Expand Down

0 comments on commit 26f8d27

Please sign in to comment.