Skip to content

Commit

Permalink
Blackfin: use atomic kmalloc in L1 alloc so it too can be atomic
Browse files Browse the repository at this point in the history
Some drivers allocate L1 SRAM in atomic contexts, so make sure these
functions also use GFP_ATOMIC to avoid BUG()'s.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
  • Loading branch information
Mike Frysinger committed May 22, 2010
1 parent be1577e commit eb5400b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/blackfin/mm/sram-alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,8 @@ static void *_sram_alloc(size_t size, struct sram_piece *pfree_head,
plast->next = pslot->next;
pavail = pslot;
} else {
pavail = kmem_cache_alloc(sram_piece_cache, GFP_KERNEL);
/* use atomic so our L1 allocator can be used atomically */
pavail = kmem_cache_alloc(sram_piece_cache, GFP_ATOMIC);

if (!pavail)
return NULL;
Expand Down

0 comments on commit eb5400b

Please sign in to comment.