summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-05-11 04:43:19 +0000
committerMike Frysinger <vapier@gentoo.org>2010-05-22 14:19:12 -0400
commiteb5400b6131e6ebaacf809357643a22a72d5cc4c (patch)
tree5b95658962e3a30fbfdc052647ac55bb04fc03c1 /arch
parentbe1577e3787536290cc17afaeb2cd58bbcc7ed6c (diff)
downloadlinux-eb5400b6131e6ebaacf809357643a22a72d5cc4c.tar.bz2
Blackfin: use atomic kmalloc in L1 alloc so it too can be atomic
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/blackfin/mm/sram-alloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/blackfin/mm/sram-alloc.c b/arch/blackfin/mm/sram-alloc.c
index 49b2ff2c8b74..627e04b5ba9a 100644
--- a/arch/blackfin/mm/sram-alloc.c
+++ b/arch/blackfin/mm/sram-alloc.c
@@ -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;