All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@verge.net.au>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: "Wolfram Sang" <wsa+renesas@sang-engineering.com>,
	linux-mmc@vger.kernel.org,
	"Yoshihiro Shimoda" <yoshihiro.shimoda.uh@renesas.com>,
	linux-renesas-soc@vger.kernel.org,
	"Niklas Söderlund" <niklas.soderlund@ragnatech.se>,
	"Nguyen Viet Dung" <dung.nguyen.aj@renesas.com>
Subject: Re: [PATCH 1/5] mmc: renesas_sdhi_internal_dmac: limit DMA RX for old SoCs
Date: Fri, 13 Apr 2018 10:14:45 +0200	[thread overview]
Message-ID: <20180413081444.ai6eyujitcx2us5s@verge.net.au> (raw)
In-Reply-To: <20180412112142.mnxzv2hsggwbuta5@katana>

On Thu, Apr 12, 2018 at 01:21:42PM +0200, Wolfram Sang wrote:
> 
> > > +static unsigned long global_flags;
> > 
> > Is the restriction on concurrent DMA RX streams global or per-device?
> 
> ? Each device has only one DMA RX channel. Hey Simon, you upstreamed
> this driver :) Or did I get the question wrong?

As I understand things this patch implements a restriction on concurrent
DMA RX streams for old SoCs, corresponding with a limitation in the
hardware.

As the implementation stands it is global - only one DMA RX stream may
be in flight for the entire system. I am wondering if that is the right
granularity for the restriction. Perhaps it could be per-SDHI device,
allowing concurrent streams on different SDHI devices.

I think what you have is safe. But perhaps it could be relaxed.
I do not have any insights regarding the extent of the hardware
restriction (that I can recall at this time).

> > > +	if (dir == DMA_FROM_DEVICE)
> > > +		clear_bit(SDHI_INTERNAL_DMAC_RX_IN_USE, &global_flags);
> > > +
> > 
> > Is clear_bit() expensive? If so it might be worth avoiding on SoCs that
> > don't have the restriction covered by this patch.
> 
> It's an atoimc bitop, so maybe has a memory barrier. Hmm, the above
> version is better on the cache lines, though, if you don't have the
> restriction.
> 
> Will think about it and make sure both clear_bit() are in sync.

Thanks, I don't feel strongly about this.

  reply	other threads:[~2018-04-13  8:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-10  9:38 [PATCH 0/5] mmc: renesas_sdhi_internal_dmac: DMA handling fixes Wolfram Sang
2018-04-10  9:38 ` [PATCH 1/5] mmc: renesas_sdhi_internal_dmac: limit DMA RX for old SoCs Wolfram Sang
2018-04-10  9:48   ` Geert Uytterhoeven
2018-04-12 11:11     ` Wolfram Sang
2018-04-12 11:25       ` Geert Uytterhoeven
2018-04-12 11:31         ` Wolfram Sang
2018-04-12 11:34           ` Geert Uytterhoeven
2018-04-12 11:40             ` Wolfram Sang
2018-04-11  7:14   ` Simon Horman
2018-04-12 11:21     ` Wolfram Sang
2018-04-13  8:14       ` Simon Horman [this message]
2018-04-13  8:35         ` Wolfram Sang
2018-04-13  9:47           ` Simon Horman
2018-04-10  9:38 ` [PATCH 2/5] mmc: renesas_sdhi: use helpers to access struct scatterlist members Wolfram Sang
2018-04-11  7:15   ` Simon Horman
2018-04-10  9:38 ` [PATCH 3/5] mmc: renesas_sdhi: Fix alignment check of sg buffer Wolfram Sang
2018-04-11  7:17   ` Simon Horman
2018-04-10  9:38 ` [PATCH 4/5] mmc: renesas_sdhi_internal_dmac: use more generic whitelisting Wolfram Sang
2018-04-10  9:38 ` [PATCH 5/5] mmc: renesas_sdhi_internal_dmac: remove superfluous WARN Wolfram Sang
2018-04-11  7:23   ` Simon Horman

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=20180413081444.ai6eyujitcx2us5s@verge.net.au \
    --to=horms@verge.net.au \
    --cc=dung.nguyen.aj@renesas.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=niklas.soderlund@ragnatech.se \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=wsa@the-dreams.de \
    --cc=yoshihiro.shimoda.uh@renesas.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.