LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
To: joerg.roedel@amd.com
Cc: fujita.tomonori@lab.ntt.co.jp, mingo@elte.hu,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] x86: make GART to respect device's dma_mask about virtual mappings
Date: Sat, 13 Sep 2008 00:11:34 +0900 [thread overview]
Message-ID: <20080913001134J.fujita.tomonori@lab.ntt.co.jp> (raw)
In-Reply-To: <20080912145227.GA24945@amd.com>
On Fri, 12 Sep 2008 16:52:27 +0200
Joerg Roedel <joerg.roedel@amd.com> wrote:
> On Fri, Sep 12, 2008 at 07:42:35PM +0900, FUJITA Tomonori wrote:
> > Currently, GART IOMMU ingores device's dma_mask when it does virtual
> > mappings. So it could give a device a virtual address that the device
> > can't access to.
> >
> > This patch fixes the above problem.
> >
> > Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> > ---
> > arch/x86/kernel/pci-gart_64.c | 39 ++++++++++++++++++++++++++++-----------
> > 1 files changed, 28 insertions(+), 11 deletions(-)
> >
> > diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c
> > index 47abe43..9739d56 100644
> > --- a/arch/x86/kernel/pci-gart_64.c
> > +++ b/arch/x86/kernel/pci-gart_64.c
> > @@ -83,23 +83,34 @@ static unsigned long next_bit; /* protected by iommu_bitmap_lock */
> > static int need_flush; /* global flush state. set for each gart wrap */
> >
> > static unsigned long alloc_iommu(struct device *dev, int size,
> > - unsigned long align_mask)
> > + unsigned long align_mask, u64 dma_mask)
>
> You can calculate the dma_mask in this function from the dev parameter.
> There is no need to pass it two levels down to this function extending
> various parameter lists.
No, we can't because we need to use dev->coherent_dma_mask for
alloc_coherent and dev->dma_mask for the rest.
next prev parent reply other threads:[~2008-09-12 15:04 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-12 10:42 [PATCH 0/3] fix " FUJITA Tomonori
2008-09-12 10:42 ` [PATCH 1/3] add iommu_device_max_index IOMMU helper function FUJITA Tomonori
2008-09-12 10:42 ` [PATCH 2/3] add dma_get_mask " FUJITA Tomonori
2008-09-12 10:42 ` [PATCH 3/3] x86: make GART to respect device's dma_mask about virtual mappings FUJITA Tomonori
2008-09-12 14:52 ` Joerg Roedel
2008-09-12 15:11 ` FUJITA Tomonori [this message]
2008-09-14 14:45 ` [PATCH 0/3] fix " Ingo Molnar
2008-09-16 0:54 ` Andi Kleen
2008-09-16 13:20 ` FUJITA Tomonori
2008-09-16 13:43 ` Andi Kleen
2008-09-16 17:13 ` FUJITA Tomonori
2008-09-16 17:58 ` Andi Kleen
2008-09-16 23:53 ` FUJITA Tomonori
2008-09-17 0:24 ` Andi Kleen
2008-09-17 19:20 ` FUJITA Tomonori
2008-09-18 18:20 ` Andi Kleen
2008-09-18 22:15 ` FUJITA Tomonori
2008-09-19 0:44 ` Andi Kleen
2008-09-22 19:12 ` FUJITA Tomonori
2008-09-22 20:35 ` Andi Kleen
2008-09-23 4:02 ` FUJITA Tomonori
2008-09-17 10:43 ` Ingo Molnar
2008-09-18 18:25 ` Andi Kleen
2008-09-16 15:52 ` Joerg Roedel
2008-09-16 16:20 ` Andi Kleen
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=20080913001134J.fujita.tomonori@lab.ntt.co.jp \
--to=fujita.tomonori@lab.ntt.co.jp \
--cc=joerg.roedel@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--subject='Re: [PATCH 3/3] x86: make GART to respect device'\''s dma_mask about virtual mappings' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).