Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: Pavel Borzenkov Newsgroups: comp.os.linux.development.system Subject: Re: mmap dma buffer Date: Thu, 7 Jul 2011 10:02:40 +0000 (UTC) Organization: Aioe.org NNTP Server Lines: 14 Message-ID: References: NNTP-Posting-Host: 5Bi2vCRq6cgjQObVvr9N+Q.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: slrn/0.9.9p1 (OpenBSD) X-Notice: Filtered by postfilter v. 0.8.2 Xref: x330-a1.tempe.blueboxinc.net comp.os.linux.development.system:207 On 2011-07-07, Pavel Borzenkov wrote: > > You can't convert address returned by pci_alloc_consistent() using > virt_to_phys() macro. This macro correctly works only for the kernel virtual > addresses. And this is not needed, actually, because pci_alloc_consistent() > function returns physical address of the allocated memory in its third > argument. > Sorry. virt_to_phys() works correctly only for kernel *logical* addresses, not virtual. -- Pavel