intel-iommu: Speed up processing of the identity_mapping function
commit3a2bc9ae5ee092a0db8aa07d695e15b14a3fe2a4
authorMike Travis <travis@sgi.com>
Sat, 28 May 2011 18:15:03 +0000 (28 13:15 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 23 Jun 2011 22:05:31 +0000 (23 15:05 -0700)
tree79675a023897d5a67874123b5120ec257281bacb
parent001a5287ce15ac855136d9912ba3a71e40befa0a
intel-iommu: Speed up processing of the identity_mapping function

commit cb452a4040bb051d92e85d6e7eb60c11734c1781 upstream.

When there are a large count of PCI devices, and the pass through
option for iommu is set, much time is spent in the identity_mapping
function hunting though the iommu domains to check if a specific
device is "identity mapped".

Speed up the function by checking the cached info to see if
it's mapped to the static identity domain.

Signed-off-by: Mike Travis <travis@sgi.com>
Reviewed-by: Mike Habeck <habeck@sgi.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pci/intel-iommu.c