mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] ARM: mmu64: Don't flush freshly invalidated region
Date: Fri, 24 Aug 2018 10:12:21 +0200	[thread overview]
Message-ID: <20180824081221.sfbshtbnlbeas5aa@pengutronix.de> (raw)
In-Reply-To: <20180824025421.19968-1-andrew.smirnov@gmail.com>

On Thu, Aug 23, 2018 at 07:54:21PM -0700, Andrey Smirnov wrote:
> Current code for dma_sync_single_for_device(), when called with dir
> set to DMA_FROM_DEVICE, will first invalidate given region of memory
> as a first step and then clean+invalidate it as a second. While the
> second step should be harmless it seems to be an unnecessary no-op
> that could probably be avoided.
> 
> Analogous code in Linux kernel (4.18) in arch/arm64/mm/cache.S:
> 
> ENTRY(__dma_map_area)
> 	cmp	w2, #DMA_FROM_DEVICE
> 	b.eq	__dma_inv_area
> 	b	__dma_clean_area
> ENDPIPROC(__dma_map_area)
> 
> is written to only perform either invalidate or clean, depending on
> the direction, so change dma_sync_single_for_device() to behave in the
> same vein and perfom _either_ invlidate or flush of the given region.
> 
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> ---

Applied, thanks

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2018-08-24  8:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-24  2:54 Andrey Smirnov
2018-08-24  8:12 ` Sascha Hauer [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=20180824081221.sfbshtbnlbeas5aa@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=andrew.smirnov@gmail.com \
    --cc=barebox@lists.infradead.org \
    /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