All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vineet.Gupta1@synopsys.com (Vineet Gupta)
To: linux-snps-arc@lists.infradead.org
Subject: [PATCH] arcv2: Make sure busy bit is set properly on SLC flushing
Date: Wed, 29 Mar 2017 16:41:52 -0700	[thread overview]
Message-ID: <35ad9cda-d493-869f-c65b-9d1ad5382ff3@synopsys.com> (raw)
In-Reply-To: <1490796911-4848-1-git-send-email-abrodkin@synopsys.com>

On 03/29/2017 07:15 AM, Alexey Brodkin wrote:
> As reported in STAR 9001165532 if data cache gets disabled right before
> L2 cache invalidation we may read wrong value of L2 cache "busy" bit.
> So we won't wait before L2 cache gets properly flushed and so some
> data might not reach DDR at all thus we'll use older values from DDR
> next time they are accessed.
>
> For now we use a work-around with one extra read from SLC's control
> register which guarantees next read will return real value of "busy"
> bit.
>
> Signed-off-by: Alexey Brodkin <abrodkin at synopsys.com>

Thx Alexey - pushed to for-curr !

> ---
>  arch/arc/mm/cache.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/arch/arc/mm/cache.c b/arch/arc/mm/cache.c
> index d408fa21a07c..899f1d6b3560 100644
> --- a/arch/arc/mm/cache.c
> +++ b/arch/arc/mm/cache.c
> @@ -633,6 +633,9 @@ noinline static void slc_entire_op(const int op)
>  
>  	write_aux_reg(ARC_REG_SLC_INVALIDATE, 1);
>  
> +	/* Make sure "busy" bit reports correct stataus, see STAR 9001165532 */
> +	read_aux_reg(r);
> +
>  	/* Important to wait for flush to complete */
>  	while (read_aux_reg(r) & SLC_CTRL_BUSY);
>  }

       reply	other threads:[~2017-03-29 23:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1490796911-4848-1-git-send-email-abrodkin@synopsys.com>
2017-03-29 23:41 ` Vineet Gupta [this message]
2017-03-30 14:26   ` [PATCH] arcv2: Make sure busy bit is set properly on SLC flushing Alexey Brodkin

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=35ad9cda-d493-869f-c65b-9d1ad5382ff3@synopsys.com \
    --to=vineet.gupta1@synopsys.com \
    --cc=linux-snps-arc@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 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.