From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steve Wise Subject: Re: RDMA/cxgb4: Support on-chip SQs Date: Wed, 30 Jan 2013 15:52:34 -0600 Message-ID: <51099622.40505@opengridcomputing.com> References: <20130130210006.GA22134@elgon.mountain> <51099270.5070406@opengridcomputing.com> <20130130214555.GA4989@mwanda> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130130214555.GA4989@mwanda> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Dan Carpenter Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Roland Dreier List-Id: linux-rdma@vger.kernel.org On 1/30/2013 3:45 PM, Dan Carpenter wrote: > On Wed, Jan 30, 2013 at 03:36:48PM -0600, Steve Wise wrote: >> I wonder, then, what the correct service is to get the cpu physical >> address from a kernel virtual address returned from >> dma_alloc_coherent()? I think this is correct as-is, since I think >> dma_alloc_coherent() falls under the "directly mapped" addresses in >> the virt_to_phys() prototype comment. >> > Here is another relevant comment I should have included. > > commit ae6a5d37725853325a2b3460165fbc5613ce2916 > Author: Russell King > Date: Tue Nov 20 12:17:51 2012 +0000 > > ASoC: kirkwood-dma: fix use of virt_to_phys() > > This is part of a patch found in Rabeeh Khoury's git tree for the > cubox. > > You can not use virt_to_phys() on the address returned from > dma_alloc_coherent(); it may not be part of the kernel direct-mapped > memory. Fix this to use the DMA address instead. > > Signed-off-by: Russell King > Signed-off-by: Mark Brown > > I don't know the details though, and I certainly don't know how > someone would fix this. ;) > How do I map the dma address into a physical address suitable for passing to remap_pfn_range()? -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html