All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jitendra Bhivare via iommu <iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>
To: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>
Cc: will.deacon-5wv7dgnIgG8@public.gmane.org,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [RFC 2/5] dt-bindings: brcm: Add reserved-dma-region for iPROC
Date: Mon, 12 Mar 2018 12:33:24 +0530	[thread overview]
Message-ID: <CAOA9gs32BqGiXD7R2v7=Xkv-PVLTzuU3VmG1dAm6HNd4=w-qQg@mail.gmail.com> (raw)
In-Reply-To: <c2f30c0c-ff5e-2904-11f4-5351749381a9-5wv7dgnIgG8@public.gmane.org>

On Tue, Mar 6, 2018 at 5:12 PM, Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org> wrote:
> On 06/03/18 04:59, Jitendra Bhivare wrote:
>>
>> With SoC wide DMA mask of 40-bit, the mappings for entire IOVA space can't
>> be specified in the PAXBv2 PCIe RC of SoC. The holes in IOVA space needs
>> to
>> be reserved to prevent any IOVA allocations in those spaces.
>
>
> Can you clarify why? If this is the PCI inbound window thing again, let me
> say once again that "dma-ranges" is the appropriate way for DT to describe
> the hardware.
>
> Robin.
dma-ranges = < \
0x43000000 0x00 0x00000000 0x00 0x80000000 0x00 0x80000000 \
0x43000000 0x08 0x00000000 0x08 0x00000000 0x08 0x00000000 \
0x43000000 0x80 0x00000000 0x80 0x00000000 0x80 0x00000000>

Yes, its for PCI inbound windows. In our HW, they are limited by sizes
specified in
ARM memory maps which was done for non-IOMMU cases to catch any transfer
outside the ranges.
dma-ranges are already being used to program these inbound windows and SoC
wide DMA mask is already specified but IOMMU code can still allocate IOVAs
in the gaps for which translation will fail in PCIe RC.
>
>
>> reserved-dma-region property is added to specify the ranges which should
>> never be mapped and given to devices sitting behind.
>>
>> Reviewed-by: Ray Jui <ray.jui-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
>> Reviewed-by: Vikram Prakash <vikram.prakash-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
>> Reviewed-by: Scott Branden <scott.branden-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
>> Signed-off-by: Jitendra Bhivare <jitendra.bhivare-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
>> ---
>>   Documentation/devicetree/bindings/pci/brcm,iproc-pcie.txt | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/pci/brcm,iproc-pcie.txt
>> b/Documentation/devicetree/bindings/pci/brcm,iproc-pcie.txt
>> index b8e48b4..3be0fe3 100644
>> --- a/Documentation/devicetree/bindings/pci/brcm,iproc-pcie.txt
>> +++ b/Documentation/devicetree/bindings/pci/brcm,iproc-pcie.txt
>> @@ -30,6 +30,9 @@ Optional properties:
>>   - dma-ranges: Some PAXB-based root complexes do not have inbound mapping
>> done
>>     by the ASIC after power on reset.  In this case, SW is required to
>> configure
>>   the mapping, based on inbound memory regions specified by this property.
>> +- reserved-dma-region: PAXBv2 with IOMMU enabled cannot provide mappings
>> for
>> +  entire IOVA space specified by DMA mask. Hence this is used to reserve
>> the
>> +  gaps in dma-ranges.
>>     - brcm,pcie-ob: Some iProc SoCs do not have the outbound address
>> mapping done
>>   by the ASIC after power on reset. In this case, SW needs to configure it
>>
>

WARNING: multiple messages have this Message-ID (diff)
From: jitendra.bhivare@broadcom.com (Jitendra Bhivare)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC 2/5] dt-bindings: brcm: Add reserved-dma-region for iPROC
Date: Mon, 12 Mar 2018 12:33:24 +0530	[thread overview]
Message-ID: <CAOA9gs32BqGiXD7R2v7=Xkv-PVLTzuU3VmG1dAm6HNd4=w-qQg@mail.gmail.com> (raw)
In-Reply-To: <c2f30c0c-ff5e-2904-11f4-5351749381a9@arm.com>

On Tue, Mar 6, 2018 at 5:12 PM, Robin Murphy <robin.murphy@arm.com> wrote:
> On 06/03/18 04:59, Jitendra Bhivare wrote:
>>
>> With SoC wide DMA mask of 40-bit, the mappings for entire IOVA space can't
>> be specified in the PAXBv2 PCIe RC of SoC. The holes in IOVA space needs
>> to
>> be reserved to prevent any IOVA allocations in those spaces.
>
>
> Can you clarify why? If this is the PCI inbound window thing again, let me
> say once again that "dma-ranges" is the appropriate way for DT to describe
> the hardware.
>
> Robin.
dma-ranges = < \
0x43000000 0x00 0x00000000 0x00 0x80000000 0x00 0x80000000 \
0x43000000 0x08 0x00000000 0x08 0x00000000 0x08 0x00000000 \
0x43000000 0x80 0x00000000 0x80 0x00000000 0x80 0x00000000>

