All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/5] arm: Don't invalidate unaligned cache regions
Date: Mon, 20 Jun 2016 05:00:28 +0200	[thread overview]
Message-ID: <57675C4C.7090505@denx.de> (raw)
In-Reply-To: <1466386991-10469-3-git-send-email-sjg@chromium.org>

On 06/20/2016 03:43 AM, Simon Glass wrote:
> At present armv7 will unhappily invalidate a cache region and print an
> error message. Make it skip the operation instead, as it does with other
> cache operations.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Marek Vasut <marex@denx.de>

> ---
> 
>  arch/arm/cpu/armv7/cache_v7.c | 23 ++---------------------
>  1 file changed, 2 insertions(+), 21 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv7/cache_v7.c b/arch/arm/cpu/armv7/cache_v7.c
> index 823a156..e59597e 100644
> --- a/arch/arm/cpu/armv7/cache_v7.c
> +++ b/arch/arm/cpu/armv7/cache_v7.c
> @@ -44,27 +44,8 @@ static void v7_dcache_inval_range(u32 start, u32 stop, u32 line_len)
>  {
>  	u32 mva;
>  
> -	/*
> -	 * If start address is not aligned to cache-line do not
> -	 * invalidate the first cache-line
> -	 */
> -	if (start & (line_len - 1)) {
> -		printf("ERROR: %s - start address is not aligned - 0x%08x\n",
> -			__func__, start);
> -		/* move to next cache line */
> -		start = (start + line_len - 1) & ~(line_len - 1);
> -	}
> -
> -	/*
> -	 * If stop address is not aligned to cache-line do not
> -	 * invalidate the last cache-line
> -	 */
> -	if (stop & (line_len - 1)) {
> -		printf("ERROR: %s - stop address is not aligned - 0x%08x\n",
> -			__func__, stop);
> -		/* align to the beginning of this cache line */
> -		stop &= ~(line_len - 1);
> -	}
> +	if (!check_cache_range(start, stop))
> +		return;
>  
>  	for (mva = start; mva < stop; mva = mva + line_len) {
>  		/* DCIMVAC - Invalidate data cache by MVA to PoC */
> 


-- 
Best regards,
Marek Vasut

  reply	other threads:[~2016-06-20  3:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-20  1:43 [U-Boot] [PATCH 0/5] arm: Tidy up the cache aligning warning code Simon Glass
2016-06-20  1:43 ` [U-Boot] [PATCH 1/5] arm: Move check_cache_range() into a common place Simon Glass
2016-06-20  2:58   ` Marek Vasut
2016-07-16 13:46   ` [U-Boot] [U-Boot, " Tom Rini
2016-06-20  1:43 ` [U-Boot] [PATCH 2/5] arm: Don't invalidate unaligned cache regions Simon Glass
2016-06-20  3:00   ` Marek Vasut [this message]
2016-07-16 13:46   ` [U-Boot] [U-Boot, " Tom Rini
2016-06-20  1:43 ` [U-Boot] [PATCH 3/5] Add comments for debug() and pr_fmt Simon Glass
2016-07-16 13:47   ` [U-Boot] [U-Boot,3/5] " Tom Rini
2016-06-20  1:43 ` [U-Boot] [PATCH 4/5] Add warn_non_spl() to show a message in U-Boot proper Simon Glass
2016-07-16 13:47   ` [U-Boot] [U-Boot, " Tom Rini
2016-06-20  1:43 ` [U-Boot] [PATCH 5/5] arm: Show cache warnings in U-Boot proper only Simon Glass
2016-07-16 13:47   ` [U-Boot] [U-Boot, " Tom Rini
2016-08-02  6:42   ` [U-Boot] [PATCH " Hannes Schmelzer
2016-08-02  6:49     ` Michal Simek

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=57675C4C.7090505@denx.de \
    --to=marex@denx.de \
    --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 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.