[LIP] pci_alloc_consistent usage in x86-64 kernel
"Sathya Prakash V" <[email protected]>
| Newsgroups | gmane.user-groups.linux.india.programmers |
|---|---|
| Message-ID | <[email protected]> |
Hi All, I am writing a scsi target driver which emulates disk of around 8GB in AMD-64 bit based machines using x86-64 kernels. For this I was using pci_alloc_consistent to allocate memory upto the maximum possible limit in 2MB chunks. The Problem is below 4GB the memory allocation is successful but If i use more than 4GB then I am able to get only upto 3.8 GB and remaining memory cant be allocated. By debugging I am able to identify the iommu_alloc function in pci_gart.c is returning fail. And by further reading I have identified that pci_alloc_consistent will map higher address (64 bits) memory regions to a AGP aperture memory region in lower address (32 bit) and will return the mapped 32 bit address to the calling functions and hence at a particular moment only a maximum of 4GB can be used for the cache disk. What my question is 1. To avoid this can we use getfreepages and virt_to_bus functions. will it allocates the memory region used for the mapping table also? 2. Or can we use dynamic DMA mapping? will dyanmic mapping of 2MB will work always? 3. Any other solutions? I dont want to use bigmem patch. Apart from this I have another question. In the same pci_gart.c file If there is noiommu then even though I use 64 bit pci device the GFP_DMA is setted and I couldnt allocate more than 16MB Any suggestions TIA Sathya _________________________________________________________________ Full savings account benefits at no minimum balance! http://go.msnserver.com/IN/49352.asp Apply now and get FREE watch! ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click