Re: [PATCH] x86: fix gart iommu using for amd 64 bit system

From: FUJITA Tomonori
Date: Tue Nov 24 2009 - 18:53:57 EST


On Tue, 24 Nov 2009 10:48:32 -0800
Yinghai Lu <yinghai@xxxxxxxxxx> wrote:

> > if (aper_alloc) {
> > /* Got the aperture from the AGP bridge */
> > - } else if (!valid_agp) {
> > + } else if (swiotlb && !valid_agp) {
> > /* Do nothing */
>
> still have some problem here.
> because you set swiotlb to 0 before. it will break
> iommu=soft

Oops, thanks. However, it's not GART specific issue.

'iommu=soft' is already broken on all the configurations. It should be
fixed separately. I've just sent a fix.


> > void *dma_generic_alloc_coherent(struct device *dev, size_t size,
> > diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c
> > index e6a0d40..2358409 100644
> > --- a/arch/x86/kernel/pci-gart_64.c
> > +++ b/arch/x86/kernel/pci-gart_64.c
> > @@ -847,7 +847,6 @@ int __init gart_iommu_init(void)
> > flush_gart();
> > dma_ops = &gart_dma_ops;
> > x86_platform.iommu_shutdown = gart_iommu_shutdown;
> > - swiotlb = 0;
> >
> > return 0;
> > }
> > diff --git a/arch/x86/kernel/pci-swiotlb.c b/arch/x86/kernel/pci-swiotlb.c
> > index e36e71d..6971ba5 100644
> > --- a/arch/x86/kernel/pci-swiotlb.c
> > +++ b/arch/x86/kernel/pci-swiotlb.c
> > @@ -43,12 +43,12 @@ static struct dma_map_ops swiotlb_dma_ops = {
> > };
> >
> > /*
> > - * pci_swiotlb_init - initialize swiotlb if necessary
> > + * pci_swiotlb_init - set swiotlb to 1 if necessary
>
> pci_swiotlb_detect ?

I'll fix in the next version.
--
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/