* PCI endpoint API question
@ 2017-06-18 14:05 Christoph Hellwig
2017-06-19 9:50 ` Kishon Vijay Abraham I
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2017-06-18 14:05 UTC (permalink / raw)
To: Kishon Vijay Abraham I; +Cc: linux-pci
Hi Kishon,
I've been looking at porting some code to the current incarnation
of your PCI endpoint API. Once thing that I'm missing is a notification
for writes to BARs - is this and intentional omission? It seems
like the only current option is to poll for changes.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: PCI endpoint API question
2017-06-18 14:05 PCI endpoint API question Christoph Hellwig
@ 2017-06-19 9:50 ` Kishon Vijay Abraham I
2017-06-19 15:05 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Kishon Vijay Abraham I @ 2017-06-19 9:50 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-pci
Hi Christoph,
On Sunday 18 June 2017 07:35 PM, Christoph Hellwig wrote:
> Hi Kishon,
>
> I've been looking at porting some code to the current incarnation
> of your PCI endpoint API. Once thing that I'm missing is a notification
> for writes to BARs - is this and intentional omission? It seems
> like the only current option is to poll for changes.
You mean write to the address that's mapped to BAR in the EP side?
PCI doesn't allow hosts to interrupt the EP (AFAIK), so we have to poll for any
writes by the host to EP memory.
However recently I found "Mailbox" module in dra7xx can be used in conjunction
with PCI for PCI host to interrupt EP. I'm yet to add support for using such
SoC specific mechanisms for EP interrupts.
Thanks
Kishon
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: PCI endpoint API question
2017-06-19 9:50 ` Kishon Vijay Abraham I
@ 2017-06-19 15:05 ` Christoph Hellwig
2017-07-11 11:02 ` Kishon Vijay Abraham I
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2017-06-19 15:05 UTC (permalink / raw)
To: Kishon Vijay Abraham I; +Cc: Christoph Hellwig, linux-pci
On Mon, Jun 19, 2017 at 03:20:29PM +0530, Kishon Vijay Abraham I wrote:
> > for writes to BARs - is this and intentional omission? It seems
> > like the only current option is to poll for changes.
>
> You mean write to the address that's mapped to BAR in the EP side?
>
> PCI doesn't allow hosts to interrupt the EP (AFAIK), so we have to poll for any
> writes by the host to EP memory.
At least out on the bus each MMIO access translates to PCIe Memory
Read/Write TLPs, so the EP itself for sure gets a notification. I don't
really know enough about existing programmable endpoint IP to know
how that could be forwarded to software, though.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: PCI endpoint API question
2017-06-19 15:05 ` Christoph Hellwig
@ 2017-07-11 11:02 ` Kishon Vijay Abraham I
0 siblings, 0 replies; 4+ messages in thread
From: Kishon Vijay Abraham I @ 2017-07-11 11:02 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-pci
Hi,
On Monday 19 June 2017 08:35 PM, Christoph Hellwig wrote:
> On Mon, Jun 19, 2017 at 03:20:29PM +0530, Kishon Vijay Abraham I wrote:
>>> for writes to BARs - is this and intentional omission? It seems
>>> like the only current option is to poll for changes.
>>
>> You mean write to the address that's mapped to BAR in the EP side?
>>
>> PCI doesn't allow hosts to interrupt the EP (AFAIK), so we have to poll for any
>> writes by the host to EP memory.
>
> At least out on the bus each MMIO access translates to PCIe Memory
> Read/Write TLPs, so the EP itself for sure gets a notification. I don't
> really know enough about existing programmable endpoint IP to know
> how that could be forwarded to software, though.
yeah, at least in dra7xx I'm not aware of any way in which it is notified to
software. Off late I'm working on enabling endpoint mode in another TI platform
K2G. And there they re-use MSI register for the host to interrupt the endpoint.
See "11.14.4.16.3 Interrupt Generation in RC Mode" section in
http://www.ti.com/lit/ug/spruhy8f/spruhy8f.pdf.
Thanks
Kishon
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-07-11 11:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-18 14:05 PCI endpoint API question Christoph Hellwig
2017-06-19 9:50 ` Kishon Vijay Abraham I
2017-06-19 15:05 ` Christoph Hellwig
2017-07-11 11:02 ` Kishon Vijay Abraham I
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).