]> git.baikalelectronics.ru Git - kernel.git/commit
intel-iommu: Correct sglist size calculation.
authorFenghua Yu <fenghua.yu@intel.com>
Tue, 4 Aug 2009 22:09:37 +0000 (15:09 -0700)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 5 Aug 2009 07:59:47 +0000 (08:59 +0100)
commit5a90acd68d48e2976853996ce2b12baaf89f3bf8
tree268d0bf9e6660a8fdecc8dcda446745c8464f53a
parent869c775a96af162e5b7b7f1f562f4fe164a06f2c
intel-iommu: Correct sglist size calculation.

In domain_sg_mapping(), use aligned_nrpages() instead of hand-coded
rounding code for calculating the size of each sg elem. This means that
on IA64 we correctly round up to the MM page size, not just to the VT-d
page size.

Also remove the incorrect mm_to_dma_pfn() when intel_map_sg() calls
domain_sg_mapping() -- the 'size' variable is in VT-d pages already.

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/pci/intel-iommu.c