[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <69e79afa-16c7-a00c-653d-e4155999660f@ti.com>
Date: Wed, 19 Jun 2019 10:41:26 +0530
From: Kishon Vijay Abraham I <kishon@...com>
To: Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Vidya Sagar <vidyas@...dia.com>
CC: <jingoohan1@...il.com>, <gustavo.pimentel@...opsys.com>,
<bhelgaas@...gle.com>, <Jisheng.Zhang@...aptics.com>,
<thierry.reding@...il.com>, <linux-pci@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <kthota@...dia.com>,
<mmaddireddy@...dia.com>, <sagar.tv@...il.com>
Subject: Re: [PATCH V4 1/2] PCI: dwc: Add API support to de-initialize host
Hi Lorenzo,
On 18/06/19 7:58 PM, Lorenzo Pieralisi wrote:
> On Tue, Jun 18, 2019 at 04:21:17PM +0530, Vidya Sagar wrote:
>
> [...]
>
>>> 2) It is not related to this patch but I fail to see the reasoning
>>> behind the __ in __dw_pci_read_dbi(), there is no no-underscore
>>> equivalent so its definition is somewhat questionable, maybe
>>> we should clean-it up (for dbi2 alike).
>> Separate no-underscore versions are present in pcie-designware.h for
>> each width (i.e. l/w/b) as inline and are calling __ versions passing
>> size as argument.
>
> I understand - the __ prologue was added in b50b2db266d8 maybe
> Kishon can help us understand the __ rationale.
>
> I am happy to merge it as is, I was just curious about the
> __ annotation (not related to this patch).
In commit b50b2db266d8a8c303e8d88590 ("PCI: dwc: all: Modify dbi accessors to
take dbi_base as argument"), dbi accessors was modified to take dbi_base as
argument (since we wanted to write to dbics2 address space). We didn't want to
change all the drivers invoking dbi accessors to pass the dbi_base. So we added
"__" variant to take dbi_base as argument and the drivers continued to invoke
existing dbi accessors which in-turn invoked "__" version with dbi_base as
argument.
I agree there could be some cleanup since in commit
a509d7d9af5ebf86ffbefa98e49761d ("PCI: dwc: all: Modify dbi accessors to access
data of 4/2/1 bytes"), we modified __dw_pcie_readl_dbi() to
__dw_pcie_write_dbi() when it could have been directly modified to
dw_pcie_write_dbi().
Thanks
Kishon
Powered by blists - more mailing lists