[Linux-Xtensa] dma_pool_alloc fails

ananth.sundapalayam at wipro.com ananth.sundapalayam at wipro.com
Sat Jul 9 06:57:07 PDT 2011


Hi,

I use dma_pool_create to a create a pool & subsequently use
dma_pool_alloc to allocate 

mem from this pool.

dma_pool_alloc seems to be failing.

 

I get the following error:

 

swapper: page allocation failure. order:0, mode:0x21

 

Stack: 00000000 d028e04c d0205c20 d72ff2e0 d028e09c d78131e0 d028c92c
00000001

       d028c92c 00000001 00000000 00000001 d028e050 d7817a30 d028e058
d028e01c

       00000000 00000000 d7809860 00000009 9014b50c d7817a70 d028e058
d028e01c

Call Trace:

 [<d014b3a6>] really_probe+0xca/0x15c

 [<d014b50c>] driver_probe_device+0x68/0x74

 [<d014b60a>] __driver_attach+0x6a/0x9c

 [<d014a3e7>] bus_for_each_dev+0x63/0x8c

 [<d014b652>] driver_attach+0x16/0x1c

 [<d014aaa7>] bus_add_driver+0xab/0x15c

 [<d014bb55>] driver_register+0x89/0xbc

 [<d014d13b>] platform_driver_register+0x67/0x6c

 [<d014d169>] platform_driver_probe+0x15/0x58

 [<d02b6b45>] anurag_dmac_init+0x3d/0x50

 [<d0003672>] do_one_initcall+0x56/0x188

 [<d02ab9da>] do_initcalls+0x1a/0x30

 [<d02aba0e>] do_basic_setup+0x1e/0x20

 [<d02aba9b>] kernel_init+0x5f/0x9c

 [<d0005145>] kernel_thread+0x1d/0x28

 [<d0202781>] rest_init+0x11/0x58

 

Mem-Info:

Normal per-cpu:

CPU    0: hi:   42, btch:   7 usd:  45

Active_anon:0 active_file:0 inactive_anon:0

 inactive_file:1554 unevictable:0 dirty:0 writeback:0 unstable:0

 free:29220 slab:271 mapped:0 pagetables:0 bounce:0

Normal free:116880kB min:1440kB low:1800kB high:2160kB active_anon:0kB
inactive_anon:0kB active_file:0kB inactive_file:6216kB unevictable:0kB
present:129920kB pages_scanned:0 all_unreclaimable? no

lowmem_reserve[]: 0 0 0

Normal: 4*4kB 2*8kB 1*16kB 3*32kB 4*64kB 2*128kB 2*256kB 4*512kB
3*1024kB 2*2048kB 26*4096kB = 116880kB

1561 total pagecache pages

0 pages in swap cache

Swap cache stats: add 0, delete 0, find 0/0

Free swap  = 0kB

Total swap = 0kB

32768 pages RAM

1633 pages reserved

7 pages shared

1838 pages non-shared

 

It says Free Swap/Total Swap are 0 KB.

Is this the problem?

 

Looking into dma_pool_alloc I found that it calls dma_alloc_coherent
which calls __get_free_pages.

And, using prints I found alloc_pages, called by __get_free_pages, is
returning NULL.

 

Any pointers on this would be helpful.

 

Thanks,
Ananth

 


Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. 

www.wipro.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linux-xtensa.org/pipermail/linux-xtensa/attachments/20110709/0e483d22/attachment.html


More information about the linux-xtensa mailing list