public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Olof Johansson <olof@lixom.net>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>,
	linuxppc-dev list <linuxppc-dev@ozlabs.org>,
	Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH][POWERPC] Workaround for iommu page alignment (#2)
Date: Mon, 7 Jan 2008 21:48:24 -0600	[thread overview]
Message-ID: <20080108034824.GA7983@lixom.net> (raw)
In-Reply-To: <1199748862.6734.20.camel@pasglop>

On Tue, Jan 08, 2008 at 10:34:22AM +1100, Benjamin Herrenschmidt wrote:
> powerpc: Workaround for iommu page alignment
> 
> Our iommu page size is currently always 4K. That means with our current
> code, drivers may do a dma_map_sg() of a 64K page and obtain a dma_addr_t
> that is only 4K aligned.
> 
> This works fine in most cases except some infiniband HW it seems, where
> they tell the HW about the page size and it ignores the low bits of the
> DMA address.
> 
> This works around it by making our IOMMU code enforce a PAGE_SIZE alignment
> for mappings of objects that are page aligned in the first place and whose
> size is larger or equal to a page.
> 
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
> 
> And this version actually does what the comment says (I had forgotten
> to quilt ref... a common mistake).

And sloppy of me to not catch it. Anyway:

Acked-by: Olof Johansson <olof@lixom.net>

I wonder how long until there's a device that has some other < PAGE_SIZE
alignment bug^Wrequirement that we'll need to meet too. :(


-Olof


  reply	other threads:[~2008-01-08  3:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-07 21:45 [PATCH][POWERPC] Workaround for iommu page alignment Benjamin Herrenschmidt
2008-01-07 21:57 ` Olof Johansson
2008-01-07 22:41 ` Michael Ellerman
2008-01-07 23:33   ` Benjamin Herrenschmidt
2008-01-07 23:34 ` [PATCH][POWERPC] Workaround for iommu page alignment (#2) Benjamin Herrenschmidt
2008-01-08  3:48   ` Olof Johansson [this message]
2008-01-08  4:02     ` Benjamin Herrenschmidt

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=20080108034824.GA7983@lixom.net \
    --to=olof@lixom.net \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    /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