All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: "Tian, Kevin" <kevin.tian@intel.com>
Cc: Baolu Lu <baolu.lu@linux.intel.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"yuji2.ishikawa@toshiba.co.jp" <yuji2.ishikawa@toshiba.co.jp>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>,
	Rob Herring <robh+dt@kernel.org>,
	Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>,
	Will Deacon <will@kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/3] iommu: Add Visconti5 IOMMU driver
Date: Wed, 25 May 2022 22:40:00 -0300	[thread overview]
Message-ID: <20220526014000.GJ1343366@nvidia.com> (raw)
In-Reply-To: <BN9PR11MB52769A5FE5B8291F7D47D5AE8CD99@BN9PR11MB5276.namprd11.prod.outlook.com>

On Thu, May 26, 2022 at 12:43:25AM +0000, Tian, Kevin wrote:

> iiuc then this suggests there should be only one iommu group per atu,
> instead of using generic_device_group() to create one group per
> device.

Sounds like it

> > rejected then this driver should have a IOMMU_DOMAIN_BLOCKING and
> > return that from ops->def_domain_type().
> 
> BLOCKING should not be used as a default domain type for DMA API
> which needs either a DMA or IDENTITY type.

New drivers should not have a NULL group->default_domain. 

IMHO this driver does not support the DMA API so the default_domain
should be assigned to blocking and the DMA API disabled. We might need
some core changes to accommodate this.

The alternative would be to implement the identity domain, assuming
the ATU thing can store that kind of translation.

Jason

WARNING: multiple messages have this Message-ID (diff)
From: Jason Gunthorpe via iommu <iommu@lists.linux-foundation.org>
To: "Tian, Kevin" <kevin.tian@intel.com>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Will Deacon <will@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>,
	Rob Herring <robh+dt@kernel.org>,
	Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>,
	"yuji2.ishikawa@toshiba.co.jp" <yuji2.ishikawa@toshiba.co.jp>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/3] iommu: Add Visconti5 IOMMU driver
Date: Wed, 25 May 2022 22:40:00 -0300	[thread overview]
Message-ID: <20220526014000.GJ1343366@nvidia.com> (raw)
In-Reply-To: <BN9PR11MB52769A5FE5B8291F7D47D5AE8CD99@BN9PR11MB5276.namprd11.prod.outlook.com>

On Thu, May 26, 2022 at 12:43:25AM +0000, Tian, Kevin wrote:

> iiuc then this suggests there should be only one iommu group per atu,
> instead of using generic_device_group() to create one group per
> device.

Sounds like it

> > rejected then this driver should have a IOMMU_DOMAIN_BLOCKING and
> > return that from ops->def_domain_type().
> 
> BLOCKING should not be used as a default domain type for DMA API
> which needs either a DMA or IDENTITY type.

New drivers should not have a NULL group->default_domain. 

IMHO this driver does not support the DMA API so the default_domain
should be assigned to blocking and the DMA API disabled. We might need
some core changes to accommodate this.

The alternative would be to implement the identity domain, assuming
the ATU thing can store that kind of translation.

Jason
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

WARNING: multiple messages have this Message-ID (diff)
From: Jason Gunthorpe <jgg@nvidia.com>
To: "Tian, Kevin" <kevin.tian@intel.com>
Cc: Baolu Lu <baolu.lu@linux.intel.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"yuji2.ishikawa@toshiba.co.jp" <yuji2.ishikawa@toshiba.co.jp>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>,
	Rob Herring <robh+dt@kernel.org>,
	Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>,
	Will Deacon <will@kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/3] iommu: Add Visconti5 IOMMU driver
Date: Wed, 25 May 2022 22:40:00 -0300	[thread overview]
Message-ID: <20220526014000.GJ1343366@nvidia.com> (raw)
In-Reply-To: <BN9PR11MB52769A5FE5B8291F7D47D5AE8CD99@BN9PR11MB5276.namprd11.prod.outlook.com>

On Thu, May 26, 2022 at 12:43:25AM +0000, Tian, Kevin wrote:

