From: Yinghai Lu <yinghai@kernel.org>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -tip] x86: fix iommu=soft boot option
Date: Tue, 24 Nov 2009 15:55:03 -0800 [thread overview]
Message-ID: <4B0C7257.3070609@kernel.org> (raw)
In-Reply-To: <20091125084611O.fujita.tomonori@lab.ntt.co.jp>
FUJITA Tomonori wrote:
> "x86: Handle HW IOMMU initialization failure gracefully" patchset
> handled this option properly however somehow I broke it during cleanup
> after that. Sorry.
>
> =
> From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> Subject: [PATCH -tip] x86: fix iommu=soft boot option
>
> iommu=soft boot option forces the kernel to use swiotlb.
>
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> ---
> 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;
> }
before your cleanup patchset:
for AMD 64bit, MEM > 4g, no AGP, iommu=soft
1. if BIOS have correct gart setting, Kernel will use gart
2. if BIOS does not have correct gart setting, Kernel will use swiotlb
for AMD 64bit, MEM > 4g, no AGP, no "iommu=soft"
1. if BIOS have correct gart setting, Kernel will use gart
2. if BIOS does not have correct gart setting, Kernel will allocate some RAM, and set range in AMD NB, and use gart iommu
YH
next prev parent reply other threads:[~2009-11-24 23:56 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 [this message]
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:core/iommu] x86: Fix " tip-bot for FUJITA Tomonori
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=4B0C7257.3070609@kernel.org \
--to=yinghai@kernel.org \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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