All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Pratyush Anand <pratyush.anand@st.com>
Cc: Mohit KUMAR DCG <Mohit.KUMAR@st.com>,
	Jingoo Han <jg1.han@samsung.com>,
	Viresh Kumar <viresh.linux@gmail.com>,
	"spear-devel" <spear-devel@list.st.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: [PATCH V3 7/8] pcie: SPEAr13xx: Add designware pcie support
Date: Fri, 31 Jan 2014 20:01:20 +0100	[thread overview]
Message-ID: <201401312001.20708.arnd@arndb.de> (raw)
In-Reply-To: <20140131044446.GE2618@pratyush-vbox>

On Friday 31 January 2014, Pratyush Anand wrote:
> > That seems fine from the DT bindings perspective but raises two other
> > questions:
> > 
> > 1. Are you not lacking an interrupt-map property to enable legacy IntA
> >    IRQs?
> 
> As current pcie-designeware driver is not supporting legacy IntA IRQs,
> so we left it.

Hmm, that sounds hard to believe. Doesn't that exclude 90% of the add-on
cards? I noticed that imx also doesn't have it, but exynos does.

Can you check the data sheet again? Maybe the IntA IRQs are not mapped to
host (GIC) IRQs but instead get handled internally in the MSI controller?
IIRC, PCIe INTa IRQs are implemented as MSI on the bus, but normally
get turned into physical IRQ lines by the root complex. If the RC
contains the MSI controller itself, that may have a special register
for the LSI.

> > 2. If the MSI controller is integrated in the pcie host controller,
> >    does that maintain the PCIe ordering guarantees between inbound
> >    DMA and MSI, or is it possible that the <0 68 0x4> IRQ gets
> >    raised at the CPU before the the DMA transfer becomes visible to
> >    the CPU in main memory?
> 
> If the system does not guarantee it, then won't be it a bug in the
> hardware?
> In our case, there is no separate interrupt for DMA completion. (I do
> not know if other system does have DMA interrupt). We have only one
> interrupt and when it is received SW will look into main memory (MSI
> address) for MSI data. If DMA transfer is yet not complete, then SW ll
> read junk data and which will be  a bug.
> 
> We have never seen any erroneous behaviour with MSI interrupt.

There should not be a separate interrupt for DMA, the typical behavior
of a PCIe adapter (SCSI, ethernet, ...) is that it sends an MSI after
data has arrived from an external interface and gets submitted as a
bus-master DMA into main memory. The actual data transfer may have the
'relaxed ordering' bit set on the PCIe transaction, but the MSI message
(which is essentially a 4-byte DMA) will not, which means that all buses
are required to only forward the MSI after the DMA is completed.
If the PCIe host is located on a bus that is not directly connected
to the memory controller, the RC may have seen the DMA complete and
signalled the IRC to the CPU while the data transfer is still in
progress on its way to the actual memory.

That kind of problem is extremely hard to debug and will only occur
in rare cases of bus congestion.

	Arnd

  reply	other threads:[~2014-01-31 19:01 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-30 10:48 [PATCH V3 0/8] PCI:Add SPEAr13xx PCie support Mohit Kumar
2014-01-30 10:48 ` Mohit Kumar
2014-01-30 10:48 ` Mohit Kumar
2014-01-30 10:48 ` [PATCH V3 1/8] clk: SPEAr13xx: Fix pcie clock name Mohit Kumar
2014-01-30 10:48 ` [PATCH V3 2/8] SPEAr13xx: Fix static mapping table Mohit Kumar
2014-01-30 10:48 ` [PATCH V3 3/8] SPEAr13xx: defconfig: Update Mohit Kumar
2014-01-30 13:02   ` Arnd Bergmann
2014-01-31  8:50     ` Mohit KUMAR DCG
2014-01-30 10:48 ` [PATCH V3 4/8] phy: Initialize phy core with subsys_initcall Mohit Kumar
2014-01-30 11:43   ` Kishon Vijay Abraham I
2014-01-30 11:52     ` Pratyush Anand
2014-01-30 12:10       ` Kishon Vijay Abraham I
2014-01-30 12:15       ` Pratyush Anand
2014-01-30 12:25         ` Kishon Vijay Abraham I
2014-01-30 12:44       ` Arnd Bergmann
2014-01-31  3:48         ` Pratyush Anand
2014-01-31 15:25           ` Arnd Bergmann
2014-01-30 10:48 ` [PATCH V3 5/8] ata: ahci platform: Add phy hooks to make it more generic Mohit Kumar
2014-01-30 13:06   ` Arnd Bergmann
2014-01-31  3:52     ` Pratyush Anand
     [not found] ` <cover.1391077731.git.mohit.kumar-qxv4g6HH51o@public.gmane.org>
2014-01-30 10:48   ` [PATCH V3 6/8] SPEAr13xx: Fixup: Move SPEAr1340 SATA platform code to phy driver Mohit Kumar
2014-01-30 10:48     ` Mohit Kumar
2014-01-30 13:21     ` Arnd Bergmann
2014-01-30 13:21       ` Arnd Bergmann
2014-01-31  4:12       ` Pratyush Anand
2014-01-31  4:12         ` Pratyush Anand
2014-01-31 15:27         ` Arnd Bergmann
2014-01-31 15:27           ` Arnd Bergmann
2014-01-30 10:48 ` [PATCH V3 7/8] pcie: SPEAr13xx: Add designware pcie support Mohit Kumar
2014-01-30 13:34   ` Arnd Bergmann
2014-01-30 13:44     ` Arnd Bergmann
2014-01-31  4:44       ` Pratyush Anand
2014-01-31 19:01         ` Arnd Bergmann [this message]
2014-02-01  6:32           ` Pratyush Anand
2014-02-03  0:06             ` Jingoo Han
2014-01-31  4:24     ` Pratyush Anand
2014-01-31 15:29       ` Arnd Bergmann
2014-01-30 10:48 ` [PATCH V3 8/8] MAINTAINERS: Add ST SPEAr13xx PCIe driver maintainer Mohit Kumar
2014-02-03  0:08   ` Jingoo Han

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=201401312001.20708.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=Mohit.KUMAR@st.com \
    --cc=jg1.han@samsung.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=pratyush.anand@st.com \
    --cc=spear-devel@list.st.com \
    --cc=viresh.linux@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.