From: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] arc/cache: really do flush_dcache_all() even if IOC exists
Date: Thu, 21 Apr 2016 17:12:59 +0000 [thread overview]
Message-ID: <1461258773.2928.79.camel@synopsys.com> (raw)
In-Reply-To: <1460975319-6187-1-git-send-email-abrodkin@synopsys.com>
Hi,
On Mon, 2016-04-18 at 13:28 +0300, Alexey Brodkin wrote:
> flush_dcache_all() is used in the very end of U-Boot self relocation
> to write back all copied and then patched code and data to their
> new location in the very end of available memory space.
>
> Since that has nothing to do with IO (i.e. no external DMA happens
> here) IOC won't help here and we need to write back data cache contents
> manually.
>
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> ---
> ?arch/arc/lib/cache.c | 7 ++-----
> ?1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arc/lib/cache.c b/arch/arc/lib/cache.c
> index 56988dd..d1fb661 100644
> --- a/arch/arc/lib/cache.c
> +++ b/arch/arc/lib/cache.c
> @@ -430,13 +430,10 @@ void invalidate_dcache_all(void)
> ?
> ?void flush_dcache_all(void)
> ?{
> -#ifdef CONFIG_ISA_ARCV2
> - if (!ioc_exists)
> -#endif
> - __dc_entire_op(OP_FLUSH);
> + __dc_entire_op(OP_FLUSH);
> ?
> ?#ifdef CONFIG_ISA_ARCV2
> - if (slc_exists && !ioc_exists)
> + if (slc_exists)
> ? __slc_entire_op(OP_FLUSH);
> ?#endif
> ?}
Applied, thanks!
-Alexey
prev parent reply other threads:[~2016-04-21 17:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-18 10:28 [U-Boot] [PATCH] arc/cache: really do flush_dcache_all() even if IOC exists Alexey Brodkin
2016-04-21 17:12 ` Alexey Brodkin [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=1461258773.2928.79.camel@synopsys.com \
--to=alexey.brodkin@synopsys.com \
--cc=u-boot@lists.denx.de \
/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