[openib-general] remap_page_range() in older kernels

Steve Wise swise at opengridcomputing.com
Thu Feb 15 07:55:19 PST 2007


Roland, 

Do you remember any issues with using remap_page_range() in older
kernels for mapping memory allocated in the kernel back to a user
process?  

I'm testing cxgb3 in ofed 1.2 on rhel4u4 with uses a 2.6.9 based kernel.
And cxgb3 kernel-bypass isn't working because my WQ and CQ memory isn't
getting correctly mapped into the user process.  

I've confirmed that the mapping is wrong by scribbling in the memory
just after its allocated in the kernel (via dma_alloc_coherent()), then
reading in the library after mapping it.  The process isn't reading the
correct scribbles...

For the ofed 1.2 backport, we've redefined remap_pfn_range() to:

static inline int
remap_pfn_range(struct vm_area_struct *vma, unsigned long addr,
                unsigned long pfn, unsigned long size, pgprot_t prot)
{
        return remap_page_range(vma, addr, pfn << PAGE_SHIFT, size, prot);
}


Any of this ring a bell?  Any ideas?

Thanks,

Steve.





More information about the general mailing list