[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZzRrNvpz25bkWXog@ryzen>
Date: Wed, 13 Nov 2024 10:02:46 +0100
From: Niklas Cassel <cassel@...nel.org>
To: Frank Li <Frank.li@....com>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
Krzysztof WilczyĆski <kw@...ux.com>,
Kishon Vijay Abraham I <kishon@...nel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>, Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
imx@...ts.linux.dev, dlemoal@...nel.org, maz@...nel.org,
tglx@...utronix.de, jdmason@...zu.us
Subject: Re: [PATCH v6 3/5] PCI: endpoint: pci-epf-test: Add doorbell test
support
On Tue, Nov 12, 2024 at 03:37:34PM -0500, Frank Li wrote:
> >
> > Is there a reason why you chose to not incorporate the helper function
> > that I suggested here:
> > https://lore.kernel.org/linux-pci/ZzMtKUFi30_o6SwL@ryzen/
> >
> > I didn't see any reply from you to that message.
>
> Oh, you said at
> https://lore.kernel.org/imx/ZzIVzfkZe-hkAb4G@ryzen/T/#mc10e69e0e1e20cc8d8da9a8808177407d22bce06
>
> I think you give up your idea about helper function, because it is one
> for doorbell_offset, the other is for the atu address. bar's struct is
> difference with reg. even it is similar,
Yes, that is why the helper returns both base addess and offset
(just like .align_addr()).
> Do you means add help function, which wrap epc's .align_addr()? I know you
> make some improvement about EP's alignment, but I have not realized that
> related this thread at all.
Look at the suggested helper that I wrote in:
https://lore.kernel.org/linux-pci/ZzMtKUFi30_o6SwL@ryzen/
If you think that the code is cleaner, feel free to incorporate it in your
next version, no need to add my SoB.
.align_addr() is not related at all.
(.align_addr() is for alignment for outbound PCI address, and theoretically
the alignment requirement for outbound could be different from inbound
address alignment requirement (which is defined in epc->features->align).
The only relation is that both my suggested helper, and .align_addr() both
return a base address and an offset.
> May "I now see why you did this.
> One function is using the db offset, and the other is using the db base."
> mis-lead me.
Yes, I can see that this sentence can be misunderstood.
> If I understand correct here, I can add wrap function for epc's
> .align_addr(). at next version.
Please do not wrap .align_addr(). Kishon has been very clear that he wants
outbound and inbound translation requirements to not depend on each other.
Kind regards,
Niklas
Powered by blists - more mailing lists