From: David Miller <davem@davemloft.net>
To: Eugeniy.Paltsev@synopsys.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-snps-arc@lists.infradead.org, Jose.Abreu@synopsys.com,
alexandre.torgue@st.com, peppe.cavallaro@st.com
Subject: Re: [PATCH] NET: stmmac: align DMA stuff to largest cache line length
Date: Sun, 29 Jul 2018 12:35:10 -0700 (PDT) [thread overview]
Message-ID: <20180729.123510.1847228041867717113.davem@davemloft.net> (raw)
In-Reply-To: <20180726120537.4664-1-Eugeniy.Paltsev@synopsys.com>
From: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Date: Thu, 26 Jul 2018 15:05:37 +0300
> As for today STMMAC_ALIGN macro (which is used to align DMA stuff)
> relies on L1 line length (L1_CACHE_BYTES).
> This isn't correct in case of system with several cache levels
> which might have L1 cache line length smaller than L2 line. This
> can lead to sharing one cache line between DMA buffer and other
> data, so we can lose this data while invalidate DMA buffer before
> DMA transaction.
>
> Fix that by using SMP_CACHE_BYTES instead of L1_CACHE_BYTES for
> aligning.
>
> Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
This is definitely an improvement, so applied and queued up for
-stable.
There is also dma_get_cache_alignment(), so maybe we can eventually
use that here instead.
prev parent reply other threads:[~2018-07-29 19:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-26 12:05 Eugeniy Paltsev
2018-07-29 19:35 ` David Miller [this message]
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=20180729.123510.1847228041867717113.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=Eugeniy.Paltsev@synopsys.com \
--cc=Jose.Abreu@synopsys.com \
--cc=alexandre.torgue@st.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.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®