mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: kongxinwei <kong.kongxinwei@hisilicon.com>
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
	linuxarm@huawei.com, fengsheng <fengsheng5@huawei.com>
Subject: Re: [PATCH] spi: dw: use "smp_mb()" to avoid sending spi data error
Date: Fri, 3 Jan 2020 01:04:09 +0000	[thread overview]
Message-ID: <20200103010409.GG3897@sirena.org.uk> (raw)
In-Reply-To: <afad8a97-6159-bf7e-466a-fdbaf0a07d4a@hisilicon.com>

[-- Attachment #1: Type: text/plain, Size: 810 bytes --]

On Sat, Dec 28, 2019 at 04:31:53PM +0800, kongxinwei wrote:

> > I'd be much more comfortable here if I understood what this was
> > supposed to be syncing - what exactly gets flushed here and why
> > is a memory barrier enough to ensure it's synced?  A comment in
> > the code would be especially good so anyone modifying the code
> > understands this in future.

> Because of out-of-order execution about some CPU architecture,
> In this debug stage we find Completing spi interrupt enable ->
> prodrucing TXEI interrupt -> running "interrupt_transfer" function
> will prior to set "dw->rx and dws->rx_end" data, so it will result
> in SPI sending error

Could you update the commit message to say that, and ideally also
add a comment saying something like "Ensure dw->rx and dw->rx_end
are visible" please?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-01-03  1:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-26  9:21 Xinwei Kong
2019-12-27  0:22 ` Mark Brown
2019-12-28  8:31   ` kongxinwei
2020-01-03  1:04     ` Mark Brown [this message]
2020-01-03  1:34       ` kongxinwei

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=20200103010409.GG3897@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=fengsheng5@huawei.com \
    --cc=kong.kongxinwei@hisilicon.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linuxarm@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®