All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
To: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH 2/2] iommu: Implement a dummy bus_set_iommu()
Date: Wed, 22 Oct 2014 16:29:22 +0200	[thread overview]
Message-ID: <20141022142922.GH10074@8bytes.org> (raw)
In-Reply-To: <20141015091043.GA13162@ulmo>

On Wed, Oct 15, 2014 at 11:10:44AM +0200, Thierry Reding wrote:
> It seems like I never got back to you on this. The reason here is that
> for Tegra the IOMMU is part of a larger IP block. The IP block is
> primarily a memory controller with a bunch of configuration knobs for
> arbitration, prioritization and whatnot. A smaller part of the device
> does the IOMMU translation. Therefore the IOMMU implementation would
> be part of a larger driver, and having this dummy would reduce the
> amount of #ifdefs required.
> 
> bus_set_iommu() is also the only function in include/linux/iommu.h that
> doesn't have a dummy, so it seemed like a natural thing to do.
> 
> That said, I can work around this being absent for !IOMMU_API.

Or you make this "larger driver" just depend on IOMMU_API? Otherwise you
need the #ifdefs anyway to not carry around the iommu-ops functions in
the driver without having the iommu core enabled, no?


	Joerg

WARNING: multiple messages have this Message-ID (diff)
From: joro@8bytes.org (Joerg Roedel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] iommu: Implement a dummy bus_set_iommu()
Date: Wed, 22 Oct 2014 16:29:22 +0200	[thread overview]
Message-ID: <20141022142922.GH10074@8bytes.org> (raw)
In-Reply-To: <20141015091043.GA13162@ulmo>

On Wed, Oct 15, 2014 at 11:10:44AM +0200, Thierry Reding wrote:
> It seems like I never got back to you on this. The reason here is that
> for Tegra the IOMMU is part of a larger IP block. The IP block is
> primarily a memory controller with a bunch of configuration knobs for
> arbitration, prioritization and whatnot. A smaller part of the device
> does the IOMMU translation. Therefore the IOMMU implementation would
> be part of a larger driver, and having this dummy would reduce the
> amount of #ifdefs required.
> 
> bus_set_iommu() is also the only function in include/linux/iommu.h that
> doesn't have a dummy, so it seemed like a natural thing to do.
> 
> That said, I can work around this being absent for !IOMMU_API.

Or you make this "larger driver" just depend on IOMMU_API? Otherwise you
need the #ifdefs anyway to not carry around the iommu-ops functions in
the driver without having the iommu core enabled, no?


	Joerg

WARNING: multiple messages have this Message-ID (diff)
From: Joerg Roedel <joro@8bytes.org>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: iommu@lists.linux-foundation.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] iommu: Implement a dummy bus_set_iommu()
Date: Wed, 22 Oct 2014 16:29:22 +0200	[thread overview]
Message-ID: <20141022142922.GH10074@8bytes.org> (raw)
In-Reply-To: <20141015091043.GA13162@ulmo>

On Wed, Oct 15, 2014 at 11:10:44AM +0200, Thierry Reding wrote:
> It seems like I never got back to you on this. The reason here is that
> for Tegra the IOMMU is part of a larger IP block. The IP block is
> primarily a memory controller with a bunch of configuration knobs for
> arbitration, prioritization and whatnot. A smaller part of the device
> does the IOMMU translation. Therefore the IOMMU implementation would
> be part of a larger driver, and having this dummy would reduce the
> amount of #ifdefs required.
> 
> bus_set_iommu() is also the only function in include/linux/iommu.h that
> doesn't have a dummy, so it seemed like a natural thing to do.
> 
> That said, I can work around this being absent for !IOMMU_API.

Or you make this "larger driver" just depend on IOMMU_API? Otherwise you
need the #ifdefs anyway to not carry around the iommu-ops functions in
the driver without having the iommu core enabled, no?


	Joerg


  reply	other threads:[~2014-10-22 14:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-01 12:45 [PATCH 1/2] iommu: Always define struct iommu_ops Thierry Reding
2014-08-01 12:45 ` Thierry Reding
2014-08-01 12:45 ` Thierry Reding
     [not found] ` <1406897113-20099-1-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-01 12:45   ` [PATCH 2/2] iommu: Implement a dummy bus_set_iommu() Thierry Reding
2014-08-01 12:45     ` Thierry Reding
2014-08-01 12:45     ` Thierry Reding
     [not found]     ` <1406897113-20099-2-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-18 16:57       ` Joerg Roedel
2014-08-18 16:57         ` Joerg Roedel
2014-08-18 16:57         ` Joerg Roedel
2014-10-15  9:10         ` Thierry Reding
2014-10-15  9:10           ` Thierry Reding
2014-10-22 14:29           ` Joerg Roedel [this message]
2014-10-22 14:29             ` Joerg Roedel
2014-10-22 14:29             ` Joerg Roedel
     [not found]             ` <20141022142922.GH10074-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2014-10-23  8:09               ` Thierry Reding
2014-10-23  8:09                 ` Thierry Reding
2014-10-23  8:09                 ` Thierry Reding

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=20141022142922.GH10074@8bytes.org \
    --to=joro-zlv9swrftaidnm+yrofe0a@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@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.