Re: [PATCH] Xen/i386 cleanups - AGP bus/phys cleanups

From: Rik van Riel
Date: Wed Mar 16 2005 - 10:08:11 EST


On Wed, 16 Mar 2005, Christoph Hellwig wrote:
> On Wed, Mar 16, 2005 at 11:48:29AM +0000, Keir Fraser wrote:
> > This patch cleans up AGP driver treatment of bus/device memory. Every
> > use of virt_to_phys/phys_to_virt should properly be converting between
> > virtual and bus addresses: this distinction really matters for the Xen
> > hypervisor.
>
> It's bogus either way. You must never use virt_to_phys or virt_to_bus
> for bus address. For systems with an IOMMU there's no 1:1 mapping.

In the case of AGP, the AGPGART effectively _is_ the
IOMMU. Calculating the addresses right for programming
the AGPGART is probably worth fixing.

--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
-
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/