All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ray Jui <ray.jui@broadcom.com>
To: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Srinath Mannam <srinath.mannam@broadcom.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>, Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	BCM Kernel Feedback <bcm-kernel-feedback-list@broadcom.com>,
	linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Abhishek Shah <abhishek.shah@broadcom.com>
Subject: Re: [PATCH v4 2/2] PCI: iproc: Add outbound configuration for 32-bit I/O region
Date: Thu, 4 Apr 2019 10:48:08 -0700	[thread overview]
Message-ID: <2c3d80ce-6fa8-a20b-135b-ea754ff4eda5@broadcom.com> (raw)
In-Reply-To: <20190403113124.GA16233@e107981-ln.cambridge.arm.com>

Hi Lorenzo,

On 4/3/2019 4:31 AM, Lorenzo Pieralisi wrote:
> On Wed, Apr 03, 2019 at 08:41:44AM +0530, Srinath Mannam wrote:
>> Hi Lorenzo,
>>
>> Please see my reply below,
>>
>> On Tue, Apr 2, 2019 at 7:08 PM Lorenzo Pieralisi
>> <lorenzo.pieralisi@arm.com> wrote:
>>>
>>> On Tue, Apr 02, 2019 at 04:16:13PM +0530, Srinath Mannam wrote:
>>>
>>> [...]
>>>
>>>>> Ok - I start to understand. What does it mean in HW terms that your
>>>>> 32bit AXI address region size is 32MB ? Please explain to me in details.
>>>>>
>>>> In our PCIe controller HW, AXI address from 0x42000000 to 0x44000000
>>>> of 32MB size and .
>>>> AXI address from 0x400000000 to 0x480000000 of 2GB size are provided
>>>> to map ob address.
>>>> First IO region is inside 32bit address and second IO region is
>>>> outside 32bit address.
>>>> This code change is to map first IO region(0x42000000 to 0x44000000).
>>>>
>>>>> IIUC you are using an OARR0 of 128MB in size to map a 32MB address
>>>>> region, that's what I understand this patch does (and the lowest index
>>>>> corresponds to the smallest possible size - it is far from clear by
>>>>> looking at the patch).
>>>> Yes, lowest index corresponds to smallest possible size (128MB).
>>>> In our controller we have multiple windows like OARR0, OARR1, OARR2,
>>>> OARR3 all supports multiple sizes from 128MB to 1024MB.
>>>> These details are given at the top of this driver file, as shown
>>>> below. all windows supports 128MB size still we must use OARR0 window
>>>> to configure first IO region(0x42000000 to 0x44000000).
>>>>
>>>> static const struct iproc_pcie_ob_map paxb_v2_ob_map[] = {
>>>>         {
>>>>                 /* OARR0/OMAP0 */
>>>>                 .window_sizes = { 128, 256 },
>>>>                 .nr_sizes = 2,
>>>>         },
>>>>         {
>>>>                 /* OARR1/OMAP1 */
>>>>                 .window_sizes = { 128, 256 },
>>>>                 .nr_sizes = 2,
>>>>         },
>>>>         {
>>>>                 /* OARR2/OMAP2 */
>>>>                 .window_sizes = { 128, 256, 512, 1024 },
>>>>                 .nr_sizes = 4,
>>>>         },
>>>>         {
>>>>                 /* OARR3/OMAP3 */
>>>>                 .window_sizes = { 128, 256, 512, 1024 },
>>>>                 .nr_sizes = 4,
>>>>         },
>>>> };
>>>
>>> Ok so this patch allows mapping an AXI I/O window that is smaller
>>> than OARR possible sizes, why it was not done from the beginning
>>> I really do not know.
>>>
>> Same Iproc driver we use for multiple SOCs, in previous SOCs does not
>> have 32-bit AXI address region to map ob.
>> In the present SOC, 32-bit AXI address region is available so that
>> this change is added.
>>
>>> Now explain this to me please:
>>>
>>>> This patch add outbound window configuration to map below 32-bit I/O range
>>>> with corresponding PCI memory, which helps to access I/O region in ARM
>>>> 32-bit and one to one mapping of I/O region to PCI memory.
>>>>
>>>> Ex:
>>>> 1. ranges DT property given for current driver is,
>>>>     ranges = <0x83000000 0x0 0x40000000 0x4 0x00000000 0 0x40000000>;
>>>>     I/O region address is 0x400000000
>>>> 2. ranges DT property can be given after this patch,
>>>>     ranges = <0x83000000 0x0 0x42000000 0x0 0x42000000 0 0x2000000>;
>>>>     I/O region address is 0x42000000
>>>
>>> Why 1:1 AXI<->PCI address mapping is not possible in (1), how does the
>>> current code works on 32-bit systems and what's the benefit your change
>>> is bringing.
>> non-prefetchable memory range can only support 32-bit addresses, so
>> that we have taken 32-bit PCI bus address in (1).
>> current code does not work in 32-bit systems. In the present SOC with
>> this new change we can access from 32-bit CPU.
> 
> Thank you. I rewrote the log and pushed patches to pci/iproc, please
> have a look (Ray/Scott please do have a look too) and report back
> if that's fine.>

