diff options
author | Suresh Siddha <suresh.b.siddha@intel.com> | 2009-03-16 20:04:57 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2009-03-17 18:39:58 -0400 |
commit | 1531a6a6b81a4e6f9eec9a5608758a6ea14b96e0 (patch) | |
tree | 3b1523516192fdd19b286879376b4d3d7c827b0d /drivers/pci/intr_remapping.c | |
parent | eba67e5da6e971993b2899d2cdf459ce77d3dbc5 (diff) |
x86, dmar: start with sane state while enabling dma and interrupt-remapping
Impact: cleanup/sanitization
Start from a sane state while enabling dma and interrupt-remapping, by
clearing the previous recorded faults and disabling previously
enabled queued invalidation and interrupt-remapping.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'drivers/pci/intr_remapping.c')
-rw-r--r-- | drivers/pci/intr_remapping.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/pci/intr_remapping.c b/drivers/pci/intr_remapping.c index 0d202d73a1ac..a84686b2478b 100644 --- a/drivers/pci/intr_remapping.c +++ b/drivers/pci/intr_remapping.c | |||
@@ -499,6 +499,23 @@ int __init enable_intr_remapping(int eim) | |||
499 | struct dmar_drhd_unit *drhd; | 499 | struct dmar_drhd_unit *drhd; |
500 | int setup = 0; | 500 | int setup = 0; |
501 | 501 | ||
502 | for_each_drhd_unit(drhd) { | ||
503 | struct intel_iommu *iommu = drhd->iommu; | ||
504 | |||
505 | /* | ||
506 | * Clear previous faults. | ||
507 | */ | ||
508 | dmar_fault(-1, iommu); | ||
509 | |||
510 | /* | ||
511 | * Disable intr remapping and queued invalidation, if already | ||
512 | * enabled prior to OS handover. | ||
513 | */ | ||
514 | disable_intr_remapping(iommu); | ||
515 | |||
516 | dmar_disable_qi(iommu); | ||
517 | } | ||
518 | |||
502 | /* | 519 | /* |
503 | * check for the Interrupt-remapping support | 520 | * check for the Interrupt-remapping support |
504 | */ | 521 | */ |