linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* designware: Safety of sharing iATU entries between cfg0 & mem, cfg1 & I/O?
@ 2014-10-10 14:21 L H
  0 siblings, 0 replies; only message in thread
From: L H @ 2014-10-10 14:21 UTC (permalink / raw)
  To: jg1.han, amurray; +Cc: linux-pci

Can someone please explain how the sharing of iATUs between cfg0 and
mem accesses, and cfg1 and I/O accesses can operate safely with
concurrent operations?

I read in dw_pcie_[rd|wr]_other_conf() that the code invokes the
dw_pcie_prog_viewport_XXXX() functions to reprogram the iATU entries.
Both cfg0 and memory regions are mapped alternately by
PCIE_ATU_REGION_INDEX0, and both cfg1 and I/O regions are mapped
alternately by PCIE_ATU_REGION_INDEX1.  I noted in the git log that a
previously coded lock was deemed unnecessary and removed around config
operations, but I haven't identified any logic that protects the
possibility of a driver say performing a memory operation while
another is issuing a config.  It would seem to me that there's a small
window of opportunity that the driver performing a memory operation
could have its iATU entry pulled out from underneath it if
concurrently another driver was performing a config operation.

Is there something higher up the call stack, or scheduling-wise, that
prevents this from occurring?

thanks,
LH

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-10-10 14:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-10 14:21 designware: Safety of sharing iATU entries between cfg0 & mem, cfg1 & I/O? L H

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).