All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
To: Stuart Yoder <b08248-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 4/5] iommu: Add domain window handling functions
Date: Tue, 5 Feb 2013 14:20:45 +0100	[thread overview]
Message-ID: <20130205132044.GB2532@8bytes.org> (raw)
In-Reply-To: <CALRxmdD9Ock04AoUtF9FT_uY5C5Eb7cSPmtCM6WK=StNB_iYkQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Mon, Feb 04, 2013 at 05:31:51PM -0600, Stuart Yoder wrote:
> On Mon, Feb 4, 2013 at 12:56 PM, Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org> wrote:
> > On Mon, Feb 04, 2013 at 12:10:51PM -0600, Stuart Yoder wrote:
> >> On Mon, Feb 4, 2013 at 7:18 AM, Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org> wrote:
> >> > +static inline int iommu_domain_window_enable(struct iommu_domain *domain,
> >> > +                                            u32 wnd_nr, phys_addr_t paddr,
> >> > +                                            size_t size)
> >> > +{
> >> > +       return -ENODEV;
> >> > +}
> >> > +
> >> > +static inline void iommu_domain_window_disable(struct iommu_domain *domain,
> >> > +                                              u32 wnd_nr)
> >> > +{
> >> > +}
> >> > +
> >> >  static inline phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain,
> >> >                                              unsigned long iova)
> >> >  {
> >>
> >> This API looks workable.   The one change we need is that the size argument in
> >> the enable API needs to be 64 bits.   Our window sizes can exceed 4GB.
> >
> > Okay. So if your architecture supports sizes over 2^32 then size_t
> > probably is already 64bits, right?
> 
> No, on a 32-bit platform size_t would generally be 32-bits.  But the PAMU
> is independent of that.   I think we should just make it a u64.

Okay, I will change that. Will push the updated branch once Sethi agrees
on the interface changes.


	Joerg

WARNING: multiple messages have this Message-ID (diff)
From: Joerg Roedel <joro@8bytes.org>
To: Stuart Yoder <b08248@gmail.com>
Cc: Sethi Varun-B16395 <B16395@freescale.com>,
	iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/5] iommu: Add domain window handling functions
Date: Tue, 5 Feb 2013 14:20:45 +0100	[thread overview]
Message-ID: <20130205132044.GB2532@8bytes.org> (raw)
In-Reply-To: <CALRxmdD9Ock04AoUtF9FT_uY5C5Eb7cSPmtCM6WK=StNB_iYkQ@mail.gmail.com>