Yes, its for PCI inbound windows. In our HW, they are limited by sizes
specified in
ARM memory maps which was done for non-IOMMU cases to catch any transfer
outside the ranges.
dma-ranges are already being used to program these inbound windows and SoC
wide DMA mask is already specified but IOMMU code can still allocate IOVAs
in the gaps for which translation will fail in PCIe RC.
>
>
>> reserved-dma-region property is added to specify the ranges which should
>> never be mapped and given to devices sitting behind.
>>
>> Reviewed-by: Ray Jui <ray.jui@broadcom.com>
>> Reviewed-by: Vikram Prakash <vikram.prakash@broadcom.com>
>> Reviewed-by: Scott Branden <scott.branden@broadcom.com>
>> Signed-off-by: Jitendra Bhivare <jitendra.bhivare@broadcom.com>
>> ---
>>   Documentation/devicetree/bindings/pci/brcm,iproc-pcie.txt | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/pci/brcm,iproc-pcie.txt
>> b/Documentation/devicetree/bindings/pci/brcm,iproc-pcie.txt
>> index b8e48b4..3be0fe3 100644
>> --- a/Documentation/devicetree/bindings/pci/brcm,iproc-pcie.txt
>> +++ b/Documentation/devicetree/bindings/pci/brcm,iproc-pcie.txt
>> @@ -30,6 +30,9 @@ Optional properties:
>>   - dma-ranges: Some PAXB-based root complexes do not have inbound mapping
>> done
>>     by the ASIC after power on reset.  In this case, SW is required to
>> configure
>>   the mapping, based on inbound memory regions specified by this property.
>> +- reserved-dma-region: PAXBv2 with IOMMU enabled cannot provide mappings
>> for
>> +  entire IOVA space specified by DMA mask. Hence this is used to reserve
>> the
>> +  gaps in dma-ranges.
>>     - brcm,pcie-ob: Some iProc SoCs do not have the outbound address
>> mapping done
>>   by the ASIC after power on reset. In this case, SW needs to configure it
>>
>

  parent reply	other threads:[~2018-03-12  7:03 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-06  4:59 [RFC 0/5] DT property to reserve IOMMU regions Jitendra Bhivare
2018-03-06  4:59 ` Jitendra Bhivare
2018-03-06  4:59 ` [RFC 1/5] dt-bindings: iommu: Add reserved-dma-region for IOMMU device Jitendra Bhivare
2018-03-06  4:59   ` Jitendra Bhivare
     [not found]   ` <1520312368-7068-2-git-send-email-jitendra.bhivare-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2018-03-06 11:41     ` Robin Murphy
2018-03-06 11:41       ` Robin Murphy
     [not found]       ` <23f7c879-2dfe-dbdf-f259-dcc44f045c96-5wv7dgnIgG8@public.gmane.org>
2018-03-12  6:34         ` Jitendra Bhivare via iommu
2018-03-12  6:44         ` Jitendra Bhivare via iommu
2018-03-12  6:44           ` Jitendra Bhivare
2018-03-06  4:59 ` [RFC 2/5] dt-bindings: brcm: Add reserved-dma-region for iPROC Jitendra Bhivare
2018-03-06  4:59   ` Jitendra Bhivare
     [not found]   ` <1520312368-7068-3-git-send-email-jitendra.bhivare-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2018-03-06 11:42     ` Robin Murphy
2018-03-06 11:42       ` Robin Murphy
     [not found]       ` <c2f30c0c-ff5e-2904-11f4-5351749381a9-5wv7dgnIgG8@public.gmane.org>
2018-03-12  7:03         ` Jitendra Bhivare via iommu [this message]
2018-03-12  7:03           ` Jitendra Bhivare
     [not found]           ` <CAOA9gs32BqGiXD7R2v7=Xkv-PVLTzuU3VmG1dAm6HNd4=w-qQg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-03-14 18:45             ` Robin Murphy
2018-03-14 18:45               ` Robin Murphy
     [not found]               ` <a4a27e3c-4e7b-4850-ebf7-bd2b8f6f0d97-5wv7dgnIgG8@public.gmane.org>
2018-03-15 12:03                 ` Jitendra Bhivare via iommu
2018-03-15 12:03                   ` Jitendra Bhivare
     [not found]                   ` <CAOA9gs1XE1RkumEkYafO5f+b1YjGCFTYzxSSB-U4JcsR6=QdQg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-03-15 19:58                     ` Robin Murphy
2018-03-15 19:58                       ` Robin Murphy
2018-03-06  4:59 ` [RFC 3/5] dt-bindings: arm-smmu: Add reserved-msi-region Jitendra Bhivare
2018-03-06  4:59   ` Jitendra Bhivare
     [not found]   ` <1520312368-7068-4-git-send-email-jitendra.bhivare-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2018-03-06 11:47     ` Robin Murphy
2018-03-06 11:47       ` Robin Murphy
     [not found]       ` <9aeb8e14-2a14-d71b-7970-055ed04a131c-5wv7dgnIgG8@public.gmane.org>
2018-03-12  7:19         ` Jitendra Bhivare via iommu
2018-03-12  7:19           ` Jitendra Bhivare
     [not found]           ` <CAOA9gs0_mUJcuthxon5Ru1B7FFK=_XuCh4E4D98DzPih8dey8w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-03-15 19:42             ` Robin Murphy
2018-03-15 19:42               ` Robin Murphy
2018-03-06  4:59 ` [RFC 4/5] iommu/of: Reserve IOMMU DMA regions using DT Jitendra Bhivare
2018-03-06  4:59   ` Jitendra Bhivare
2018-03-06  4:59 ` [RFC 5/5] iommu/arm-smmu: Allow direct mapping for MSI region Jitendra Bhivare
2018-03-06  4:59   ` Jitendra Bhivare

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='CAOA9gs32BqGiXD7R2v7=Xkv-PVLTzuU3VmG1dAm6HNd4=w-qQg@mail.gmail.com' \
    --to=iommu-cuntk1mwbs9qetfly7kem3xjstq8ys+chz5vsktnxna@public.gmane.org \
    --cc=jitendra.bhivare-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=robin.murphy-5wv7dgnIgG8@public.gmane.org \
    --cc=will.deacon-5wv7dgnIgG8@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.