mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: Joerg Roedel <joro@8bytes.org>, Will Deacon <will.deacon@arm.com>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	David Woodhouse <dwmw2@infradead.org>
Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
	Joerg Roedel <jroedel@suse.de>
Subject: Re: [PATCH 06/11] iommu: Add iommu_device_set_fwnode() interface
Date: Fri, 10 Feb 2017 14:16:54 +0000	[thread overview]
Message-ID: <417eee8c-4e1b-57f0-2c00-d6c3926ce66d@arm.com> (raw)
In-Reply-To: <1486639981-32368-7-git-send-email-joro@8bytes.org>

On 09/02/17 11:32, Joerg Roedel wrote:
> From: Joerg Roedel <jroedel@suse.de>
> 
> Allow to store a fwnode in 'struct iommu_device';
> 
> Signed-off-by: Joerg Roedel <jroedel@suse.de>
> ---
>  include/linux/iommu.h | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/include/linux/iommu.h b/include/linux/iommu.h
> index bae3cfc..626c935 100644
> --- a/include/linux/iommu.h
> +++ b/include/linux/iommu.h
> @@ -214,6 +214,7 @@ struct iommu_ops {
>  struct iommu_device {
>  	struct list_head list;
>  	const struct iommu_ops *ops;
> +	struct fwnode_handle *fwnode;
>  	struct device dev;
>  };
>  
> @@ -233,6 +234,12 @@ static inline void iommu_device_set_ops(struct iommu_device *iommu,
>  	iommu->ops = ops;
>  }
>  
> +static inline void iommu_device_set_fwnode(struct iommu_device *iommu,
> +					   struct fwnode_handle *fwnode)
> +{
> +	iommu->fwnode = fwnode;
> +}

Would it make sense to simply make the ops and fwnode additional
arguments to iommu_device_register() (permitting fwnode to be NULL)?
AFAICS they should typically all have the same effective lifetime so
there doesn't seem to be any real need to handle everything separately.

Robin.

> +
>  #define IOMMU_GROUP_NOTIFY_ADD_DEVICE		1 /* Device added */
>  #define IOMMU_GROUP_NOTIFY_DEL_DEVICE		2 /* Pre Device removed */
>  #define IOMMU_GROUP_NOTIFY_BIND_DRIVER		3 /* Pre Driver bind */
> @@ -580,6 +587,11 @@ static inline void iommu_device_set_ops(struct iommu_device *iommu,
>  {
>  }
>  
> +static inline void iommu_device_set_fwnode(struct iommu_device *iommu,
> +					   struct fwnode_handle *fwnode)
> +{
> +}
> +
>  static inline void iommu_device_unregister(struct iommu_device *iommu)
>  {
>  }
> 

  reply	other threads:[~2017-02-10 14:18 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-09 11:32 [PATCH 00/11 v3] Let IOMMU core know about individual IOMMUs Joerg Roedel
2017-02-09 11:32 ` [PATCH 01/11] iommu: Rename iommu_get_instance() Joerg Roedel
2017-02-10 14:12   ` Robin Murphy
2017-02-10 15:36     ` Joerg Roedel
2017-02-09 11:32 ` [PATCH 02/11] iommu: Rename struct iommu_device Joerg Roedel
2017-02-09 11:32 ` [PATCH 03/11] iommu: Introduce new 'struct iommu_device' Joerg Roedel
2017-02-09 20:42   ` kbuild test robot
2017-02-09 11:32 ` [PATCH 04/11] iommu: Add sysfs bindings for struct iommu_device Joerg Roedel
2017-02-09 11:32 ` [PATCH 05/11] iommu: Make iommu_device_link/unlink take a " Joerg Roedel
2017-02-09 11:32 ` [PATCH 06/11] iommu: Add iommu_device_set_fwnode() interface Joerg Roedel
2017-02-10 14:16   ` Robin Murphy [this message]
2017-02-10 15:22     ` Joerg Roedel
2017-02-10 16:03       ` Robin Murphy
2017-02-10 16:11         ` Joerg Roedel
2017-02-10 16:59           ` Robin Murphy
2017-02-09 11:32 ` [PATCH 07/11] iommu/arm-smmu: Make use of the iommu_register interface Joerg Roedel
2017-02-10 14:20   ` Robin Murphy
2017-02-10 15:25     ` Joerg Roedel
2017-02-10 17:07       ` Robin Murphy
2017-02-09 11:32 ` [PATCH 08/11] iommu/msm: Make use of iommu_device_register interface Joerg Roedel
2017-02-10 14:35   ` Robin Murphy
2017-02-10 15:33     ` Joerg Roedel
2017-02-10 17:36       ` Robin Murphy
2017-02-09 11:32 ` [PATCH 09/11] iommu/mediatek: " Joerg Roedel
2017-02-09 11:32 ` [PATCH 10/11] iommu/exynos: " Joerg Roedel
2017-02-10 13:46   ` Marek Szyprowski
2017-02-10 13:59     ` Joerg Roedel
2017-02-09 11:33 ` [PATCH 11/11] iommu: Remove iommu_register_instance interface Joerg Roedel

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=417eee8c-4e1b-57f0-2c00-d6c3926ce66d@arm.com \
    --to=robin.murphy@arm.com \
    --cc=alex.williamson@redhat.com \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=jroedel@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=will.deacon@arm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®