On Mon, Feb 04, 2013 at 05:31:51PM -0600, Stuart Yoder wrote:
> On Mon, Feb 4, 2013 at 12:56 PM, Joerg Roedel <joro@8bytes.org> wrote:
> > On Mon, Feb 04, 2013 at 12:10:51PM -0600, Stuart Yoder wrote:
> >> On Mon, Feb 4, 2013 at 7:18 AM, Joerg Roedel <joro@8bytes.org> wrote:
> >> > +static inline int iommu_domain_window_enable(struct iommu_domain *domain,
> >> > +                                            u32 wnd_nr, phys_addr_t paddr,
> >> > +                                            size_t size)
> >> > +{
> >> > +       return -ENODEV;
> >> > +}
> >> > +
> >> > +static inline void iommu_domain_window_disable(struct iommu_domain *domain,
> >> > +                                              u32 wnd_nr)
> >> > +{
> >> > +}
> >> > +
> >> >  static inline phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain,
> >> >                                              unsigned long iova)
> >> >  {
> >>
> >> This API looks workable.   The one change we need is that the size argument in
> >> the enable API needs to be 64 bits.   Our window sizes can exceed 4GB.
> >
> > Okay. So if your architecture supports sizes over 2^32 then size_t
> > probably is already 64bits, right?
> 
> No, on a 32-bit platform size_t would generally be 32-bits.  But the PAMU
> is independent of that.   I think we should just make it a u64.

Okay, I will change that. Will push the updated branch once Sethi agrees
on the interface changes.


	Joerg



  parent reply	other threads:[~2013-02-05 13:20 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-04 13:18 [PATCH 0/5 v2] iommu: Support non-paging IOMMUs Joerg Roedel
2013-02-04 13:18 ` Joerg Roedel
     [not found] ` <1359983924-28952-1-git-send-email-joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2013-02-04 13:18   ` [PATCH 1/5] iommu: Make sure DOMAIN_ATTR_MAX is really the maximum Joerg Roedel
2013-02-04 13:18     ` Joerg Roedel
2013-02-04 13:18   ` [PATCH 2/5] iommu: Check for valid pgsize_bitmap in iommu_map/unmap Joerg Roedel
2013-02-04 13:18     ` Joerg Roedel
2013-02-04 13:18   ` [PATCH 3/5] iommu: Implement DOMAIN_ATTR_PAGING attribute Joerg Roedel
2013-02-04 13:18     ` Joerg Roedel
2013-02-04 13:18   ` [PATCH 4/5] iommu: Add domain window handling functions Joerg Roedel
2013-02-04 13:18     ` Joerg Roedel
     [not found]     ` <1359983924-28952-5-git-send-email-joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2013-02-04 18:10       ` Stuart Yoder
2013-02-04 18:10         ` Stuart Yoder
     [not found]         ` <CALRxmdCiSZgoqd8tp90kPCdA=s7SWZCTwKsFnWu7S5=U7+eRLQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-02-04 18:56           ` Joerg Roedel
2013-02-04 18:56             ` Joerg Roedel
     [not found]             ` <20130204185650.GP25591-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2013-02-04 23:31               ` Stuart Yoder
2013-02-04 23:31                 ` Stuart Yoder
     [not found]                 ` <CALRxmdD9Ock04AoUtF9FT_uY5C5Eb7cSPmtCM6WK=StNB_iYkQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-02-05 13:20                   ` Joerg Roedel [this message]
2013-02-05 13:20                     ` Joerg Roedel
2013-02-06 10:26                   ` Joerg Roedel
2013-02-06 10:26                     ` Joerg Roedel
     [not found]                     ` <20130206102607.GB2634-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2013-02-06 10:49                       ` Sethi Varun-B16395
2013-02-06 10:49                         ` Sethi Varun-B16395
2013-02-04 13:18   ` [PATCH 5/5] iommu: Add DOMAIN_ATTR_WINDOWS domain attribute Joerg Roedel
2013-02-04 13:18     ` Joerg Roedel
     [not found]     ` <1359983924-28952-6-git-send-email-joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2013-02-05  9:14       ` Sethi Varun-B16395
2013-02-05  9:14         ` Sethi Varun-B16395
     [not found]         ` <C5ECD7A89D1DC44195F34B25E172658D373D2B-RL0Hj/+nBVDYdknt8GnhQq4g8xLGJsHaLnY5E4hWTkheoWH0uzbU5w@public.gmane.org>
2013-02-05 10:41           ` Joerg Roedel
2013-02-05 10:41             ` Joerg Roedel
     [not found]             ` <20130205104155.GR25591-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2013-02-05 10:52               ` Sethi Varun-B16395
2013-02-05 10:52                 ` Sethi Varun-B16395
     [not found]                 ` <C5ECD7A89D1DC44195F34B25E172658D3752B1-RL0Hj/+nBVDYdknt8GnhQq4g8xLGJsHaLnY5E4hWTkheoWH0uzbU5w@public.gmane.org>
2013-02-05 13:05                   ` Joerg Roedel
2013-02-05 13:05                     ` Joerg Roedel
2013-02-05 17:15                     ` Sethi Varun-B16395

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=20130205132044.GB2532@8bytes.org \
    --to=joro-zlv9swrftaidnm+yrofe0a@public.gmane.org \
    --cc=b08248-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 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.