From: Fenghua Yu <fenghua.yu@intel.com>
To: Luming Yu <luming.yu@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
"Yu, Fenghua" <fenghua.yu@intel.com>,
"Luck, Tony" <tony.luck@intel.com>,
LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [RFC patch] init default dma_ops to prepare intel_iommu_init failure
Date: Wed, 12 Aug 2009 11:17:22 -0700 [thread overview]
Message-ID: <20090812181722.GA32653@linux-os.sc.intel.com> (raw)
In-Reply-To: <3877989d0908120220q5104d2e7rd272ececbc45e377@mail.gmail.com>
> 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.
>
x86/x86-64 also needs this fix. Please check the pci_swiotlb_init for x86/64.
> 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) {
This check can not be removed. Otherwise, swiotlb_dma_ops will always override
previous dma_ops value.
I think you can change this check to something like:
if (!dma_ops || iommu_pass_through) {
With this change, checking iommu_detected is unnecesary because checking dma_ops
covers it.
> #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
> - }
> }
next prev parent reply other threads:[~2009-08-12 18:17 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
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=20090812181722.GA32653@linux-os.sc.intel.com \
--to=fenghua.yu@intel.com \
--cc=akpm@linux-foundation.org \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luming.yu@gmail.com \
--cc=tony.luck@intel.com \
/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 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.