All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joerg Roedel <joerg.roedel@amd.com>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/4] add is_buffer_dma_capable helper function
Date: Tue, 9 Sep 2008 18:21:16 +0200	[thread overview]
Message-ID: <20080909162116.GB13536@amd.com> (raw)
In-Reply-To: <57C9024A16AD2D4C97DC78E552063EA30A14789F@orsmsx505.amr.corp.intel.com>

On Tue, Sep 09, 2008 at 09:17:05AM -0700, Luck, Tony wrote:
> +static inline int is_buffer_dma_capable(u64 mask, dma_addr_t addr, size_t size)
> +{
> +       return addr + size <= mask;
> +}
> 
> Do we care about wrap-around (e.g. addr=0xffffffffffffffff size=2)?

I don't think so. The current code does not care about it and if it
happens its a bug in the iommu implementation.

Joerg

-- 
           |           AMD Saxony Limited Liability Company & Co. KG
 Operating |         Wilschdorfer Landstr. 101, 01109 Dresden, Germany
 System    |                  Register Court Dresden: HRA 4896
 Research  |              General Partner authorized to represent:
 Center    |             AMD Saxony LLC (Wilmington, Delaware, US)
           | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy


  reply	other threads:[~2008-09-09 16:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-09 16:06 [PATCH 0/4] add a helper function, is_buffer_dma_capable() FUJITA Tomonori
2008-09-09 16:06 ` [PATCH 1/4] add is_buffer_dma_capable helper function FUJITA Tomonori
2008-09-09 16:06   ` [PATCH 2/4] x86: convert gart to use " FUJITA Tomonori
2008-09-09 16:06     ` [PATCH 3/4] x86: convert pci-nommu " FUJITA Tomonori
2008-09-09 16:06       ` [PATCH 4/4] swiotlb: convert swiotlb " FUJITA Tomonori
2008-09-09 16:17   ` [PATCH 1/4] add " Luck, Tony
2008-09-09 16:21     ` Joerg Roedel [this message]
2008-09-09 16:49     ` FUJITA Tomonori
2008-09-09 16:27 ` [PATCH 0/4] add a helper function, is_buffer_dma_capable() Joerg Roedel
2008-09-10  9:34   ` Ingo Molnar

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=20080909162116.GB13536@amd.com \
    --to=joerg.roedel@amd.com \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.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.