I reviewed the rephrased commit message by you in pci/iproc branch. It
looks very good to me. Thank you so much for helping with this!

Ray

> Do you agree that the initial commit was lacking _significant_
> information ? Please remember that the commit log plays a fundamental
> part in understanding a change and this one is a very important one
> so I am being pedantic on it.
> 
> Thanks,
> Lorenzo
> 

WARNING: multiple messages have this Message-ID (diff)
From: Ray Jui <ray.jui@broadcom.com>
To: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Srinath Mannam <srinath.mannam@broadcom.com>
Cc: Scott Branden <sbranden@broadcom.com>,
	Ray Jui <rjui@broadcom.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	BCM Kernel Feedback <bcm-kernel-feedback-list@broadcom.com>,
	linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
	Abhishek Shah <abhishek.shah@broadcom.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v4 2/2] PCI: iproc: Add outbound configuration for 32-bit I/O region
Date: Thu, 4 Apr 2019 10:48:08 -0700	[thread overview]
Message-ID: <2c3d80ce-6fa8-a20b-135b-ea754ff4eda5@broadcom.com> (raw)
In-Reply-To: <20190403113124.GA16233@e107981-ln.cambridge.arm.com>

Hi Lorenzo,

On 4/3/2019 4:31 AM, Lorenzo Pieralisi wrote:
> On Wed, Apr 03, 2019 at 08:41:44AM +0530, Srinath Mannam wrote:
>> Hi Lorenzo,
>>
>> Please see my reply below,
>>
>> On Tue, Apr 2, 2019 at 7:08 PM Lorenzo Pieralisi
>> <lorenzo.pieralisi@arm.com> wrote:
>>>
>>> On Tue, Apr 02, 2019 at 04:16:13PM +0530, Srinath Mannam wrote:
>>>
>>> [...]
>>>
>>>>> Ok - I start to understand. What does it mean in HW terms that your
>>>>> 32bit AXI address region size is 32MB ? Please explain to me in details.
>>>>>
>>>> In our PCIe controller HW, AXI address from 0x42000000 to 0x44000000
>>>> of 32MB size and .
>>>> AXI address from 0x400000000 to 0x480000000 of 2GB size are provided
>>>> to map ob address.
>>>> First IO region is inside 32bit address and second IO region is
>>>> outside 32bit address.
>>>> This code change is to map first IO region(0x42000000 to 0x44000000).
>>>>
>>>>> IIUC you are using an OARR0 of 128MB in size to map a 32MB address
>>>>> region, that's what I understand this patch does (and the lowest index
>>>>> corresponds to the smallest possible size - it is far from clear by
>>>>> looking at the patch).
>>>> Yes, lowest index corresponds to smallest possible size (128MB).
>>>> In our controller we have multiple windows like OARR0, OARR1, OARR2,
>>>> OARR3 all supports multiple sizes from 128MB to 1024MB.
>>>> These details are given at the top of this driver file, as shown
>>>> below. all windows supports 128MB size still we must use OARR0 window
>>>> to configure first IO region(0x42000000 to 0x44000000).
>>>>
>>>> static const struct iproc_pcie_ob_map paxb_v2_ob_map[] = {
>>>>         {
>>>>                 /* OARR0/OMAP0 */
>>>>                 .window_sizes = { 128, 256 },
>>>>                 .nr_sizes = 2,
>>>>         },
>>>>         {
>>>>                 /* OARR1/OMAP1 */
>>>>                 .window_sizes = { 128, 256 },
>>>>                 .nr_sizes = 2,
>>>>         },
>>>>         {
>>>>                 /* OARR2/OMAP2 */
>>>>                 .window_sizes = { 128, 256, 512, 1024 },
>>>>                 .nr_sizes = 4,
>>>>         },
>>>>         {
>>>>                 /* OARR3/OMAP3 */
>>>>                 .window_sizes = { 128, 256, 512, 1024 },
>>>>                 .nr_sizes = 4,
>>>>         },
>>>> };
>>>
>>> Ok so this patch allows mapping an AXI I/O window that is smaller
>>> than OARR possible sizes, why it was not done from the beginning
>>> I really do not know.
>>>
>> Same Iproc driver we use for multiple SOCs, in previous SOCs does not
>> have 32-bit AXI address region to map ob.
>> In the present SOC, 32-bit AXI address region is available so that
>> this change is added.
>>
>>> Now explain this to me please:
>>>
>>>> This patch add outbound window configuration to map below 32-bit I/O range
>>>> with corresponding PCI memory, which helps to access I/O region in ARM
>>>> 32-bit and one to one mapping of I/O region to PCI memory.
>>>>
>>>> Ex:
>>>> 1. ranges DT property given for current driver is,
>>>>     ranges = <0x83000000 0x0 0x40000000 0x4 0x00000000 0 0x40000000>;
>>>>     I/O region address is 0x400000000
>>>> 2. ranges DT property can be given after this patch,
>>>>     ranges = <0x83000000 0x0 0x42000000 0x0 0x42000000 0 0x2000000>;
>>>>     I/O region address is 0x42000000
>>>
>>> Why 1:1 AXI<->PCI address mapping is not possible in (1), how does the
>>> current code works on 32-bit systems and what's the benefit your change
>>> is bringing.
>> non-prefetchable memory range can only support 32-bit addresses, so
>> that we have taken 32-bit PCI bus address in (1).
>> current code does not work in 32-bit systems. In the present SOC with
>> this new change we can access from 32-bit CPU.
> 
> Thank you. I rewrote the log and pushed patches to pci/iproc, please
> have a look (Ray/Scott please do have a look too) and report back
> if that's fine.>

