All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pankaj Bansal <pankaj.bansal@nxp.com>
To: Will Deacon <will.deacon@arm.com>,
	Robin Murphy <robin.murphy@arm.com>,
	Joerg Roedel <joro@8bytes.org>
Cc: "iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>, Varun Sethi <V.Sethi@nxp.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: RE: [ARM SMMU] Dynamic StreamID allocation
Date: Fri, 10 May 2019 13:19:05 +0000	[thread overview]
Message-ID: <VI1PR0401MB24962EFD4057D823075230C6F10C0@VI1PR0401MB2496.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <VI1PR0401MB24969CE24E4FB91EC8551DEBF10C0@VI1PR0401MB2496.eurprd04.prod.outlook.com>

Correction: we use ARM SMMU-500.
Corresponding bindings are : https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/iommu/arm,smmu.txt#L49

The #iommu-cells is 1 in our SOC: https://elixir.bootlin.com/linux/latest/source/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi#L693

Regards,
Pankaj Bansal

> -----Original Message-----
> From: Pankaj Bansal
> Sent: Friday, 10 May, 2019 06:04 PM
> To: Will Deacon <will.deacon@arm.com>; Robin Murphy
> <robin.murphy@arm.com>; Joerg Roedel <joro@8bytes.org>
> Cc: linux-arm-kernel@lists.infradead.org; iommu@lists.linux-foundation.org;
> Varun Sethi <V.Sethi@nxp.com>; Nipun Gupta <nipun.gupta@nxp.com>
> Subject: [ARM SMMU] Dynamic StreamID allocation
> 
> Hi Will/Robin/Joerg,
> 
> I am s/w engineer from NXP India Pvt. Ltd.
> We are using SMMU-V3 in one of NXP SOC.
> I have a question about the SMMU Stream ID allocation in linux.
> 
> Right now the Stream IDs allocated to a device are mapped via device tree to
> the device.
> https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindin
> gs/iommu/arm,smmu-v3.txt#L39
> 
> As the device tree is passed from bootloader to linux, we detect all the stream
> IDs needed by a device in bootloader and add their IDs in respective device
> nodes.
> For each PCIE Endpoint (a unique BDF (Bus Device Function)) on PCIE bus, we are
> assigning a unique Stream ID in bootloader.
> 
> However, this poses an issue with PCIE hot plug.
> If we plug in a pcie device while linux is running, a unique BDF is assigned to the
> device, for which there is no stream ID in device tree.
> 
> How can this problem be solved in linux?
> 
> Is there a way to assign (and revoke) stream IDs at run time?
> 
> Regards,
> Pankaj Bansal

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

WARNING: multiple messages have this Message-ID (diff)
From: Pankaj Bansal <pankaj.bansal@nxp.com>
To: Will Deacon <will.deacon@arm.com>,
	Robin Murphy <robin.murphy@arm.com>,
	Joerg Roedel <joro@8bytes.org>
Cc: "iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>, Varun Sethi <V.Sethi@nxp.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Nipun Gupta <nipun.gupta@nxp.com>
Subject: RE: [ARM SMMU] Dynamic StreamID allocation
Date: Fri, 10 May 2019 13:19:05 +0000	[thread overview]
Message-ID: <VI1PR0401MB24962EFD4057D823075230C6F10C0@VI1PR0401MB2496.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <VI1PR0401MB24969CE24E4FB91EC8551DEBF10C0@VI1PR0401MB2496.eurprd04.prod.outlook.com>

Correction: we use ARM SMMU-500.
Corresponding bindings are : https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/iommu/arm,smmu.txt#L49

The #iommu-cells is 1 in our SOC: https://elixir.bootlin.com/linux/latest/source/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi#L693

Regards,
Pankaj Bansal

> -----Original Message-----
> From: Pankaj Bansal
> Sent: Friday, 10 May, 2019 06:04 PM
> To: Will Deacon <will.deacon@arm.com>; Robin Murphy
> <robin.murphy@arm.com>; Joerg Roedel <joro@8bytes.org>
> Cc: linux-arm-kernel@lists.infradead.org; iommu@lists.linux-foundation.org;
> Varun Sethi <V.Sethi@nxp.com>; Nipun Gupta <nipun.gupta@nxp.com>
> Subject: [ARM SMMU] Dynamic StreamID allocation
> 
> Hi Will/Robin/Joerg,
> 
> I am s/w engineer from NXP India Pvt. Ltd.
> We are using SMMU-V3 in one of NXP SOC.
> I have a question about the SMMU Stream ID allocation in linux.
> 
> Right now the Stream IDs allocated to a device are mapped via device tree to
> the device.
> https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindin
> gs/iommu/arm,smmu-v3.txt#L39
> 
> As the device tree is passed from bootloader to linux, we detect all the stream
> IDs needed by a device in bootloader and add their IDs in respective device
> nodes.
> For each PCIE Endpoint (a unique BDF (Bus Device Function)) on PCIE bus, we are
> assigning a unique Stream ID in bootloader.
> 
> However, this poses an issue with PCIE hot plug.
> If we plug in a pcie device while linux is running, a unique BDF is assigned to the
> device, for which there is no stream ID in device tree.
> 
> How can this problem be solved in linux?
> 
> Is there a way to assign (and revoke) stream IDs at run time?
> 
> Regards,
> Pankaj Bansal


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

  reply	other threads:[~2019-05-10 13:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-10 12:33 [ARM SMMU] Dynamic StreamID allocation Pankaj Bansal
2019-05-10 12:33 ` Pankaj Bansal
2019-05-10 13:19 ` Pankaj Bansal [this message]
2019-05-10 13:19   ` Pankaj Bansal
2019-05-10 13:36 ` Jean-Philippe Brucker
2019-05-10 13:36   ` Jean-Philippe Brucker
2019-05-13  7:09   ` Pankaj Bansal
2019-05-13  7:09     ` Pankaj Bansal
2019-05-13 12:42     ` Jean-Philippe Brucker
2019-05-13 12:42       ` Jean-Philippe Brucker
2019-05-13 13:36       ` Robin Murphy
2019-05-13 13:36         ` Robin Murphy
2019-05-13 13:34 ` Laurentiu Tudor
2019-05-13 13:34   ` Laurentiu Tudor

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=VI1PR0401MB24962EFD4057D823075230C6F10C0@VI1PR0401MB2496.eurprd04.prod.outlook.com \
    --to=pankaj.bansal@nxp.com \
    --cc=V.Sethi@nxp.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=robin.murphy@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 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.