lkml.org 
[lkml]   [2009]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[RFC patch] init default dma_ops to prepare intel_iommu_init failure
From
Hi there,

On ia64 platform with dmar table and new upstream
kernel(config_dmar_default_on enabled),
if intel_iommu_init ends up without dma_ops initialized or other iommu
failures.
We got nothing to fall back. The following patch fixes it.

Please review. If make sense, please apply.

**The patch is enclosed in text attachment*
**Using web client to send the patch* *
**below is for review, please apply attached patch*/

Thanks,
Luming

Signed-off-by: Yu Luming <luming.yu@intel.com>

arch/ia64/kernel/pci-swiotlb.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/arch/ia64/kernel/pci-swiotlb.c b/arch/ia64/kernel/pci-swiotlb.c
index 223abb1..d5dcaf5 100644
--- a/arch/ia64/kernel/pci-swiotlb.c
+++ b/arch/ia64/kernel/pci-swiotlb.c
@@ -46,15 +46,13 @@ void __init swiotlb_dma_init(void)

void __init pci_swiotlb_init(void)
{
- if (!iommu_detected || iommu_pass_through) {
#ifdef CONFIG_IA64_GENERIC
- swiotlb = 1;
- printk(KERN_INFO "PCI-DMA: Re-initialize machine vector.\n");
- machvec_init("dig");
- swiotlb_init();
- dma_ops = &swiotlb_dma_ops;
+ swiotlb = 1;
+ printk(KERN_INFO "PCI-DMA: Re-initialize machine vector.\n");
+ machvec_init("dig");
+ swiotlb_init();
+ dma_ops = &swiotlb_dma_ops;
#else
- panic("Unable to find Intel IOMMU");
+ panic("Unable to find Intel IOMMU");
#endif
- }
}[unhandled content-type:application/octet-stream]
\
 
 \ /
  Last update: 2009-08-12 11:23    [from the cache]
©2003-2011 Jasper Spaans