2000-12-18 09:19:03

by MOHAMMED AZAD

[permalink] [raw]
Subject: reg memory allocated by kmalloc

Hi all,

I would like to know.. is memory allocated by kmalloc always double word
aligned????.. and is this suitable for dma only if i use GFP_DMA priority...
i mean dma for a pci device... or can i just specify GFP_KERNEL and use
it.... is it safe to proceed in this way???

thanks
azad


2000-12-18 12:38:19

by Alan

[permalink] [raw]
Subject: Re: reg memory allocated by kmalloc

> I would like to know.. is memory allocated by kmalloc always double word
> aligned????.. and is this suitable for dma only if i use GFP_DMA priority...
> i mean dma for a pci device... or can i just specify GFP_KERNEL and use
> it.... is it safe to proceed in this way???

The alignment should be fine yes. GFP_DMA is for ISA bus 24bit DMA,
GFP_KERNEL is 32bit so if your PCI card has true 32bit DMA it will do. 2.4
has the pci_alloc_* interface