]> git.baikalelectronics.ru Git - kernel.git/commit
Fix handling of the HP/Acer 'DMAR at zero' BIOS error for machines with <4GiB RAM.
authorDavid Woodhouse <dwmw2@infradead.org>
Thu, 19 Nov 2009 02:18:44 +0000 (02:18 +0000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 19 Nov 2009 21:42:02 +0000 (13:42 -0800)
commit35b435997b879fa64b95f1ada8babc69d55390da
tree09a4ca21c3f6358db12f60a599f47150e60f4aea
parent731217069199774164ef409414ae8c1574b5694f
Fix handling of the HP/Acer 'DMAR at zero' BIOS error for machines with <4GiB RAM.

Commit 3802646d9c219f6d3bd6f1b2c329e3afb5ea087a ("intel-iommu: Check for
'DMAR at zero' BIOS error earlier.") was supposed to work by pretending
not to detect an IOMMU if it was actually being reported by the BIOS at
physical address zero.

However, the intel_iommu_init() function is called unconditionally, as
are the corresponding functions for other IOMMU hardware.

So the patch only worked if you have RAM above the 4GiB boundary. It
caused swiotlb to be initialised when no IOMMU was detected during early
boot, and thus the later IOMMU init would refuse to run.

But if you have less RAM than that, swiotlb wouldn't get set up and the
IOMMU _would_ still end up being initialised, even though we never
claimed to detect it.

This patch also sets the dmar_disabled flag when the error is detected
during the initial detection phase -- so that the later call to
intel_iommu_init() will return without doing anything, regardless of
whether swiotlb is used or not.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/pci/dmar.c