iommu/dmar: Reserve mmio space used by the IOMMU, if the BIOS forgets to
commit6f5cf52114dd87f9ed091678f7dfc8ff21bbe2b3
authorDonald Dutile <ddutile@redhat.com>
Mon, 4 Jun 2012 21:29:02 +0000 (4 17:29 -0400)
committerIngo Molnar <mingo@kernel.org>
Fri, 8 Jun 2012 10:15:43 +0000 (8 12:15 +0200)
tree51d0e821a0eae76c34181a1f8286c1480d6bcbc4
parentbf947fcb77ff858f223c49c76e2d130095fa2585
iommu/dmar: Reserve mmio space used by the IOMMU, if the BIOS forgets to

Intel-iommu initialization doesn't currently reserve the memory
used for the IOMMU registers. This can allow the pci resource
allocator to assign a device BAR to the same address as the
IOMMU registers. This can cause some not so nice side affects
when the driver ioremap's that region.

Introduced two helper functions to map & unmap the IOMMU
registers as well as simplify the init and exit paths.

Signed-off-by: Donald Dutile <ddutile@redhat.com>
Acked-by: Chris Wright <chrisw@redhat.com>
Cc: iommu@lists.linux-foundation.org
Cc: suresh.b.siddha@intel.com
Cc: dwmw2@infradead.org
Link: http://lkml.kernel.org/r/1338845342-12464-3-git-send-email-ddutile@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
drivers/iommu/dmar.c
include/linux/intel-iommu.h