diff options
author | Keshavamurthy, Anil S <anil.s.keshavamurthy@intel.com> | 2007-10-21 19:41:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-22 11:13:19 -0400 |
commit | 49a0429e53f29109cbf1eadd89497286ba81f1ae (patch) | |
tree | b44c5131bd12881b32ab46ff92b07f8f1c8e9800 /drivers/pci/intel-iommu.c | |
parent | e820482cd2621dba60e403af1c54502daa54b220 (diff) |
Intel IOMMU: Iommu floppy workaround
This config option (DMAR_FLPY_WA) sets up 1:1 mapping for the floppy device so
that the floppy device which does not use DMA api's will continue to work.
Once the floppy driver starts using DMA api's this config option can be turn
off or this patch can be yanked out of kernel at that time.
[akpm@linux-foundation.org: cleanups, rename things, build fix]
[jengelh@computergmbh.de: Kconfig fixes]
Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Muli Ben-Yehuda <muli@il.ibm.com>
Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Ashok Raj <ashok.raj@intel.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/pci/intel-iommu.c')
-rw-r--r-- | drivers/pci/intel-iommu.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 4905e0e3a644..4cca5b939e0e 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c | |||
@@ -1632,6 +1632,31 @@ error: | |||
1632 | } | 1632 | } |
1633 | #endif | 1633 | #endif |
1634 | 1634 | ||
1635 | #ifdef CONFIG_DMAR_FLOPPY_WA | ||
1636 | static inline void iommu_prepare_isa(void) | ||
1637 | { | ||
1638 | struct pci_dev *pdev; | ||
1639 | int ret; | ||
1640 | |||
1641 | pdev = pci_get_class(PCI_CLASS_BRIDGE_ISA << 8, NULL); | ||
1642 | if (!pdev) | ||
1643 | return; | ||
1644 | |||
1645 | printk(KERN_INFO "IOMMU: Prepare 0-16M unity mapping for LPC\n"); | ||
1646 | ret = iommu_prepare_identity_map(pdev, 0, 16*1024*1024); | ||
1647 | |||
1648 | if (ret) | ||
1649 | printk("IOMMU: Failed to create 0-64M identity map, " | ||
1650 | "floppy might not work\n"); | ||
1651 | |||
1652 | } | ||
1653 | #else | ||
1654 | static inline void iommu_prepare_isa(void) | ||
1655 | { | ||
1656 | return; | ||
1657 | } | ||
1658 | #endif /* !CONFIG_DMAR_FLPY_WA */ | ||
1659 | |||
1635 | int __init init_dmars(void) | 1660 | int __init init_dmars(void) |
1636 | { | 1661 | { |
1637 | struct dmar_drhd_unit *drhd; | 1662 | struct dmar_drhd_unit *drhd; |
@@ -1697,6 +1722,8 @@ int __init init_dmars(void) | |||
1697 | 1722 | ||
1698 | iommu_prepare_gfx_mapping(); | 1723 | iommu_prepare_gfx_mapping(); |
1699 | 1724 | ||
1725 | iommu_prepare_isa(); | ||
1726 | |||
1700 | /* | 1727 | /* |
1701 | * for each drhd | 1728 | * for each drhd |
1702 | * enable fault log | 1729 | * enable fault log |