Article 4QPGG Centos 7.x: Physical buffer allocation

Centos 7.x: Physical buffer allocation

by
zvivered
from LinuxQuestions.org on (#4QPGG)
Hello,

Under Centos 7.x (64) I tried to allocate a 32MB contiguous physical memory with:

void *p = dma_alloc_coherent (NULL, 0x2000000, &DmaHandle, GFP_KERNEL);

Also tried:

void *p = __get_free_pages (GFP_KERNEL, __get_order (0x2000000));

In both cases I got p=0 and few error messages in dmesg.

It works fine if the size is 0x400000 (4MB).

Is there a solution without changing the kernel boot command line parameters ?

Thank you,
Zvikalatest?d=yIl2AUoC8zA latest?i=urqDv8M2uPo:rk9YjBWzRrI:F7zBnMy latest?i=urqDv8M2uPo:rk9YjBWzRrI:V_sGLiP latest?d=qj6IDK7rITs latest?i=urqDv8M2uPo:rk9YjBWzRrI:gIN9vFwurqDv8M2uPo
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments