Re: Will __pa(vmalloc()) ever work?

From: Timur Tabi
Date: Tue May 31 2005 - 14:07:37 EST


Gerd Knorr wrote:

Can you fix that? If so, try that. Would be the best.

No, I cannot. The memory is passed to my driver from some other driver that I do not
control.

I think you can't. What is "anywhere else"? Does that include
userspace addresses?

No, but it might include the stack.

Not sure how portable that is, but comparing the vaddr against
the vmalloc address space could work. There are macros for
that, VMALLOC_START & VMALLOC_END IIRC.

Thanks, I'll try that.

I still haven't gotten an answer to my question about whether pgd/pud/pmd/pte_offset will obtain the physical address for a kmalloc'd buffer.

--
Timur Tabi
Staff Software Engineer
timur.tabi@xxxxxxxxxxx

One thing a Southern boy will never say is,
"I don't think duct tape will fix it."
-- Ed Smylie, NASA engineer for Apollo 13

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/