I reviewed the rephrased commit message by you in pci/iproc branch. It
looks very good to me. Thank you so much for helping with this!

Ray

> Do you agree that the initial commit was lacking _significant_
> information ? Please remember that the commit log plays a fundamental
> part in understanding a change and this one is a very important one
> so I am being pedantic on it.
> 
> Thanks,
> Lorenzo
> 

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

  parent reply	other threads:[~2019-04-04 17:48 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-01  4:52 [PATCH v4 0/2] Add IPROC PCIe new features Srinath Mannam
2019-03-01  4:52 ` Srinath Mannam
2019-03-01  4:52 ` [PATCH v4 1/2] PCI: iproc: Add CRS check in config read Srinath Mannam
2019-03-01  4:52   ` Srinath Mannam
2019-03-01  4:52 ` [PATCH v4 2/2] PCI: iproc: Add outbound configuration for 32-bit I/O region Srinath Mannam
2019-03-01  4:52   ` Srinath Mannam
2019-03-29 17:35   ` Lorenzo Pieralisi
2019-03-29 17:35     ` Lorenzo Pieralisi
2019-04-01  5:34     ` Srinath Mannam
2019-04-01  5:34       ` Srinath Mannam
2019-04-01 16:44       ` Lorenzo Pieralisi
2019-04-01 16:44         ` Lorenzo Pieralisi
2019-04-01 22:03         ` Ray Jui
2019-04-01 22:03           ` Ray Jui
2019-04-02  9:50           ` Srinath Mannam
2019-04-02  9:50             ` Srinath Mannam
2019-04-02 10:26             ` Lorenzo Pieralisi
2019-04-02 10:26               ` Lorenzo Pieralisi
2019-04-02 10:46               ` Srinath Mannam
2019-04-02 10:46                 ` Srinath Mannam
2019-04-02 13:38                 ` Lorenzo Pieralisi
2019-04-02 13:38                   ` Lorenzo Pieralisi
2019-04-03  3:11                   ` Srinath Mannam
2019-04-03  3:11                     ` Srinath Mannam
2019-04-03 11:31                     ` Lorenzo Pieralisi
2019-04-03 11:31                       ` Lorenzo Pieralisi
2019-04-04  5:41                       ` Srinath Mannam
2019-04-04  5:41                         ` Srinath Mannam
2019-04-04 17:48                       ` Ray Jui [this message]
2019-04-04 17:48                         ` Ray Jui
2019-03-27  8:38 ` [PATCH v4 0/2] Add IPROC PCIe new features Srinath Mannam
2019-03-27  8:38   ` Srinath Mannam
2019-03-27 12:31   ` Lorenzo Pieralisi
2019-03-27 12:31     ` Lorenzo Pieralisi
2019-03-27 15:15     ` Srinath Mannam
2019-03-27 15:15       ` Srinath Mannam
2019-03-29 16:51 ` Lorenzo Pieralisi
2019-03-29 16:51   ` Lorenzo Pieralisi
2019-03-29 17:03   ` Scott Branden
2019-03-29 17:03     ` Scott Branden

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=2c3d80ce-6fa8-a20b-135b-ea754ff4eda5@broadcom.com \
    --to=ray.jui@broadcom.com \
    --cc=abhishek.shah@broadcom.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bhelgaas@google.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=rjui@broadcom.com \
    --cc=sbranden@broadcom.com \
    --cc=srinath.mannam@broadcom.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.