I had a driver for linux kernel (2.6.18) in which I used kmalloc(sizeof(my_struct_t), GFP_ATOMIC) to allocate memory which was later used for data transfer using DMA controller of some device. Later I had to increase the size of my_struct. It became too large so that the kmalloc() code used static assertion and compiled __you_cannot_kmalloc_that_much symbol to notify that chunks of memory are too large to alloc. So I thought I will declare the my_struct_t as static variable and won't have to allocate it at all.
I defined static my_struct_t my_struct;
but the DMA transaction didn't worked well and I got invalid data DMA'd to the buffer.
My question is: it forbidden to use static (global) buffers for dma? And if yes then where exactly in the kernel memory map those buffers sit.
Thanks