From: Joao Pinto <Joao.Pinto@synopsys.com>
To: Bjorn Helgaas <helgaas@kernel.org>, Joao Pinto <Joao.Pinto@synopsys.com>
Cc: <jingoohan1@gmail.com>, <linux-pci@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <jszhang@marvell.com>,
<CARLOS.PALMINHA@synopsys.com>, <MiguelFalcao.Sousa@synopsys.com>
Subject: Re: [PATCH v2 1/2] pcie-designware: add iATU Unroll feature
Date: Tue, 2 Aug 2016 15:27:56 +0100 [thread overview]
Message-ID: <bc8cd064-9397-7772-72d1-a782b3769cd4@synopsys.com> (raw)
In-Reply-To: <20160802125335.GA31847@localhost>
On 8/2/2016 1:53 PM, Bjorn Helgaas wrote:
> On Tue, Aug 02, 2016 at 11:27:45AM +0100, Joao Pinto wrote:
>> On 7/25/2016 9:44 PM, Bjorn Helgaas wrote:
>>> On Fri, Jul 22, 2016 at 02:29:38PM +0100, Joao Pinto wrote:
>>>> This patch adds the support to the new iATU mechanism that will be used
>>>> from Core version 4.80, which is called iATU Unroll.
>>>> The new Cores can support the iATU Unroll or support the "old" iATU
>>>> method now called Legacy Mode. The driver is perfectly capable of
>>>> performing well for both.
>>>>
>>>> In order to make sure that the iATU is really enabled a for loop was
>>>> introduced in dw_pcie_prog_outbound_atu() to improve reliability.
>>>>
(snip...)
>> ...
>>>> +static inline void dw_pcie_readl_unroll(struct pcie_port *pp, u32 type,
>>>> + u32 index, u32 reg, u32 *val)
>>>> +{
>>>> + u32 reg_addr = 0;
>>>> +
>>>> + if (type == PCIE_TRANSL_OUTB)
>>>> + reg_addr = PCIE_GET_ATU_OUTB_UNR_REG_ADDR(index, reg);
>>>> + else if (type == PCIE_TRANSL_INB)
>>>> + reg_addr = PCIE_GET_ATU_INB_UNR_REG_ADDR(index, reg);
>>>
>>> PCIE_TRANSL_INB is never used. In fact, dw_pcie_readl_unroll() is
>>> *always* called with PCIE_TRANSL_OUTB, so it's not clear what the
>>> value of passing it as an argument is.
>>
>> I included The Inbound translation mechanism because you can have Inbound or
>> Outbound translation in the iATU. The old mechanism also had Inbound properties
>> that are not used in the code. I suggest we keep the Inbound mechanism to avoid
>> future rework. Agree?
>
> Again, not a huge deal, but since PCIE_TRANSL_INB is not used, it
> makes life harder for the reader, and the related code is not tested.
> So personally, I would remove it and add it back if/when it is needed.
>
> Bjorn
>
Ok, I will do that and send a new version soon. Thanks!
Joao
next prev parent reply other threads:[~2016-08-02 14:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-22 13:29 [PATCH v2 0/2] pcie-designware: add iATU unroll feature Joao Pinto
2016-07-22 13:29 ` [PATCH v2 1/2] pcie-designware: add iATU Unroll feature Joao Pinto
2016-07-25 20:44 ` Bjorn Helgaas
2016-08-02 10:27 ` Joao Pinto
2016-08-02 12:53 ` Bjorn Helgaas
2016-08-02 14:27 ` Joao Pinto [this message]
2016-07-22 13:29 ` [PATCH v2 2/2] pcie-designware: add core version Joao Pinto
2016-07-25 20:16 ` Bjorn Helgaas
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=bc8cd064-9397-7772-72d1-a782b3769cd4@synopsys.com \
--to=joao.pinto@synopsys.com \
--cc=CARLOS.PALMINHA@synopsys.com \
--cc=MiguelFalcao.Sousa@synopsys.com \
--cc=helgaas@kernel.org \
--cc=jingoohan1@gmail.com \
--cc=jszhang@marvell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome