LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Karsten Graul <kgraul@linux.ibm.com>
Cc: Robin Murphy <robin.murphy@arm.com>,
	Gerald Schaefer <gerald.schaefer@linux.ibm.com>,
	Hamza Mahfooz <someguy@effective-light.com>,
	Christoph Hellwig <hch@lst.de>,
	Dan Williams <dan.j.williams@intel.com>,
	Ioana Ciornei <ioana.ciornei@nxp.com>,
	Jeremy Linton <jeremy.linton@arm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	"iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	linux-s390 <linux-s390@vger.kernel.org>
Subject: Re: DPAA2 triggers, [PATCH] dma debug: report -EEXIST errors in add_dma_entry
Date: Mon, 11 Oct 2021 13:47:06 +0200	[thread overview]
Message-ID: <20211011114706.GA16350@lst.de> (raw)
In-Reply-To: <fd4a2d8d-3f9d-51f3-1c86-8009ad50e6a1@linux.ibm.com>

On Thu, Oct 07, 2021 at 12:59:32PM +0200, Karsten Graul wrote:
> In our case its really that a buffer is mapped twice for 2 different devices which we use in SMC to provide failover capabilities. We see that -EEXIST is returned when a buffer is mapped for the second device. Since there is a maximum of 2 parallel mappings we never see the warning shown by active_cacheline_inc_overlap() because we don't exceed ACTIVE_CACHELINE_MAX_OVERLAP.

Mapping something twice is possible, but needs special care.
Basically one device always needs to do the first mapping and the other
one needs to use DMA_ATTR_SKIP_CPU_SYNC to opt out of the coherency
protocol.  So we have two TODO items here: 1) the driver needs to use the
above scheme and 2) this dma-debug check needs to understand
DMA_ATTR_SKIP_CPU_SYNC.  Can I trick you into doing both?

  parent reply	other threads:[~2021-10-11 11:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18 12:54 Hamza Mahfooz
2021-06-22  7:41 ` Christoph Hellwig
2021-09-09  3:33 ` DPAA2 triggers, " Jeremy Linton
2021-09-09 21:16   ` Ioana Ciornei
2021-09-10 10:23   ` Christoph Hellwig
2021-09-14 15:45   ` Ioana Ciornei
2021-09-30 13:37     ` Karsten Graul
2021-10-01 12:52       ` Gerald Schaefer
2021-10-06 13:10         ` Gerald Schaefer
2021-10-06 13:21           ` Gerald Schaefer
2021-10-06 14:23           ` Robin Murphy
2021-10-06 15:06             ` Gerald Schaefer
2021-10-07 10:59             ` Karsten Graul
2021-10-07 16:40               ` Gerald Schaefer
2021-10-11 11:47               ` Christoph Hellwig [this message]
2021-10-01  4:19     ` Christoph Hellwig
2021-10-01  9:21       ` Ioana Ciornei

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=20211011114706.GA16350@lst.de \
    --to=hch@lst.de \
    --cc=dan.j.williams@intel.com \
    --cc=gerald.schaefer@linux.ibm.com \
    --cc=ioana.ciornei@nxp.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jeremy.linton@arm.com \
    --cc=kgraul@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=netdev@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=someguy@effective-light.com \
    --subject='Re: DPAA2 triggers, [PATCH] dma debug: report -EEXIST errors in add_dma_entry' \
    /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

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