> iiuc then this suggests there should be only one iommu group per atu,
> instead of using generic_device_group() to create one group per
> device.

Sounds like it

> > rejected then this driver should have a IOMMU_DOMAIN_BLOCKING and
> > return that from ops->def_domain_type().
> 
> BLOCKING should not be used as a default domain type for DMA API
> which needs either a DMA or IDENTITY type.

New drivers should not have a NULL group->default_domain. 

IMHO this driver does not support the DMA API so the default_domain
should be assigned to blocking and the DMA API disabled. We might need
some core changes to accommodate this.

The alternative would be to implement the identity domain, assuming
the ATU thing can store that kind of translation.

Jason

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-05-26  1:40 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-25  1:31 [PATCH 0/3] Add Visconti5 IOMMU driver Nobuhiro Iwamatsu
2022-05-25  1:31 ` Nobuhiro Iwamatsu
2022-05-25  1:31 ` Nobuhiro Iwamatsu
2022-05-25  1:31 ` [PATCH 1/3] iommu: " Nobuhiro Iwamatsu
2022-05-25  1:31   ` Nobuhiro Iwamatsu
2022-05-25  1:31   ` Nobuhiro Iwamatsu
2022-05-25  4:45   ` kernel test robot
2022-05-25  4:45     ` kernel test robot
2022-05-25  4:45     ` kernel test robot
2022-05-25  6:09   ` kernel test robot
2022-05-25  6:09     ` kernel test robot
2022-05-25  6:09     ` kernel test robot
2022-05-25  6:26   ` Baolu Lu
2022-05-25  6:26     ` Baolu Lu
2022-05-25  6:26     ` Baolu Lu
2022-05-25 18:26     ` Jason Gunthorpe
2022-05-25 18:26       ` Jason Gunthorpe
2022-05-25 18:26       ` Jason Gunthorpe via iommu
2022-05-26  0:43       ` Tian, Kevin
2022-05-26  0:43         ` Tian, Kevin
2022-05-26  0:43         ` Tian, Kevin
2022-05-26  1:40         ` Jason Gunthorpe [this message]
2022-05-26  1:40           ` Jason Gunthorpe
2022-05-26  1:40           ` Jason Gunthorpe via iommu
2022-06-20  5:49       ` nobuhiro1.iwamatsu
2022-06-20  5:49         ` nobuhiro1.iwamatsu
2022-06-20  5:49         ` nobuhiro1.iwamatsu
2022-06-24 13:39         ` Jason Gunthorpe
2022-06-24 13:39           ` Jason Gunthorpe
2022-06-24 13:39           ` Jason Gunthorpe via iommu
2022-06-20  2:15     ` nobuhiro1.iwamatsu
2022-06-20  2:15       ` nobuhiro1.iwamatsu
2022-06-20  2:15       ` nobuhiro1.iwamatsu
2022-05-25  9:36   ` kernel test robot
2022-05-25  9:36     ` kernel test robot
2022-05-25  9:36     ` kernel test robot
2022-05-25  1:31 ` [PATCH 2/3] iommu: bindings: Add binding documentation for Toshiba Visconti5 IOMMU device Nobuhiro Iwamatsu
2022-05-25  1:31   ` Nobuhiro Iwamatsu
2022-05-25  1:31   ` Nobuhiro Iwamatsu
2022-06-02 13:43   ` Rob Herring
2022-06-02 13:43     ` Rob Herring
2022-06-02 13:43     ` Rob Herring
2022-05-25  1:31 ` [PATCH 3/3] MAINTAINERS: Add entries for Toshiba Visconti5 IOMMU Nobuhiro Iwamatsu
2022-05-25  1:31   ` Nobuhiro Iwamatsu
2022-05-25  1:31   ` Nobuhiro Iwamatsu

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=20220526014000.GJ1343366@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=kevin.tian@intel.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nobuhiro1.iwamatsu@toshiba.co.jp \
    --cc=robh+dt@kernel.org \
    --cc=will@kernel.org \
    --cc=yuji2.ishikawa@toshiba.co.jp \
    /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.