From 5b717f570cf3149cd8b9afa23bc72accac4dec15 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Sat, 29 Jul 2006 21:42:49 +0200 Subject: [PATCH] --- yaml --- r: 32895 b: refs/heads/master c: 65f87d8a8a6e1b560c61951d0a68ed80f7c8ff19 h: refs/heads/master i: 32893: 74319f0cbddb55fd21d65d9174828addffe7dda1 32891: 6545c8c3a26470349b7ca3564cf0ec033393aaa6 32887: 44a0640f691e5b630042ad7276999e84e74c6b5a 32879: c2812d0ecb938a05c320e6ba6ae3b43d64682bfe 32863: 7444739d4c001ae9fc70e7a7eb7df704f4bec8a7 32831: a910a93121267743c623496cf36dddd5047a9166 32767: 5ae4f0356026b0363efef5eff8fdbdc7fb85add4 v: v3 --- [refs] | 2 +- trunk/arch/x86_64/kernel/pci-swiotlb.c | 5 +++-- trunk/include/asm-x86_64/swiotlb.h | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index eda38bdfafa4..45ecbc46753a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 355540f3338e1408dac98413f05d612a76d4f5e3 +refs/heads/master: 65f87d8a8a6e1b560c61951d0a68ed80f7c8ff19 diff --git a/trunk/arch/x86_64/kernel/pci-swiotlb.c b/trunk/arch/x86_64/kernel/pci-swiotlb.c index ebdb77fe2057..6a55f87ba97f 100644 --- a/trunk/arch/x86_64/kernel/pci-swiotlb.c +++ b/trunk/arch/x86_64/kernel/pci-swiotlb.c @@ -31,9 +31,10 @@ struct dma_mapping_ops swiotlb_dma_ops = { void pci_swiotlb_init(void) { /* don't initialize swiotlb if iommu=off (no_iommu=1) */ - if (!iommu_detected && !no_iommu && - (end_pfn > MAX_DMA32_PFN || force_iommu)) + if (!iommu_detected && !no_iommu && end_pfn > MAX_DMA32_PFN) swiotlb = 1; + if (swiotlb_force) + swiotlb = 1; if (swiotlb) { printk(KERN_INFO "PCI-DMA: Using software bounce buffering for IO (SWIOTLB)\n"); swiotlb_init(); diff --git a/trunk/include/asm-x86_64/swiotlb.h b/trunk/include/asm-x86_64/swiotlb.h index 5f9a01805821..ba94ab3d2673 100644 --- a/trunk/include/asm-x86_64/swiotlb.h +++ b/trunk/include/asm-x86_64/swiotlb.h @@ -42,6 +42,8 @@ extern void swiotlb_free_coherent (struct device *hwdev, size_t size, extern int swiotlb_dma_supported(struct device *hwdev, u64 mask); extern void swiotlb_init(void); +extern int swiotlb_force; + #ifdef CONFIG_SWIOTLB extern int swiotlb; #else