All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC patch] init default dma_ops to prepare intel_iommu_init failure
@ 2009-08-12  9:20 Luming Yu
  2009-08-12  9:36 ` David Woodhouse
                   ` (2 more replies)
  0 siblings, 3 replies; 25+ messages in thread
From: Luming Yu @ 2009-08-12  9:20 UTC (permalink / raw)
  To: David Woodhouse, Yu, Fenghua, Luck, Tony, LKML; +Cc: Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 1350 bytes --]

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
-	}
 }

[-- Attachment #2: 5 --]
[-- Type: application/octet-stream, Size: 758 bytes --]

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
-	}
 }

^ permalink raw reply related	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2009-08-14  5:44 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-12  9:20 [RFC patch] init default dma_ops to prepare intel_iommu_init failure Luming Yu
2009-08-12  9:36 ` David Woodhouse
2009-08-12 18:17 ` Fenghua Yu
2009-08-12 18:20   ` David Woodhouse
2009-08-13  4:49   ` FUJITA Tomonori
2009-08-13  5:48     ` Luming Yu
2009-08-13  6:30       ` FUJITA Tomonori
2009-08-13  6:52       ` FUJITA Tomonori
2009-08-13  7:03         ` Luming Yu
2009-08-13  7:14           ` FUJITA Tomonori
2009-08-13  7:37             ` Luming Yu
2009-08-13  8:03               ` FUJITA Tomonori
2009-08-13  8:11                 ` Luming Yu
2009-08-13  8:49                   ` David Woodhouse
2009-08-13  9:00                     ` FUJITA Tomonori
2009-08-13  9:00                     ` Luming Yu
2009-08-13 17:08                       ` David Woodhouse
2009-08-13 17:30                         ` Yu, Fenghua
2009-08-14  5:44                           ` Luming Yu
2009-08-13  2:11 ` FUJITA Tomonori
2009-08-13  2:24   ` Luming Yu
2009-08-13  3:15     ` FUJITA Tomonori
2009-08-13  3:18       ` FUJITA Tomonori
2009-08-13  8:26         ` David Woodhouse
2009-08-13  8:35           ` FUJITA Tomonori

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.