[openib-general] [PATCH v2 1/7] IB/core - Add DMA mapping functions to allow device drivers to interpose

Or Gerlitz ogerlitz at voltaire.com
Sun Dec 3 00:31:43 PST 2006


Ralph Campbell wrote:
>> On 11/30/06, Ralph Campbell <ralph.campbell at qlogic.com> wrote:
>>> On Thu, 2006-11-30 at 12:10 -0800, Roland Dreier wrote:

>>>> So what did you change since v1?  How do you deal with fitting 64-bit
>>>> addresses into an sg list entry that has a 32-bit dma_addr_t?

> Although the driver compiles on 32-bit kernels, it is unsupported
> and never been tested. All known 64-bit systems don't define
> CONFIG_HIGHMEM.  In spite of previous emails suggesting that
> page_address() can return NULL without CONFIG_HIGHMEM defined,
> the code in include/linux/mm.h doesn't allow it (assuming the
> page pointer is valid and not some random address).
> I verified this with Andrew Morton.

Can you provide the quote from include/linux/mm.h of the code that 
disallows it? looking there i don't see the enforcement.

mmm, your consulting with Andrew Morton was not over this thread... well
Christoph Hellwig comment on the V1 thread tells a different story:

Only for GFP_KERNEL allocations you can assume page_address is valid, 
and the scatterlist passed to a SCSI LLDD can contain any type of pages. 
  Currently on all 64bit architectures page_address works on all pages, 
but that's an implementation detail that could change any time and that 
you should not rely on.

see http://www.mail-archive.com/openib-general@openib.org/msg27132.html

As i have mentioned in the past, this (no kvaddr for a page) comes into 
play when a SCSI LLD (eg iSER, SRP) gets DIRECT I/O or AIO (SDP) pages 
from user space.

Or.





More information about the general mailing list