public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	fujita.tomonori@lab.ntt.co.jp, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:core/iommu] x86: Fix iommu=soft boot option
Date: Wed, 25 Nov 2009 13:30:36 GMT	[thread overview]
Message-ID: <tip-273bee27fa9f79d94b78c83506016f2e41e78983@git.kernel.org> (raw)
In-Reply-To: <20091125084611O.fujita.tomonori@lab.ntt.co.jp>

Commit-ID:  273bee27fa9f79d94b78c83506016f2e41e78983
Gitweb:     http://git.kernel.org/tip/273bee27fa9f79d94b78c83506016f2e41e78983
Author:     FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
AuthorDate: Wed, 25 Nov 2009 08:46:28 +0900
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 25 Nov 2009 10:12:51 +0100

x86: Fix iommu=soft boot option

iommu=soft boot option forces the kernel to use swiotlb.

( This has the side-effect of enabling the swiotlb over the
  GART if this boot option is provided. This is the desired
  behavior of the swiotlb boot option and works like that
  for all other hw-IOMMU drivers. )

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: yinghai@kernel.org
LKML-Reference: <20091125084611O.fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/kernel/pci-swiotlb.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/pci-swiotlb.c b/arch/x86/kernel/pci-swiotlb.c
index e36e71d..e3c0a66 100644
--- a/arch/x86/kernel/pci-swiotlb.c
+++ b/arch/x86/kernel/pci-swiotlb.c
@@ -50,6 +50,8 @@ static struct dma_map_ops swiotlb_dma_ops = {
  */
 int __init pci_swiotlb_init(void)
 {
+	int use_swiotlb = swiotlb | swiotlb_force;
+
 	/* don't initialize swiotlb if iommu=off (no_iommu=1) */
 #ifdef CONFIG_X86_64
 	if (!no_iommu && max_pfn > MAX_DMA32_PFN)
@@ -63,5 +65,5 @@ int __init pci_swiotlb_init(void)
 		dma_ops = &swiotlb_dma_ops;
 	}
 
-	return swiotlb_force;
+	return use_swiotlb;
 }

      parent reply	other threads:[~2009-11-25 13:31 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-24 23:46 [PATCH -tip] x86: fix iommu=soft boot option FUJITA Tomonori
2009-11-24 23:55 ` Yinghai Lu
2009-11-25  0:05   ` FUJITA Tomonori
2009-11-25  8:18   ` Ingo Molnar
2009-11-25  8:54     ` Yinghai Lu
2009-11-25  9:05       ` FUJITA Tomonori
2009-11-25  9:10         ` Ingo Molnar
2009-11-25  9:45           ` Yinghai Lu
2009-11-25 11:03             ` FUJITA Tomonori
2009-11-25 22:33               ` Yinghai Lu
2009-11-27  7:29                 ` FUJITA Tomonori
2009-11-27  7:45                   ` Yinghai Lu
2009-11-27  8:06                     ` FUJITA Tomonori
2009-12-01  7:42                       ` Yinghai Lu
2009-12-02  5:44                         ` FUJITA Tomonori
2009-12-02  6:57                           ` Yinghai Lu
2009-12-02  7:25                             ` FUJITA Tomonori
2009-12-02  7:55                               ` Yinghai Lu
2009-12-02  8:07                                 ` FUJITA Tomonori
2009-12-08  0:24                                   ` FUJITA Tomonori
2009-12-08  0:51                                     ` Yinghai Lu
2009-11-25 10:17   ` Joerg Roedel
2009-11-25 13:30 ` tip-bot for FUJITA Tomonori [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-273bee27fa9f79d94b78c83506016f2e41e78983@git.kernel.org \
    --to=fujita.tomonori@lab.ntt.co.jp \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox